aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-04-04ASoC: Intel: Skylake: Remove soc-topology ABI v4 supportCezary Rojewski2-243/+0
The only known users are Chromebook configurations. Starting from kernel v5.4, all of them are making use of soc-topology ABI v5. Cc: Curtis Malainey <[email protected]> Cc: Łukasz Majczak <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: SOF: imx: stop using the imx8_*_clocks APIMark Brown5-103/+53
Merge series from Laurentiu Mihalcea <[email protected]>: The imx8_*_clocks API requires keeping track of all of the clocks used by the IMX SOF driver via an array. This is unnecessary and doesn't scale well. As such, remove it altogether and replace it with devm_clk_bulk_get_all() and friends.
2024-04-04ASoC: nau8822: Remove unused member from structFrancesco Dolcini1-1/+0
Remove unused mclk_idx struct member. Signed-off-by: Francesco Dolcini <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: codecs: rk3308: fix building without CONFIG_OFArnd Bergmann1-1/+1
The newly added codec has an extraneous of_match_ptr() annotation for the ID table: sound/soc/codecs/rk3308_codec.c:956:34: error: 'rk3308_codec_of_match' defined but not used [-Werror=unused-const-variable=] 956 | static const struct of_device_id rk3308_codec_of_match[] = { Remove it to avoid introducing a warning when -Wunused-const-variable gets enabled by default: Fixes: 4ed0915f5bc4 ("ASoC: codecs: Add RK3308 internal audio codec driver") Signed-off-by: Arnd Bergmann <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ALSA: cirrus: Tidy up of firmware control read/writeMark Brown4-45/+67
Merge series from Richard Fitzgerald <[email protected]>: This set of patches factors out some repeated code to clean up firmware control read/write functions, and removes some redundant control notification code. base-commit: f193957b0fbbba397c8bddedf158b3bf7e4850fc
2024-04-03ASoC: codecs: rk3308: fix build warning without OFMark Brown2-1/+2
Merge series from Luca Ceresoli <[email protected]>: This small series fixes a build warning reported by kernel test robot <[email protected]> and improves the Kconfig entry. Signed-off-by: Luca Ceresoli <[email protected]> --- Changes in v2: - Replaced v1 implementation with __maybe_unused - Added patch to depend on || COMPILE_TEST - Link to v1: https://lore.kernel.org/r/20240329-rk3308-audio-codec-fix-warning-v1-1-b9d177fcd6c9@bootlin.com --- Luca Ceresoli (2): ASoC: codecs: rk3308: fix "defined but not used" warning on !OF ASoC: codecs: rk3308: depend on ARM64 || COMPILE_TEST sound/soc/codecs/Kconfig | 1 + sound/soc/codecs/rk3308_codec.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) --- base-commit: 4ed0915f5bc4bcc81bca783a5b984f3d81e9764e change-id: 20240329-rk3308-audio-codec-fix-warning-51bb572ebd96 Best regards, -- Luca Ceresoli <[email protected]>
2024-04-03ASoC: SOF: Intel: mtl/lnl: Improve firmware boot stateMark Brown7-29/+189
Merge series from Peter Ujfalusi <[email protected]>: This series improves the firmware/boot state handling which will allow failed IMR boot recovery and human readable boot failure decoding. Additionally a new debugfs file is added to force a purge/clean boot of the DSP for developers.
2024-04-03ALSA: hda: hda_cs_dsp_ctl: Remove notification of driver writeSimon Trimmer1-8/+0
Any control that the driver is updating should be marked as SYSTEM and therefore will not have an ALSA control to notify. Signed-off-by: Simon Trimmer <[email protected]> Signed-off-by: Richard Fitzgerald <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: wm_adsp: Remove notification of driver writeSimon Trimmer1-7/+1
Any control that the driver is updating should be marked as SYSTEM and therefore will not have an ALSA control to notify. Signed-off-by: Simon Trimmer <[email protected]> Signed-off-by: Richard Fitzgerald <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ALSA: hda: hda_cs_dsp_ctl: Use cs_dsp_coeff_lock_and_[read|write]_ctrl()Simon Trimmer1-12/+2
Using the cs_dsp_coeff_lock_and_[read|write]_ctrl() wrappers tidies the calling functions as it does not need to manage the DSP pwr_lock. Signed-off-by: Simon Trimmer <[email protected]> Signed-off-by: Richard Fitzgerald <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: wm_adsp: Use cs_dsp_coeff_lock_and_[read|write]_ctrl()Simon Trimmer1-18/+6
Using the cs_dsp_coeff_lock_and_[read|write]_ctrl() wrappers tidies the calling functions as it does not need to manage the DSP pwr_lock. Signed-off-by: Simon Trimmer <[email protected]> Signed-off-by: Richard Fitzgerald <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03firmware: cs_dsp: Add locked wrappers for coeff read and writeSimon Trimmer2-0/+58
It is a common pattern for functions to take and release the DSP pwr_lock over the cs_dsp calls to read and write firmware controls. Add wrapper functions to do this sequence so that the calling code can be simplified to a single function call.. Signed-off-by: Simon Trimmer <[email protected]> Signed-off-by: Richard Fitzgerald <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Merge up fixesMark Brown58-249/+560
Some of these, particularly the wm_adsp one in the immediate case, are needed as a basis for new work.
2024-04-03ASoC: Merge up left over v6.8 fixMark Brown1-1/+2
This v6.8 change didn't make it into the release, send it as a fix for v6.9.
2024-04-03ASoC: SOF: imx: remove imx8_*_clocks APILaurentiu Mihalcea2-33/+0
Since the i.MX drivers no longer use the imx8_*_clocks API this can be removed. Signed-off-by: Laurentiu Mihalcea <[email protected]> Reviewed-by: Iuliana Prodan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: SOF: imx: drop usage of the imx8_*_clocks APILaurentiu Mihalcea3-70/+53
Currently, the driver has to keep track of all the clocks it uses via an array of "struct clk_bulk_data", which doesn't scale well and is unnecessary. As such, replace the usage of the imx8_*_clocks with "devm_clk_bulk_get_all()" and friends. Signed-off-by: Laurentiu Mihalcea <[email protected]> Reviewed-by: Iuliana Prodan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: codecs: rk3308: depend on ARM64 || COMPILE_TESTLuca Ceresoli1-0/+1
This codec is only known to exist in the RK3308 ARM64 SoC, so depend on it except for compile test cases. Note that the driver won't probe without CONFIG_OF, but ARM64 selects OF already so it is not needed. Suggested-by: Mark Brown <[email protected]> Signed-off-by: Luca Ceresoli <[email protected]> Link: https://msgid.link/r/20240403-rk3308-audio-codec-fix-warning-v2-2-816bae4c1dc5@bootlin.com Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: codecs: rk3308: fix "defined but not used" warning on !OFLuca Ceresoli1-1/+1
Building with CONFIG_OF=n triggers: warning: 'rk3308_codec_of_match' defined but not used [-Wunused-const-variable=] warning: unused variable 'rk3308_codec_of_match' [-Wunused-const-variable] Even though OF is needed for probing, fix by declaring as __maybe_unused to still allow building on non-OF configurations for build testing. Fixes: 9fdd7b45da18 ("arm64: defconfig: enable Rockchip RK3308 internal audio codec driver") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Luca Ceresoli <[email protected]> Link: https://msgid.link/r/20240403-rk3308-audio-codec-fix-warning-v2-1-816bae4c1dc5@bootlin.com Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: SOF: Intel: mtl: Correct the mtl_dsp_dump outputPeter Ujfalusi1-11/+5
The ROM/firmware state handling has changed between CAVS and ACE architecture: CAVS: ROM and firmware uses the SRAM window for the state and status/error code reporting ACE: ROM code is using two registers to report the state and error while the firmware is using the SRAM window to report states and status/error codes. Use the generic hda_dsp_get_state() to decode ROM state and error codes and print out the firmware state and status/error code only if the SRAM window is accessible - the firmware is booted and the Status readout is not 0xffffffff. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Liam Girdwood <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: SOF: Intel: hda-dsp/mtl: Add support for ACE ROM state codesPeter Ujfalusi3-6/+112
The ROM state codes differ between CAVS and ACE architecture, there is a slight overlap. Add the ACE related state defines to mtl.h, introduce new table and use it on case the function is called when running on ACE architecture. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Liam Girdwood <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: SOF: Intel: mtl: Implement firmware boot state checkPeter Ujfalusi1-5/+32
With the corrected rom_status_reg values we can now add a check for target boot status for firmware booting. With the check now we can identify failed firmware boots (IMR boots) and we can use the fallback to purge boot the DSP. Fixes: 064520e8aeaa ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)") Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Liam Girdwood <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: SOF: Intel: mtl: Disable interrupts when firmware boot failedPeter Ujfalusi1-0/+1
In case of error during the firmware boot we need to disable the interrupts which were enabled as part of the boot sequence. Fixes: 064520e8aeaa ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)") Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Liam Girdwood <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: SOF: Intel: lnl: Correct rom_status_regPeter Ujfalusi2-1/+17
ACE2 architecture changed the place where the ROM updates the status code from the shared SRAM window (and HFFLGP1QW0 in ACE1) to HFDSC register for the status and HFDEC (HFDSC + 4) for the error code. The rom_status_reg is not used on LNL because it was wrongly assigned based on older platform convention (SRAM window) and it was giving inconsistent readings. Add new header file for lnl specific register definitions. Fixes: 64a63d9914a5 ("ASoC: SOF: Intel: LNL: Add support for Lunarlake platform") Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Liam Girdwood <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: SOF: Intel: mtl: Correct rom_status_regPeter Ujfalusi2-4/+4
ACE1 architecture changed the place where the ROM updates the status code from the shared SRAM window to HFFLGP1QW0 register for the status and HFFLGP1QW0 + 4 for the error code. The rom_status_reg is not used on MTL because it was wrongly assigned based on older platform convention (SRAM window) and it was giving inconsistent readings. Fixes: 064520e8aeaa ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)") Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Liam Girdwood <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: SOF: Intel: hda: Create debugfs file to force a clean DSP bootPeter Ujfalusi4-3/+19
When IMR boot is supported on a platform it is always going to be used to boot the DSP unless some catastrophic event happens. There is no way for a developer to force a clean DSP boot without removing and re-inserting the modules. Create a 'skip_imr_boot' debugfs file which can be used to force the next DSP boot as clean (prune) boot. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Intel: avs: rt5682: Constify card_headset_pinsAmadeusz Sławiński1-1/+1
card_headset_pins is never modified, mark it const. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Intel: avs: rt5663: Constify card_headset_pinsAmadeusz Sławiński1-1/+1
card_headset_pins is never modified, mark it const. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Intel: avs: rt298: Constify card_headset_pinsAmadeusz Sławiński1-1/+1
card_headset_pins is never modified, mark it const. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Intel: avs: rt286: Constify card_headset_pinsAmadeusz Sławiński1-1/+1
card_headset_pins is never modified, mark it const. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Intel: avs: rt274: Constify card_headset_pinsAmadeusz Sławiński1-1/+1
card_headset_pins is never modified, mark it const. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Intel: avs: nau8825: Constify card_headset_pinsAmadeusz Sławiński1-1/+1
card_headset_pins is never modified, mark it const. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Intel: avs: es8336: Constify card_headset_pinsAmadeusz Sławiński1-1/+1
card_headset_pins is never modified, mark it const. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Intel: avs: hdaudio: Constify probing_linkAmadeusz Sławiński1-1/+1
probing_link is passed to devm_kmemdup, and is never modified, may as well mark it const. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Intel: avs: Use devm_kstrdup_constAmadeusz Sławiński2-5/+5
FW name is constant and we just duplicate it, use const variant of devm_kstrdup to possibly save a bit of memory. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: Intel: avs: hdaudio: Use devm_kstrdup_constAmadeusz Sławiński1-2/+2
HDA codec name is constant and we just duplicate it, use const variant of devm_kstrdup to possibly save a bit of memory. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-03ASoC: rsnd: reg cleanupMark Brown11-344/+247
Merge series from Kuninori Morimoto <[email protected]>: These are Renesas Sound driver cleanups for Gen3/Gen4.
2024-04-02ASoC: SOF: cppcheck fixes and debugfs additionMark Brown4-2/+11
Merge series from Pierre-Louis Bossart <[email protected]>: Small changes with 3 cppcheck fixes and the firmware version now visible with debugfs instead of only via dmesg logs.
2024-04-02ASoC: SOF: Intel: improve SoundWire support forMark Brown9-127/+232
Merge series from Pierre-Louis Bossart <[email protected]>: This patchset contains important updates for SoundWire support. We initially implemented support for multiple amplifiers on different links using a single HDaudio DMA transfer. To align with the other OS, the 'aggregation' is now supported by the firmware. This change in directions has kernel impacts, since we now have multiple HDaudio DMAs to program and start, but since there are no platforms released so far there's no end-user impact. In addition, the behavior in case of xruns is improved by clearing the PCM states and better handling of the hw_free case. Note that the hw_free support will compile but will only be functional with the companion patch "soundwire: intel: add intel_free_stream() back" already applied in the SoundWire tree.
2024-04-02ASoC: Use snd_ctl_find_id_mixer() instead ofMark Brown5-17/+223
Merge series from Richard Fitzgerald <[email protected]>: The first two patches change snd_soc_card_get_kcontrol() to use the core snd_ctl_find_id_mixer() functionality instead of open-coding its own list walk. The last patch adds a KUnit test for this, which was tested on the original and modified code.
2024-04-02ASoC: codecs: ES8326: solve some hp issues andMark Brown2-17/+22
Merge series from Zhang Yi <[email protected]>: We solved some issues related to headphone detection.And for using the same configuration in different power conditions,we modified the clock table
2024-04-02ASoC: dt-bindings: fsl-asoc-card: convert to YAMLShengjiu Wang2-117/+195
Convert the fsl-asoc-card binding to YAML. When testing dtbs_check, found below compatible strings are not listed in document: fsl,imx-sgtl5000 fsl,imx53-cpuvo-sgtl5000 fsl,imx51-babbage-sgtl5000 fsl,imx53-m53evk-sgtl5000 fsl,imx53-qsb-sgtl5000 fsl,imx53-voipac-sgtl5000 fsl,imx6-armadeus-sgtl5000 fsl,imx6-rex-sgtl5000 fsl,imx6-sabreauto-cs42888 fsl,imx6-wandboard-sgtl5000 fsl,imx6dl-nit6xlite-sgtl5000 fsl,imx6q-ba16-sgtl5000 fsl,imx6q-nitrogen6_max-sgtl5000 fsl,imx6q-nitrogen6_som2-sgtl5000 fsl,imx6q-nitrogen6x-sgtl5000 fsl,imx6q-sabrelite-sgtl5000 fsl,imx6q-sabresd-wm8962 fsl,imx6q-udoo-ac97 fsl,imx6q-ventana-sgtl5000 fsl,imx6sl-evk-wm8962 fsl,imx6sx-sdb-mqs fsl,imx6sx-sdb-wm8962 fsl,imx7d-evk-wm8960 karo,tx53-audio-sgtl5000 tq,imx53-mba53-sgtl5000 So add them in yaml file to pass the test. Also correct the 'dai-format' to 'format' in document. For 'audio-routing', the items are not listed. Because this fsl-asoc-card is generic driver, which supports several codecs, if list all the items, there will be a long list. Signed-off-by: Shengjiu Wang <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-02ASoC: SOF: ipc4-topology: Save the ALH DAI index during hw_paramsRanjani Sridharan3-2/+12
The node_id for multi-gateway ALH DAI's get overwritten with the group_id during the DAI copier's ipc_prepare op. So, save the ALH dai_index during the BE DAI hw_params in the dai_index field of struct ipc4_copier and use that to set the device ID in the configuration blob. This will avoid errors during copier init after an xrun. Note that the dai_index is typically set in topology for DMIC/SSP, but it's not used for ALH. Reclaiming this dai_index field to store the node_id does not generate a conflict with topology-defined values. Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-02ASoC: SOF: pcm: reset all PCM sources in case of xrunsPierre-Louis Bossart1-2/+13
With the delayed stops, the xrun handling is problematic: the applications expects everything to be reset but the firmware and DMA are still in a PAUSED state. This patch makes sure the prepare while pending_stop is set is special-cased. Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Co-developed-by: Ranjani Sridharan <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-02ASoC: SOF: pcm: add pending_stop state variablePierre-Louis Bossart3-0/+13
Add a state variable to keep track of delayed stops, in case pcm_ops->platform_stop_during_hw_free is set. This patch should be iso-functionality, possibly removing no-op cases. The main purpose of this new state variable is to prepare a follow-up patch to reset all PCM and DMAs in case of stop/prepare xrun sequences. Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-02ASoC: SOF: pcm: simplify sof_pcm_hw_free() with helperPierre-Louis Bossart1-29/+3
The same sequence is used twice, use common helper. Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-02ASoC: SOF: sof-audio: revisit sof_pcm_stream_free() error handling and logsPierre-Louis Bossart1-8/+20
For some reason the existing code stops on the first error, which potentially leaves the DMA and widgets in a weird state. Change to free-up all resources even in case of errors. Also add a more consistent error handling and logs, with the first error code returned to the caller. Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-02ASoC: SOF: Intel: hda: Clear Soundwire node ID during BE DAI hw_freeRanjani Sridharan2-4/+24
When an xrun happens, the BE DAI hw_params doesn't get invoked before the stream restarts with a prepare. In this case, clearing the node ID when the DAI widget is freed and unprepared will result in an error when it is re-initialized. In order to avoid this, move the code to clear the node ID to the BE DAI hw_free op to keep it balanced with the BE DAI hw_params. Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-02ASoC: SOF: Intel: hda: move helper to static inlinePierre-Louis Bossart2-8/+8
To allow using widget_to_sdev() in other files, move it as static inline in shared header file. Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-02ASoC: SOF: IPC4: extend dai_data with node_idPierre-Louis Bossart4-2/+9
The node_id value needs to be handled specifically for ALH. Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-02ASoC: SOF: Intel: hda: extend signature of sdw_hda_dai_hw_params()Pierre-Louis Bossart3-3/+6
Add intel_alh_id to set the expected gateway node_id in a follow-up patch. Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>