- 15 Jul, 2022 6 commits
-
-
Stefan Binding authored
The config sequences for running with and without firmware and DSP are different. The original behavior assumed that we would only run without DSP only in the case where firmware load failed. This meant the non-firmware sequence was written with the assumtion that various registers would be set to their default value. However, to support the ability to unload the firmware, the non-firmware register sequence must be updated to update all required registers, including values that would be defaulted, in case the firmware sequence, which could have already run, has changed their value. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-13-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
This will be used to define the firmware names. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-12-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
Speaker Calibration data, specific to an individual speaker is stored inside UEFI variables during calibration, and can be used by the DSP. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-11-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
CS35L41 supports hibernation during suspend when using DSP firmware. When the driver suspends it will hibernate the part, if firmware is running, and resume will wake from hibernation. CS35L41 driver will suspend/resume when requested by hda driver. Note that suspend/resume and hibernation is only supported when firmware is running. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-10-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Merge tag 'asoc-v5.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v5.20 This is a big release thus far and there will probably be more changes to come, it's a combination of a larger than usual crop of new drivers and some subsysetm wide cleanups from Charles rather than anything structural. The SOF and Intel DSP code both also continue to be very actively developed. - Restructing of the set_fmt() callbacks to be specified in terms of the device rather than with semantics depending on if the device is supposed to be a CODEC or SoC, making things clearer in situations like CODEC to CODEC links. - Clean up of the way we flag which DAI naming scheme we use to reflect the progress that's been made modernising things. - Merge of more of the Intel AVS driver stack, including some board integrations. - New version 4 mechanism for communication with SOF DSPs. - Suppoort for dynamically selecting the PLL to use at runtime on i.MX platforms. - Improvements for CODEC to CODEC support in the generic cards. - Support for AMD Jadeite and various machines, Intel MetorLake DSPs, Mediatek MT8186 DSPs and MT6366, nVidia Tegra MDDRC, OPE and PEQ, NXP TFA9890, Qualcomm SDM845, WCD9335 and WAS883x, and Texas Instruments TAS2780.
-
Zheyu Ma authored
When the driver fails in snd_card_register() at probe time, it will free the 'bcd2k->midi_out_urb' before killing it, which may cause a UAF bug. The following log can reveal it: [ 50.727020] BUG: KASAN: use-after-free in bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000] [ 50.727623] Read of size 8 at addr ffff88810fab0e88 by task swapper/4/0 [ 50.729530] Call Trace: [ 50.732899] bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000] Fix this by adding usb_kill_urb() before usb_free_urb(). Fixes: b47a2229 ("ALSA: MIDI driver for Behringer BCD2000 USB device") Signed-off-by: Zheyu Ma <zheyuma97@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220715010515.2087925-1-zheyuma97@gmail.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 14 Jul, 2022 13 commits
-
-
Mark Brown authored
Needed for further development.
-
Kuninori Morimoto authored
Before, ssiu.c didn't care SSI5-8, thus, commit b1384d4c ("ASoC: rsnd: care default case on rsnd_ssiu_busif_err_status_clear()") cares it for status clear. But we should care it for error irq handling, too. This patch cares it. Reported-by: Nguyen Bao Nguyen <nguyen.nguyen.yj@renesas.com> Reported-by: Nishiyama Kunihiko <kunihiko.nishiyama.dn@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/871quocio1.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Carpenter authored
There are two bugs that have to do with when we copy the payload: size = simple_write_to_buffer(ipc4_msg->data_ptr, priv->max_msg_size, ppos, buffer, count); The value of "*ppos" was supposed to be zero but it is sizeof(ipc4_msg->header_u64) so it will copy the data into the middle of the "ipc4_msg->data_ptr" buffer instead of to the start. The second problem is "buffer" should be "buffer + sizeof(ipc4_msg->header_u64)". This function is used for fuzz testing so the data is normally random and this bug likely does not affect anyone very much. In this context, it's simpler and more appropriate to use copy_from_user() instead of simple_write_to_buffer() so I have re-written the function. Fixes: 066c6762 ("ASoC: SOF: ipc-msg-injector: Add support for IPC4 messages") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/Ysg1tB2FKLnRMsel@kiliSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
The version of the BCLK pinctrl management changes that made it into v5.19 has caused problems on some systems due to overly strict DT requirements but attempts to fix it have caused further breakage on other platforms. Just drop the changes for this release, we already have a better version queued for -next. Fixes: 26b9f2fa ("ASoC: rockchip: i2s: Fix NULL pointer dereference when pinctrl is not found") Fixes: a5450aba ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220713130451.31481-1-broonie@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Stefan Binding authored
Some Laptops use a number of gpios to define which vendor is used for a particular laptop. Different coefficient files are used for different vendors. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-9-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
To be able to support different firmwares and tuning for different models, the driver needs to be able to load a different firmware and coefficient file based on its Subsystem ID. The driver attempts to load the firmware in the following order: /lib/firmware/cirrus/cs35l41-dsp1-<fw-type>-<ssid>-dev<#>.wmfw /lib/firmware/cirrus/cs35l41-dsp1-<fw-type>-<ssid>.wmfw /lib/firmware/cirrus/cs35l41-dsp1-<fw-type>.wmfw Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-8-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
On some laptop models, the ACPI contains the unique Subsystem ID, and this value should be preferred over the value from the HDA driver. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-7-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
The Subsystem ID is read from the HDA driver, and will be used by the CS35L41 driver to be able to uniquely identify the laptop, which is required to be able to define firmware to be used by specific models. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-6-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Vitaly Rodionov authored
This patch adds support for the CS35L41 DSP. The DSP allows for extra features, such as running speaker protection algorithms and hibernations. To utilize these features, the driver must load firmware into the DSP, as well as various tuning files which allow for customization for specific models. [ Slightly simplified Kconfig changes by tiwai ] Signed-off-by: Vitaly Rodionov <vitaly.rodionov@cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-5-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
This is required for ALSA control support. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-4-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
DSP controls are exposed as ALSA controls, however, some of these controls are required to be accessed by the driver. Add apis which allow read/write of these controls. The write api will also notify the ALSA control on value change. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-3-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
The cs35l41 part contains a DSP which is able to run firmware. The cs_dsp library can be used to control the DSP. These controls can be exposed to userspace using ALSA controls. This library adds apis to be able to interface between cs_dsp and hda drivers and expose the relevant controls as ALSA controls. [ Note: the dependency of CONFIG_SND_HDA_CS_DSP_CONTROLS Kconfig is corrected. Also, this Kconfig isn't enabled now but will be actually enabled in a later patch -- tiwai ] Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-2-vitalyr@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Uros Bizjak authored
Use atomic_try_cmpxchg instead of atomic_cmpxchg (*ptr, old, new) == old in ep_state_update. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). No functional change intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Link: https://lore.kernel.org/r/20220713151946.4743-1-ubizjak@gmail.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 13 Jul, 2022 18 commits
-
-
Mark Brown authored
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: For SOF IPC4, we need to set pipeline state in BE DAI trigger.
-
Bard Liao authored
For IPC4, we need to set pipeline state in BE DAI trigger. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220708061312.25878-3-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
When a pipeline is split into FE and BE parts, the BE pipeline may need to be triggered separately in the BE trigger op. So add the trigger callback in the link_res ops that will be invoked during BE DAI trigger. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Acked-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20220708061312.25878-2-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Liang He authored
In mt6359_parse_dt() and mt6359_accdet_parse_dt(), we should call of_node_put() for the reference returned by of_get_child_by_name() which has increased the refcount. Fixes: 68353028 ("ASoC: mt6359: fix failed to parse DT properties") Fixes: eef07b9e ("ASoC: mediatek: mt6359: add MT6359 accdet jack driver") Signed-off-by: Liang He <windhl@126.com> Link: https://lore.kernel.org/r/20220713102013.367336-1-windhl@126.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Randy Dunlap authored
Since SND_SOC_ES8316 has a hard dependency on I2C and since 'select' does not follow any dependency chains, SND_SOC_AMD_ST_ES8336_MACH also needs to have a hard dependency on I2C. Fixes a kconfig warning and subsequent build errors: WARNING: unmet direct dependencies detected for SND_SOC_ES8316 Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=n] Selected by [y]: - SND_SOC_AMD_ST_ES8336_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_ACP [=y] && ACPI [=y] && (I2C [=n] || COMPILE_TEST [=y]) sound/soc/codecs/es8316.c:866:1: warning: data definition has no type or storage class 866 | module_i2c_driver(es8316_i2c_driver); sound/soc/codecs/es8316.c:866:1: error: type defaults to ‘int’ in declaration of ‘module_i2c_driver’ [-Werror=implicit-int] sound/soc/codecs/es8316.c:866:1: warning: parameter names (without types) in function declaration sound/soc/codecs/es8316.c:857:26: warning: ‘es8316_i2c_driver’ defined but not used [-Wunused-variable] 857 | static struct i2c_driver es8316_i2c_driver = { Fixes: f94fa840 ("ASoC: amd: enable machine driver build for Jadeite platform") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Cc: Mark Brown <broonie@kernel.org> Cc: alsa-devel@alsa-project.org Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Link: https://lore.kernel.org/r/20220712183348.31046-1-rdunlap@infradead.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Liang He authored
We should call of_node_put() for the reference before its replacement as it returned by of_get_parent() which has increased the refcount. Besides, we should also call of_node_put() before return. Fixes: c8c74939 ("ASoC: audio-graph-card2: add Multi CPU/Codec support") Signed-off-by: Liang He <windhl@126.com> Link: https://lore.kernel.org/r/20220713071200.366729-1-windhl@126.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Carpenter authored
The "gpio_pa" pointer is an error pointer, there is no need to try put it. Calling gpiod_put() on it will lead to an error pointer dereference. Fixes: 02527c3f ("ASoC: amd: add Machine driver for Jadeite platform") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/Ys2IRPHWGIwuVs21@kiliSigned-off-by: Mark Brown <broonie@kernel.org>
-
Takashi Iwai authored
Each kernel doc comment expects the definition of the return value in a proper format. This patch adds or fixes the missing entries for the remaining ALSA core API functions. Link: https://lore.kernel.org/r/20220713104759.4365-8-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Each kernel doc comment expects the definition of the return value in a proper format. This patch adds or fixes the missing entries for memory allocation helpers. Link: https://lore.kernel.org/r/20220713104759.4365-7-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Each kernel doc comment expects the definition of the return value in proper format. This patch adds or fixes the missing entries for control API. Link: https://lore.kernel.org/r/20220713104759.4365-6-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Each kernel doc comment expects the definition of the return value and the summary for each struct / enum in a proper format. This patch adds or fixes the missing entries for compress-offload API. Link: https://lore.kernel.org/r/20220713104759.4365-5-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Each kernel doc comment expects the definition of the return value in a proper format. This patch adds or fixes the missing entries for PCM dmaengine API. Link: https://lore.kernel.org/r/20220713104759.4365-4-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Each kernel doc comment expects the definition of the return value in a proper format. This patch adds or fixes the missing entries for PCM API. Link: https://lore.kernel.org/r/20220713104759.4365-3-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
The exported functions snd_compress_new() and snd_compr_stop_error() had already kernel-doc-style comments but they were not processed as they weren't marked properly. Let's enable them. This patch also fixes the missing argument id for snd_compress_new comments, too. Reported-by: Mauro Carvalho Chehab <mchehab@kernel.org> Link: https://lore.kernel.org/r/3cd6b93b36b32ad6ae160931aaa00b20688e241a.1656759989.git.mchehab@kernel.org Link: https://lore.kernel.org/r/20220713104759.4365-2-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
Selections can be propagated via selections, while dependencies are not. Hence, consolidate selections under the SND_HDA_SCODEC_CS35L41 option. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220712153519.35692-4-andriy.shevchenko@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
ACPI_PTR() is more harmful than helpful. For example, in this case if CONFIG_ACPI=n, the ID table left unused which is not what we want. Instead of adding ifdeffery or attribute here and there, drop ACPI_PTR(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220712153519.35692-3-andriy.shevchenko@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
ACPI is needed only for functioning of this codec on some platforms, there is no compilation dependency, so make it optional Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220712153519.35692-2-andriy.shevchenko@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, which is a better coding practice. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220712153519.35692-1-andriy.shevchenko@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 12 Jul, 2022 3 commits
-
-
Mark Brown authored
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: The FSR (Firmware State Register) holds the ROM state information, it does not contain error information. The FSR itself is a bit more complicated as well as the state depends on the module currently in use. The error code from ROM or the status code from the firmware is located at the next register. Fix the handling of the FSR in order to provide usable and human readable (in most cases) report on the status and error.
-
Mark Brown authored
Merge series from Daniel Baluta <daniel.baluta@oss.nxp.com> Daniel Baluta <daniel.baluta@nxp.com>: From: Daniel Baluta <daniel.baluta@nxp.com> We need a way to send extra parameters to DSP firmware. In order to do this, we introduce ext_data array at the end of ipc_stream_params. With this new addition we can send compress parameters. This requires SOF ABI bump.
-
Mark Brown authored
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: By mistake a developer managed to create a 'corrupted' IPC4 firmware image which loaded fine to the DSP and after boot it sent an IPC reply before we would have received the FW_READY message. It turned out that the image was an IPC3 firmware and the IPC reply was the IPC3 FW_READY notification message which got understood as an IPC4 reply message due to the difference between the two IPC mechanism. This caused a NULL pointer dereference since the reply memory will be allocated after the FW_READY message. To make sure this will not bite again, skip any spurious reply messages before the FW_READY.
-