- 28 Apr, 2024 1 commit
-
-
Takashi Sakamoto authored
Some data for testing is immutable. In the case, the const qualifier is available for any loader to place it to read-only segment. Fixes: 3e39acf5 ("ALSA: core: Add sound core KUnit test") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Ivan Orlov <ivan.orlov0322@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240425233653.218434-1-o-takashi@sakamocchi.jp>
-
- 26 Apr, 2024 1 commit
-
-
Colin Ian King authored
Don't populate the read-only array buf_samples on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Acked-by: Ivan Orlov <ivan.orlov0322@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240425160754.114716-1-colin.i.king@gmail.com>
-
- 24 Apr, 2024 3 commits
-
-
Andy Shevchenko authored
Instead of reiterating the list, use list_for_each_entry_safe() that allows to continue without starting over. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Message-ID: <20240424145020.1057216-1-andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
Add laptop using CS35L41 HDA. This laptop does not have _DSD, so require entries in property configuration table for cs35l41_hda driver. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Message-ID: <20240423162303.638211-3-sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
This laptop does not have the correct _DSD settings, so needs to obtain its configuration from the configuration table. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Message-ID: <20240423162303.638211-2-sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- 21 Apr, 2024 1 commit
-
-
Nathan Chancellor authored
Clang warns (or errors with CONFIG_WERROR): sound/usb/mixer_scarlett2.c:3697:6: error: variable 'err' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] 3697 | if (private->autogain_updated) { | ^~~~~~~~~~~~~~~~~~~~~~~~~ sound/usb/mixer_scarlett2.c:3707:9: note: uninitialized use occurs here 3707 | return err; | ^~~ sound/usb/mixer_scarlett2.c:3697:2: note: remove the 'if' if its condition is always true 3697 | if (private->autogain_updated) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/usb/mixer_scarlett2.c:3688:9: note: initialize the variable 'err' to silence this warning 3688 | int err; | ^ | = 0 1 error generated. Initialize ret to zero to ensure ret is initialized in all paths within scarlett2_ag_target_ctl_get(), which matches the style of other functions in this driver. Fixes: e30ea534 ("ALSA: scarlett2: Add autogain target controls") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Message-ID: <20240419-alsa-scarlett2-fix-wsometimes-uninitialized-v1-1-e2ace8642e08@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- 19 Apr, 2024 1 commit
-
-
Takashi Iwai authored
Although the purpose of dummy seq client is a direct pass-through, it's sometimes helpful for debugging if it can convert to a certain UMP MIDI version. This patch adds an option to specify the UMP event conversion. As default, it skips the conversion and does passthrough, while user can pass ump=1 or ump=2 to enforce the conversion to UMP MIDI1 or MIDI2 format. Message-ID: <20240419101105.15571-1-tiwai@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- 18 Apr, 2024 29 commits
-
-
Pavel Hofman authored
Many modern codecs support rates up to 768kHz (including DSD1024). Add support for rates up to 768kHz to the loopback driver. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240416121726.628679-4-pavel.hofman@ivitera.com>
-
Pavel Hofman authored
Many modern codecs support 705.6kHz and 768kHz sample rates. Current HW params fail to set 705.6kHz and 768kHz sample rates as these are not in the known-rates list. Add these new rates to the known-rates list to allow them. Also add defines in pcm.h so that drivers can use it. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240416121726.628679-3-pavel.hofman@ivitera.com>
-
Pavel Hofman authored
The snd-aloop loopback driver does not modify or access the actual samples in any way, defines no volume or mute controls, it's strictly bitperfect. Therefore DSD formats can be supported without any modification. Add all DSD formats to the list of supported formats. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240416121726.628679-2-pavel.hofman@ivitera.com>
-
Stefan Binding authored
These laptops do not have _DSD and must be added by configuration table, however, the initial entries for them are incorrect: Neither laptop contains a Speaker ID GPIO. This issue would not affect audio playback, but may affect which files are loaded when loading firmware. Fixes: b67a7dc4 ("ALSA: hda/realtek: Add sound quirks for Lenovo Legion slim 7 16ARHA7 models") Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240411110813.330483-8-sbinding@opensource.cirrus.com>
-
Richard Fitzgerald authored
In every case the 'dir' argument to cs35l41_request_firmware_file() is passed the string "cirrus/", so this is a redundant argument and can be removed. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240411110813.330483-7-sbinding@opensource.cirrus.com>
-
Stefan Binding authored
The original mechanism for applying calibration assumed that the calibration data would be ordered the same as the amp instances. However, for some 4 amp laptops, this is not the case. To ensure that the correct calibration is applied to the correct amp, the calibration data contains a unique id, which matches a unique id inside the CS35L41. This can be used to match to the correct data entry. This mechanism is available inside the shared module cs-amp-lib. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240411110813.330483-6-sbinding@opensource.cirrus.com>
-
Stefan Binding authored
Currently, all PC systems are set to use VBSTMON for DSP1RX5_SRC, however, this is required only for external boost systems. Internal boost systems require VPMON instead of VBSTMON to be the input to DSP1RX5_SRC. All systems require DSP1RX6_SRC to be set to VBSTMON. Also fix incorrect comment for DACPCM1_SRC to use DSP1TX1. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240411110813.330483-5-sbinding@opensource.cirrus.com>
-
Stefan Binding authored
Add 4 laptops using CS35L41 HDA. None of these laptops have _DSD, so require entries in property configuration table for cs35l41_hda driver. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240411110813.330483-4-sbinding@opensource.cirrus.com>
-
Stefan Binding authored
Add support for 2 new HP Omen models without _DSD into configuration table. These laptops use the PCM Gain setting for the tuning setting file. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240411110813.330483-3-sbinding@opensource.cirrus.com>
-
Stefan Binding authored
Some systems requires different max PCM Gains settings than the default. The current default value, when running firmware is 17.5 dB, which is used for all systems. Some systems require lower values. Value when running without firmware is 4.5 dB and remains unchanged. Since the gain value is dependent on Tuning and Firmware, it can change, so it cannot be saved in _DSD. Instead we can store it inside a configuration binary file alongside the Firmware and Tuning files. The gain value increments in steps of 1 dB, with value 0 representing 0.5 dB. The max value is 20, which corresponds to 20.5 dB. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240411110813.330483-2-sbinding@opensource.cirrus.com>
-
Peter Ujfalusi authored
It is recommended that on Lunar Lake the PIO (immediate command response) is used instead of CORB/RIRB for commands/verbs. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240409083812.14001-6-peter.ujfalusi@linux.intel.com>
-
Peter Ujfalusi authored
It is recommended that on Lunar Lake the PIO (immediate command response) is used instead of CORB/RIRB for commands/verbs. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240409083812.14001-5-peter.ujfalusi@linux.intel.com>
-
Peter Ujfalusi authored
Set the use_pio_for_commands flag in case AZX_DCAPS_PIO_COMMANDS quirk is enabled. When the PIO command mode is used we can re-use the existing azx_single_send_cmd() / azx_single_get_response() functions safely as the CORB DMA is not going to be enabled in snd_hdac_bus_init_cmd_io(). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240409083812.14001-4-peter.ujfalusi@linux.intel.com>
-
Peter Ujfalusi authored
In case the use_pio_for_commands flag is set we must not enable the CORB DMA to make sure that it is not interfering with the immediate command mode. Convert the snd_hdac_bus_send_cmd/snd_hdac_bus_get_response as wrappers to call either the PIO or CORB based command handling depending on the use_pio_for_commands flag. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240409083812.14001-3-peter.ujfalusi@linux.intel.com>
-
Peter Ujfalusi authored
Add AZX_DCAPS_PIO_COMMANDS quirk (bit 31) and use_pio_for_commands flag to be able to select PIO mode as alternative for CORB based command sending while retaining the RIRB functionality to receive unsolicited responses. This mode differs from the azx single_cmd mode when RIRB is disabled. The mixed mode is needed on Lunar Lake family because it is recommended to use Immediate Command Response (PIO mode) instead of CORB for HDA commands. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240409083812.14001-2-peter.ujfalusi@linux.intel.com>
-
Geoffrey D. Bennett authored
The Vocaster Two has a Bluetooth module with a volume control. Add a corresponding ALSA mixer control. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <b78687f7243142a4466f63c0aee9742b44ee395d.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
The Scarlett 4th Gen and Vocaster interfaces allow the autogain target dBFS value(s) to be configured. Add Mean and Peak Target controls for 4th Gen, and a Hot Target control for Vocaster. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <33d7f6dc965ab09522361ec99745a0685e4b8272.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
Add Focusrite Vocaster One and Two USB IDs, notification arrays, config sets, and device info data. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <5fb48555a8db7bb322b25784b165829357cd6e42.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
Add filter and compressor DSP controls for the Vocaster interfaces. Mark scarlett2_notify_input_dsp() as __always_unused until it gets used when the Vocaster callback function array is added. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <a45316f79600b862dae38da24f13def638b06476.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
Add controls for the input mute switches that the Vocaster interfaces have. Mark scarlett2_notify_input_mute() as __always_unused until it gets used when the Vocaster callback function array is added. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <3b384b4e759241bd06f0c223e9f4f00467d88318.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
The autogain status texts are different for Vocaster vs. Scarlett 4th Gen, so make them configurable per-config-set. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <b1adcd3dc48117d4ebe16812eeb7f1dbf1ede472.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
Remove the #define SCARLETT2_MAX_GAIN_DB and replace with a per-config-set TLV as the Vocaster has a maximum gain of 70dB vs the 4th Gen 69dB. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <ade8e18ce38927ea0224946ec7cfea23ad3793d8.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
The 4th Gen Scarlett interfaces added software-controllable input gain along with channel select, channel link, auto-gain, and "safe" mode. Vocaster has software-controllable input gain and auto-gain but not channel select, channel link, or safe mode. Add a device info field safe_input_count to indicate how many channels have a safe mode control, and use the presence of the input select and input link switch configuration parameters to determine if those controls should be created. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <167f04a37d0fb23f3077705df835adbc4f2b6a8e.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
Update scarlett2_usb_get_config() to support 32-bit values which are needed by the upcoming Vocaster support. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <ee35dce0172b2aa3fec8163ab8f35bdc35a141bd.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
scarlett2_usb_set_config() was using size = 0 as a signal to use the parameter buffer. Replace that with an explicit indication (pbuf = 1), as the upcoming Vocaster support has a config item written via the parameter buffer with size = 1 rather than the implicit size of 8. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <50a7d85bb04f9a7f13f667c70a706826c8d3ef93.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
The location pointed to by gen4_write_addr and gen4_write_addr + 1 is officially known as the parameter buffer. Update the code to match. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <aa36ecb8d3ce67387b5edf6c900f0b8a509241ce.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
Add hwdep read op so flash segments can be read. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <800d20a801e8c59c2905c82ecae5676cd4f31429.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
After scarlett2_usb() sends a command, it seems that we should wait for an ACK before attempting to read the response. Not doing that didn't seem necessary previously but seems to be causing occasional issues with 4th Gen devices. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <452d1263c40fa8eba1cfb24e2055e40a84cbc437.1710264833.git.g@b4.vu>
-
Geoffrey D. Bennett authored
So that more forward declarations won't be required when we add handling of the ACK notification, move the initialisation functions to after the notification functions. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <0922071cb8be99a2394705de27b917d1e4e46f3f.1710264833.git.g@b4.vu>
-
- 07 Apr, 2024 4 commits
-
-
Takashi Iwai authored
Pull emu10k1 fix patch series Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Oswald Buddenhagen authored
Both drivers provide both sample_new and sample_free, and it makes no sense to pretend that they could not. In fact, load_data() would already crash if sample_new was null. So remove the remaining null checks. Contrary to that, the emu10k1 driver actually has a null sample_reset, though I'm not convinced that this inconsistency is justified. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Message-ID: <20240406064830.1029573-18-oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Oswald Buddenhagen authored
There is no need for it to be 32 samples - 3 will do just fine (which is the interpolator's epsilon). The old size was presumably meant to compensate for the cache's presence, but we're now handling that properly. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Message-ID: <20240406064830.1029573-17-oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Oswald Buddenhagen authored
Compensate for the cache lag of 64 frames, and actually populate the cache. Without these, the playback would start with garbage (which would be (mostly?) masqueraded by the note's attack phase). Note that we set the starting address only 61 frames ahead, to compensate for the interpolator's epsilon. Unlike for PCM playback, we don't even need to manually silence-fill the first frames in the cache, because we insert some silence in front of each sample anyway. A challenge are extremely short samples with a loop end below the cache size, because a) we'd have to wrap the current address to be within the loop and b) automatic pre-filling of the cache with the right data does not work in this case. We could pre-fill the cache manually, but that's slow, requires additional code for each sample width, and is made even more complex by the driver's virtual address space having no contiguous mapping for the CPU. We could have the engine fill the cache piece-wise (which is really what happens when playback is running), but that would also be complex, and we'd need to wait for the engine to handle each piece, so it wouldn't be that much faster than the manual fill. For the case of requiring only one loop iteration prior to reaching the cache size, we could leverage the engine's looping mechanism around CCR_CACHELOOPFLAG, but this special case doesn't seem worth the complexity. So we just unroll the loop as far as necessary to be able to play back the sample without any fiddling. Pedantically, this would be incorrect for loop-until-release samples with a low loop end which are released very quickly, but that would be relatively harmless, is not a plausible use case in the first place, and SoundFont sample mode 3 isn't actually implemented anyway (it's conflated with mode 1, infinite looping). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Message-ID: <20240406064830.1029573-16-oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-