aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-07-15ACPI: utils: Add api to read _SUB from ACPIStefan Binding2-0/+44
Add a wrapper function to read the _SUB string from ACPI. Signed-off-by: Stefan Binding <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-15Merge tag 'asoc-fix-v5.19-rc4-2' of ↵Takashi Iwai1-129/+31
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Drop Rockchip BCLK management for v5.19 As covered in the second revert commit in this pull request the version of the BCLK muxing that's in v5.19 is causing issues, let's just revert it and wait for the more complete support in v5.20 instead.
2022-07-15ALSA: bcd2000: Fix a UAF bug on the error path of probingZheyu Ma1-1/+2
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: b47a22290d58 ("ALSA: MIDI driver for Behringer BCD2000 USB device") Signed-off-by: Zheyu Ma <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-14ASoC: Merge up revert of v5.19 version of the rockchip BCLK managementMark Brown0-0/+0
Needed for further development.
2022-07-14ASoC: rsnd: care default case on rsnd_ssiu_busif_err_irq_ctrl()Kuninori Morimoto1-0/+2
Before, ssiu.c didn't care SSI5-8, thus, commit b1384d4c95088d0 ("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 <[email protected]> Reported-by: Nishiyama Kunihiko <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-14ASoC: SOF: ipc-msg-injector: fix copy in sof_msg_inject_ipc4_dfs_write()Dan Carpenter1-17/+12
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: 066c67624d8c ("ASoC: SOF: ipc-msg-injector: Add support for IPC4 messages") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/Ysg1tB2FKLnRMsel@kili Signed-off-by: Mark Brown <[email protected]>
2022-07-14ASoC: rockchip-i2s: Undo BCLK pinctrl changesMark Brown1-132/+31
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: 26b9f2fa7b1c ("ASoC: rockchip: i2s: Fix NULL pointer dereference when pinctrl is not found") Fixes: a5450aba737d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-14ALSA: hda: cs35l41: Support Speaker ID for laptopsStefan Binding2-9/+166
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 <[email protected]> Signed-off-by: Vitaly Rodionov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-14ALSA: hda: cs35l41: Support multiple load paths for firmwareStefan Binding1-6/+46
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 <[email protected]> Signed-off-by: Vitaly Rodionov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-14ALSA: hda: cs35l41: Support reading subsystem id from ACPIStefan Binding1-0/+36
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 <[email protected]> Signed-off-by: Vitaly Rodionov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-14ALSA: hda: cs35l41: Save Subsystem ID inside CS35L41 DriverStefan Binding2-0/+4
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 <[email protected]> Signed-off-by: Vitaly Rodionov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-14ALSA: hda: cs35l41: Add initial DSP support and firmware loadingVitaly Rodionov4-1/+269
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 <[email protected]> Signed-off-by: Vitaly Rodionov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-14ALSA: hda: cs35l41: Save codec object inside component structStefan Binding4-0/+4
This is required for ALSA control support. Signed-off-by: Stefan Binding <[email protected]> Signed-off-by: Vitaly Rodionov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-14ALSA: hda: hda_cs_dsp_ctl: Add apis to write the controls directlyStefan Binding2-0/+43
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 <[email protected]> Signed-off-by: Vitaly Rodionov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-14ALSA: hda: hda_cs_dsp_ctl: Add Library to support CS_DSP ALSA controlsStefan Binding5-0/+233
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 <[email protected]> Signed-off-by: Vitaly Rodionov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-14ALSA: usb-audio: Use atomic_try_cmpxchg in ep_state_updateUros Bizjak1-1/+1
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ASoC/SoundWire: Intel: add sdw BE dai triggerMark Brown5-4/+23
Merge series from Bard Liao <[email protected]>: For SOF IPC4, we need to set pipeline state in BE DAI trigger.
2022-07-13ASoC: SOF: Intel: add trigger callback into sdw_callbackBard Liao3-4/+13
For IPC4, we need to set pipeline state in BE DAI trigger. Signed-off-by: Bard Liao <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-13soundwire: Intel: add trigger callbackBard Liao2-0/+10
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 <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Acked-by: Vinod Koul <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-13ASoC: mt6359: Fix refcount leak bugLiang He2-0/+2
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: 683530285316 ("ASoC: mt6359: fix failed to parse DT properties") Fixes: eef07b9e0925 ("ASoC: mediatek: mt6359: add MT6359 accdet jack driver") Signed-off-by: Liang He <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-13ASoC: amd: fix Jadeite kconfig warning and build errorsRandy Dunlap1-1/+1
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: f94fa8405801 ("ASoC: amd: enable machine driver build for Jadeite platform") Signed-off-by: Randy Dunlap <[email protected]> Cc: Vijendar Mukunda <[email protected]> Cc: Mark Brown <[email protected]> Cc: [email protected] Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-13ASoc: audio-graph-card2: Fix refcount leak bug in __graph_get_type()Liang He1-10/+25
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: c8c74939f791 ("ASoC: audio-graph-card2: add Multi CPU/Codec support") Signed-off-by: Liang He <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-13ASoC: amd: Fix error pointer dereferenceDan Carpenter1-1/+0
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: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/Ys2IRPHWGIwuVs21@kili Signed-off-by: Mark Brown <[email protected]>
2022-07-13ALSA: core: Fix missing return value comments for kernel docsTakashi Iwai5-2/+18
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/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: memalloc: Fix missing return value comments for kernel docsTakashi Iwai1-1/+9
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/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: control: Fix missing return value comments for kernel docsTakashi Iwai1-2/+14
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/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: compress: Fix kernel doc warningsTakashi Iwai3-4/+8
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/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: dmaengine: Fix missing return value comments for kernel docsTakashi Iwai2-10/+22
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/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: pcm: Fix missing return value comments for kernel docsTakashi Iwai4-2/+62
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/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: compress: Enable kernel doc markers for some functionsTakashi Iwai1-2/+3
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 <[email protected]> Link: https://lore.kernel.org/r/3cd6b93b36b32ad6ae160931aaa00b20688e241a.1656759989.git.mchehab@kernel.org Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptopMeng Tang1-0/+1
The headset on this machine is not defined, after applying the quirk ALC256_FIXUP_ASUS_HEADSET_MIC, the headset-mic works well Signed-off-by: Meng Tang <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc221Meng Tang1-0/+12
On a HP 288 Pro G2 MT (X9W02AV), the front mic could not be detected. In order to get it working, the pin configuration needs to be set correctly, and the ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE fixup needs to be applied. Signed-off-by: Meng Tang <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: hda/realtek: fix mute/micmute LEDs for HP machinesJeremy Szu1-0/+4
The HP ProBook 440/450 G9 and EliteBook 640/650 G9 have multiple motherboard design and they are using different subsystem ID of audio codec. Add the same quirk for other MBs. Signed-off-by: Jeremy Szu <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: hda: cs35l41: Consolidate selections under SND_HDA_SCODEC_CS35L41Andy Shevchenko1-4/+2
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: hda: cs35l41: Drop wrong use of ACPI_PTR()Andy Shevchenko2-10/+6
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: hda: cs35l41: Allow compilation test on non-ACPI configurationsAndy Shevchenko1-2/+2
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-13ALSA: hda: cs35l41: Don't dereference fwnode handleAndy Shevchenko1-1/+1
Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, which is a better coding practice. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2022-07-12ASoC: SOF: Intel: hda: Correct Firmware State Register useMark Brown2-20/+190
Merge series from Peter Ujfalusi <[email protected]>: 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.
2022-07-12Extend ipc stream parameters sent to DSPMark Brown3-27/+54
Merge series from Daniel Baluta <[email protected]> Daniel Baluta <[email protected]>: From: Daniel Baluta <[email protected]> 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.
2022-07-12ASoC: SOF: Intel: Do not process IPC reply before firmware bootMark Brown3-34/+62
Merge series from Peter Ujfalusi <[email protected]>: 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.
2022-07-12ASoC: SOF: Intel: hda-dai: No need to decouple host/link DMA twiceMark Brown1-8/+2
Merge series from Peter Ujfalusi <[email protected]>: There is no need to decouple a decoupled stream twice. Keep the decoupling in hda_link_stream_assign() only as it is going to be executed in all cases. Drop the outdated comment from hda_link_dma_hw_params() as well since the code has changed around it.
2022-07-12ASoC: SOF: ipc3-topology: Prevent double freeing of ipc_control_data via ↵Peter Ujfalusi1-0/+1
load_bytes We have sanity checks for byte controls and if any of the fail the locally allocated scontrol->ipc_control_data is freed up, but not set to NULL. On a rollback path of the error the higher level code will also try to free the scontrol->ipc_control_data which will eventually going to lead to memory corruption as double freeing memory is not a good thing. Fixes: b5cee8feb1d4 ("ASoC: SOF: topology: Make control parsing IPC agnostic") Reported-by: Seppo Ingalsuo <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Seppo Ingalsuo <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-12ASoC: SOF: sof-client-probes: Only load the driver if IPC3 is usedPeter Ujfalusi1-0/+4
The current implementation of probes only supports IPC3 and should not be loaded for other IPC implementation. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-12ASoC: SOF: Intel: hda: Use cold/purge boot after firmware crashMark Brown3-4/+14
Merge series from Peter Ujfalusi <[email protected]>: In case of a firmware crash we force the DSP to be powered down and rebooted. To make sure that the next boot is going to be clean, force the boot process to skip the IMR booting and re-download the firmware.
2022-07-12uapi: sof: abi: Bump SOF ABI for ext_data_lengthDaniel Baluta1-1/+1
Add new field to sof_ipc_stream_params in order to extend stream params struct with extended data to store compress parameters. Older kernel will still work this as they ext_data_length will always be zero. Signed-off-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-12ASoC: SOF: compress: Prevent current kernel running with older FWDaniel Baluta1-0/+11
After introducing extended parameters we need to forbid older firmware versions to run with the current and future kernel versions. Although in theory the communication protocol will still work the semantics at application level are undefined. So, prevent this by disallowing older firmwares to run with newer kernels. Signed-off-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-12ASoC: SOF: Copy compress parameters into extended dataDaniel Baluta2-6/+17
Allocate memory at the end of sof_ipc_stream_params to store snd_compr_params in order to be sent them to SOF firmware. This will help firmware correctly configure codecs parameters. Notice, that we use 2 bytes from the reserved pool in order to store the extended data length. This is compatible with older FWs where there was no extended data. Signed-off-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-12ASoC: SOF: compress: Dynamically allocate pcm params structDaniel Baluta1-24/+29
We need to extend sof_ipc_pcm_parmas with additional data in order to send compress_params to SOF FW. The extensions will be done at runtime so we need to dynamically allocate pcm object of type struct sof_ipc_pcm_params. Signed-off-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-12ASoC: SOF: Intel: hda-dai: Do snd_hdac_ext_stream_decouple() only oncePeter Ujfalusi1-7/+2
Call snd_hdac_ext_stream_decouple_locked() unconditionally in hda_link_stream_assign(), the snd_hdac_ext_stream_decouple_locked() have internal checks to avoid re-configuring. There is no need to call snd_hdac_ext_stream_decouple() via hda_link_dma_params() as the stream must have been set to decoupled when it got assigned (even if it used local condition to call snd_hdac_ext_stream_decouple_locked()). Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-12ASoC: SOF: Intel: hda-dai: Drop misleading comment regarding dma_dataPeter Ujfalusi1-1/+0
The comment in hda_link_dma_hw_params() is no longer valid as the dma_data is set to NULL at system suspend as well. Instead of rewording the comment to state the obvious: try to take the hext_stream from the dma_data and if it is not set then assign a new one and store it as dma_data. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>