summaryrefslogtreecommitdiff
path: root/sound/soc/qcom
AgeCommit message (Collapse)Author
2026-02-02ASoC: qcom: q6asm: drop DSP responses for closed data streamsCédric Bellegarde
'Commit a354f030dbce ("ASoC: qcom: q6asm: handle the responses after closing")' attempted to ignore DSP responses arriving after a stream had been closed. However, those responses were still handled, causing lockups. Fix this by unconditionally dropping all DSP responses associated with closed data streams. Signed-off-by: Cédric Bellegarde <cedric.bellegarde@adishatz.org> Link: https://patch.msgid.link/20260102215225.609166-1-cedric.bellegarde@adishatz.org Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-06ASoC: nau8821: Fixes and driver cleanupMark Brown
Merge series from Cristian Ciocaltea <cristian.ciocaltea@collabora.com>: This series provides several fixes and cleanup patches for the Nuvoton NAU88L21 audio codec driver. Testing and validation has been performed on Valve Steam Deck.
2025-12-22ASoC: qcom: Constify few things in audioreach andMark Brown
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>: Several functions do not modify the pointed memory they receive, so marking them as pointers to const would serve as self-explanatory code. Also safer a bit.
2025-12-22ASoC / soc/qcom: Constify APR/GPR callback responseMark Brown
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>: This constifies the response data used for APR/GPR callbacks.
2025-12-22ASoC: qcom: audioreach: Constify function argumentsKrzysztof Kozlowski
Several functions receive pointers to parsed Audioreach topology (e.g. 'struct audioreach_container', 'struct audioreach_module') and they do not modify their contents, but copy their data to send to the ADSP. Constify the pointers for self-explanatory code (pointed memory is not modified by the function) and a bit safer code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20251219-b4-container-of-const-asoc-qcom-v2-5-05fd2ecc06fe@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: qcom: topology: Constify pointed snd_soc_tplg_dapm_widgetKrzysztof Kozlowski
Several functions in topology.c receive pointers to 'struct snd_soc_tplg_dapm_widget' and do not modify their contents. Constify the pointers for self-explanatory code (pointed memory is not modified by the function) and a bit safer code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20251219-b4-container-of-const-asoc-qcom-v2-4-05fd2ecc06fe@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: qcom: topology: Constify pointed DAPM widget structsKrzysztof Kozlowski
Few functions do not modify the pointed 'struct struct snd_soc_dapm_widget', so the pointers can be made as pointers to const for self-explanatory code (pointed memory is not modified by the function) and a bit safer code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20251219-b4-container-of-const-asoc-qcom-v2-3-05fd2ecc06fe@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: qcom: topology: Constify pointed ar control structsKrzysztof Kozlowski
audioreach_route_load() does not modify the pointed 'struct audioreach_module' and functions for connecting subgraphs do not change pointed 'struct snd_ar_control'. Constify the pointers for self-explanatory code (pointed memory is not modified by the function) and a bit safer code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20251219-b4-container-of-const-asoc-qcom-v2-2-05fd2ecc06fe@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: qcom: topology: Constify pointed topology and vendor structsKrzysztof Kozlowski
Several functions in topology.c receive pointers to 'struct snd_soc_tplg_vendor_array' and 'struct snd_soc_tplg_private', and do not modify their contents. Constify the pointers for self-explanatory code (pointed memory is not modified by the function) and a bit safer code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20251219-b4-container-of-const-asoc-qcom-v2-1-05fd2ecc06fe@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-19ASoC: qcom: Constify APR/GPR result structsKrzysztof Kozlowski
APR and GPR callbacks receive pointer to const response packet which holds the response result. That result should not be modified by callback, so make it pointer to const for code safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251130-asoc-apr-const-v1-4-d0833f3ed423@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-19ASoC: qcom: Constify GPR callback response dataKrzysztof Kozlowski
GPR bus driver calls each GPR client callback with pointer to the GPR response packet. The callbacks are not suppose to modify that response packet, so make it a pointer to const to document that expectation explicitly. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251130-asoc-apr-const-v1-3-d0833f3ed423@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-19ASoC: qcom: Constify APR callback response dataKrzysztof Kozlowski
APR bus driver calls each APR client callback with pointer to the APR response packet. The callbacks are not suppose to modify that response packet, so make it a pointer to const to document that expectation explicitly. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251130-asoc-apr-const-v1-1-d0833f3ed423@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17ASoC: qcom: audioreach: Add support for VI Sense moduleKrzysztof Kozlowski
VI Sense module in ADSP is responsible for feedback loop for measuring current and voltage of amplifiers, necessary for proper calibration of Speaker Protection algorightms. Implement parsing MODULE_ID_SPEAKER_PROTECTION_VI from Audioreach topology and sending it as command to the ADSP. Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20251217094602.55117-4-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17ASoC: qcom: audioreach: Add support for Speaker Protection moduleKrzysztof Kozlowski
Speaker Protection is capability of ADSP to adjust the gain during playback to different speakers and their temperature. This allows good playback without blowing the speakers up. Implement parsing MODULE_ID_SPEAKER_PROTECTION from Audioreach topology and sending it as command to the ADSP. Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20251217094602.55117-3-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-15ASoC: qcom: Fix confusing cleanup.hMark Brown
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>: Please, please stop ending cleanup.h patches for very simple code like: foo = kzalloc(); kfree(foo); return; ... *if you do not intend to read cleanup.h*. These changes are making simple code not necessarily simpler. But worse, if you do not read cleanup.h then you introduce actually undesired, error-prone and wrong style of having constructors with redundant values (= NULL). This is actually worse code. If you do not agree in declaration-in-place-of-use (fair!), then do not use cleanup.h. If you want to use cleanup.h, then please read cleanup.h before. This is second mixup I see recently around Qualcomm files.
2025-12-14ASoc: qcom: q6afe: use guards consistentlyJohan Hovold
A recent change switched to using guards for the port list lock but only modified two out of three functions where the lock is held. Convert also the third function for consistency while switching to a scoped guard in q6afe_port_get_from_id() for clarity. Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20251203105542.24765-3-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14ASoC: qcom: Minor readability improve with new linesKrzysztof Kozlowski
Variables with automatic cleanup are special because they do not follow standard rules of declaration at top of function (see cleanup.h), but on the other hand we always expect line break between top-function declarations and first instructions. Don't pretend automatic cleanup variables are part of top-level declaration to improve readability when variable is followed by nun-NULL check. No functional impact, only style. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251129-asoc-wrong-cleanup-h-can-people-stop-sending-this-without-reading-docs-v1-6-c38b06884e39@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14ASoC: qcom: audioreach: Fix confusing cleanup.h syntaxKrzysztof Kozlowski
Commit 88a5f8e628ef ("ASoc: qcom: audioreach: Use automatic cleanup of kfree()") did not make the code simpler but more complicated. Already simple code of allocation and free, without any error paths, got now declaration with one constructor followed by another allocation, which is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this potential interdependency problem the recommendation is to always define and assign variables in one statement and not group variable definitions at the top of the function when __free() is used." Code does not have a bug, but is less readable and uses discouraged coding practice, so fix that by moving declaration to the place of assignment. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251129-asoc-wrong-cleanup-h-can-people-stop-sending-this-without-reading-docs-v1-5-c38b06884e39@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14ASoC: qcom: q6afe: Fix confusing cleanup.h syntaxKrzysztof Kozlowski
Commit 55094e55ae36 ("ASoc: qcom: q6afe: Use automatic cleanup of kfree()") did not make the code simpler but more complicated. Already simple code of allocation and free, without any error paths, got now declaration with one constructor followed by another allocation, which is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this potential interdependency problem the recommendation is to always define and assign variables in one statement and not group variable definitions at the top of the function when __free() is used." Code does not have a bug, but is less readable and uses discouraged coding practice, so fix that by moving declaration to the place of assignment. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251129-asoc-wrong-cleanup-h-can-people-stop-sending-this-without-reading-docs-v1-4-c38b06884e39@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14ASoC: qcom: q6apm: Fix confusing cleanup.h syntaxKrzysztof Kozlowski
Commit 89cf2223ee7b ("ASoc: qcom: q6apm: Use automatic cleanup of kfree()") did not make the code simpler but more complicated. Already simple code of allocation and free, without any error paths, got now declaration with one constructor followed by another allocation, which is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this potential interdependency problem the recommendation is to always define and assign variables in one statement and not group variable definitions at the top of the function when __free() is used." Code does not have a bug, but is less readable and uses discouraged coding practice, so fix that by moving declaration to the place of assignment. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251129-asoc-wrong-cleanup-h-can-people-stop-sending-this-without-reading-docs-v1-3-c38b06884e39@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14ASoC: qcom: q6asm: Fix confusing cleanup.h syntaxKrzysztof Kozlowski
Commit 6e00112d31c8 ("ASoc: qcom: q6asm: Use automatic cleanup of kfree()") did not make the code simpler but more complicated. Already simple code of allocation and free, without any error paths, got now declaration with one constructor followed by another allocation, which is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this potential interdependency problem the recommendation is to always define and assign variables in one statement and not group variable definitions at the top of the function when __free() is used." Code does not have a bug, but is less readable and uses discouraged coding practice, so fix that by moving declaration to the place of assignment. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251129-asoc-wrong-cleanup-h-can-people-stop-sending-this-without-reading-docs-v1-2-c38b06884e39@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14ASoC: qcom: q6prm: Fix confusing cleanup.h syntaxKrzysztof Kozlowski
Commit de8e95773c48 ("ASoc: qcom: q6prm: Use automatic cleanup of kfree()") did not make the code simpler but more complicated. Already simple code of allocation and free, without any error paths, got now declaration with one constructor followed by another allocation, which is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this potential interdependency problem the recommendation is to always define and assign variables in one statement and not group variable definitions at the top of the function when __free() is used." Code does not have a bug, but is less readable and uses discouraged coding practice, so fix that by moving declaration to the place of assignment. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251129-asoc-wrong-cleanup-h-can-people-stop-sending-this-without-reading-docs-v1-1-c38b06884e39@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14ASoC: qcom: sdm845: set quaternary MI2S codec DAI to I2S formatRobert Oscilowski
We configure the codec DAI format for primary and secondary but not the quaternery MI2S path. Add the missing configuration to enable speaker codecs on the quaternary MI2S like the MAX9827 found on the OnePlus 6. Signed-off-by: Robert Oscilowski <drgitx@gmail.com> Signed-off-by: Casey Connolly <casey.connolly@linaro.org> Signed-off-by: David Heidelberg <david@ixit.cz> Reviewed-by: Alexey Klimov <alexey.klimov@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20251115-sdm845-quaternary-v3-1-c16bf19128ac@ixit.cz Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-03ASoc: qcom: q6afe: fix bad guard conversionJohan Hovold
A recent spinlock guard conversion used the wrong guard so that interrupts are no longer disabled while holding the port list lock. Based on a cursory look this appears to be safe currently, but it could cause a deadlock if one of these helpers are ever called in interrupt context. Fixes: 4b1edbb028fb ("ASoC: qcom: q6afe: Use guard() for spin locks") Cc: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251203105542.24765-2-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-17ASoC: qcom: sc7180: convert to snd_soc_dapm_xxx()Kuninori Morimoto
This patch converts below functions. dapm->dev -> snd_soc_dapm_to_dev() dapm->card -> snd_soc_dapm_to_card() dapm->component -> snd_soc_dapm_to_component() dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value() snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin() snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked() snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin() snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked() snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin() snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked() snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status() snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin() snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked() snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level() snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level() snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level() snd_soc_component_get_dapm() -> snd_soc_component_to_dapm() snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component() snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget() snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm() snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/87jyzxv23v.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-17ASoC: qcom: topology: convert to snd_soc_dapm_xxx()Kuninori Morimoto
This patch converts below functions. dapm->dev -> snd_soc_dapm_to_dev() dapm->card -> snd_soc_dapm_to_card() dapm->component -> snd_soc_dapm_to_component() dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value() snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin() snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked() snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin() snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked() snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin() snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked() snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status() snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin() snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked() snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level() snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level() snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level() snd_soc_component_get_dapm() -> snd_soc_component_to_dapm() snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component() snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget() snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm() snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/87ldkdv23z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-17ASoC: qcom: q6usb: convert to snd_soc_dapm_xxx()Kuninori Morimoto
This patch converts below functions. dapm->dev -> snd_soc_dapm_to_dev() dapm->card -> snd_soc_dapm_to_card() dapm->component -> snd_soc_dapm_to_component() dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value() snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin() snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked() snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin() snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked() snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin() snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked() snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status() snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin() snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked() snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level() snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level() snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level() snd_soc_component_get_dapm() -> snd_soc_component_to_dapm() snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component() snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget() snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm() snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/87ms4tv242.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-17ASoC: qcom: q6routing: convert to snd_soc_dapm_xxx()Kuninori Morimoto
This patch converts below functions. dapm->dev -> snd_soc_dapm_to_dev() dapm->card -> snd_soc_dapm_to_card() dapm->component -> snd_soc_dapm_to_component() dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value() snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin() snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked() snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin() snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked() snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin() snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked() snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status() snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin() snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked() snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level() snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level() snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level() snd_soc_component_get_dapm() -> snd_soc_component_to_dapm() snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component() snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget() snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm() snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/87o6p9v246.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-06ASoC: qcom: q6dsp: fixes and updatesMark Brown
Merge series from Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>: This patchset has 4 fixes and some enhancements to the Elite DSP driver support. Fixes includes - setting correct flags for expected behaviour of appl_ptr - fix closing of copp instances - fix buffer alignment. - fix state checks before closing asm stream Enhancements include: - adding q6asm_get_hw_pointer and ack callback support - simplify code via __free(kfree) mechanism. - use spinlock guards - few cleanups discovered during doing above 2. There is another set of updates comming soon, which will add support for early memory mapping and few more modules support in audioreach.
2025-11-05ASoC: qcom: q6asm: Use guard() for spin locksSrinivas Kandagatla
Clean up the code using guard() for spin locks. No functional changes, just cleanup. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-21-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm-dai: Use guard() for spin locksSrinivas Kandagatla
Clean up the code using guard() for spin locks. No functional changes, just cleanup. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-20-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6apm-dai: Use guard() for spin locksSrinivas Kandagatla
Clean up the code using guard() for spin locks. No functional changes, just cleanup. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-19-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6afe: Use guard() for spin locksSrinivas Kandagatla
Clean up the code using guard() for spin locks. No functional changes, just cleanup. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-18-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: q6asm: Use automatic cleanup of kfree()Srinivas Kandagatla
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-17-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: q6prm: Use automatic cleanup of kfree()Srinivas Kandagatla
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-16-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: q6apm: Use automatic cleanup of kfree()Srinivas Kandagatla
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-15-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: q6afe: Use automatic cleanup of kfree()Srinivas Kandagatla
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-14-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: q6adm: Use automatic cleanup of kfree()Srinivas Kandagatla
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-13-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: audioreach: Use automatic cleanup of kfree()Srinivas Kandagatla
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-12-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: audioreach: remove unused variablesSrinivas Kandagatla
remove unused variables in some of the audioreach functions. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-11-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm: set runtime correctly for each streamSrinivas Kandagatla
Both capture and playback can have different runtimes, so set them accordingly. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-10-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm-dai: use q6asm_get_hw_pointerSrinivas Kandagatla
make use of q6asm_get_hw_pointer to get the current hardware read/write pointer and remove any additional code that does calculate this manually. As this is redundant and prone to errors. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-9-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm: add q6asm_get_hw_pointerSrinivas Kandagatla
Currently q6asm-dai is performing an extra layer of calculation on the hw_ptr, which is always prone to errors and redundant. q6asm already has tokens to indentify the pointer pointers which an be used to get the hw_ptr and this is more accurate then doing the artificial calculation at upper layers. Add helper function q6asm_get_hw_pointer() to get this hw_ptr. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-8-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm-dai: schedule all available frames to avoid dsp under-runsSrinivas Kandagatla
With the existing code, we are only setting up one period at a time, in a ping-pong buffer style. This triggers lot of underruns in the dsp leading to jitter noise during audio playback. Fix this by scheduling all available periods, this will ensure that the dsp has enough buffer feed and ultimatley fixing the underruns and audio distortion. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-7-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm: handle the responses after closingSrinivas Kandagatla
For record path, multiple read requests are queued to dsp in advance. However when data stream is closed, the pending read requests are rejected by the dsp and a response is sent to the driver, this case is not handled in the driver resulting in errors like below q6asm-dai ab00000.remoteproc:glink-edge:apr:service@7:dais: command[0x10dac] not expecting rsp q6asm-dai ab00000.remoteproc:glink-edge:apr:service@7:dais: command[0x10dac] not expecting rsp q6asm-dai ab00000.remoteproc:glink-edge:apr:service@7:dais: command[0x10dac] not expecting rsp This is same for both write and eos. Fix this by allowing ASM_DATA_CMD_READ_V2, ASM_DATA_CMD_EOS and ASM_DATA_CMD_WRITE_V2 as expected response. Reported-by: Martino Facchin <m.facchin@arduino.cc> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-6-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm-dai: perform correct state check before closingSrinivas Kandagatla
Do not stop a q6asm stream if its not started, this can result in unnecessary dsp command which will timeout anyway something like below: q6asm-dai ab00000.remoteproc:glink-edge:apr:service@7:dais: CMD 10bcd timeout Fix this by correctly checking the state. Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-5-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: qdsp6: q6asm-dai: set 10 ms period and buffer alignment.Srinivas Kandagatla
DSP expects the periods to be aligned to fragment sizes, currently setting up to hw constriants on periods bytes is not going to work correctly as we can endup with periods sizes aligned to 32 bytes however not aligned to fragment size. Update the constriants to use fragment size, and also set at step of 10ms for period size to accommodate DSP requirements of 10ms latency. Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-4-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6adm: the the copp device only during last instanceSrinivas Kandagatla
A matching Common object post processing instance is normally resused across multiple streams. However currently we close this on DSP even though there is a refcount on this copp object, this can result in below error. q6routing ab00000.remoteproc:glink-edge:apr:service@8:routing: Found Matching Copp 0x0 qcom-q6adm aprsvc:service:4:8: cmd = 0x10325 return error = 0x2 q6routing ab00000.remoteproc:glink-edge:apr:service@8:routing: DSP returned error[2] q6routing ab00000.remoteproc:glink-edge:apr:service@8:routing: Found Matching Copp 0x0 qcom-q6adm aprsvc:service:4:8: cmd = 0x10325 return error = 0x2 q6routing ab00000.remoteproc:glink-edge:apr:service@8:routing: DSP returned error[2] qcom-q6adm aprsvc:service:4:8: cmd = 0x10327 return error = 0x2 qcom-q6adm aprsvc:service:4:8: DSP returned error[2] qcom-q6adm aprsvc:service:4:8: Failed to close copp -22 qcom-q6adm aprsvc:service:4:8: cmd = 0x10327 return error = 0x2 qcom-q6adm aprsvc:service:4:8: DSP returned error[2] qcom-q6adm aprsvc:service:4:8: Failed to close copp -22 Fix this by addressing moving the adm_close to copp_kref destructor callback. Fixes: 7b20b2be51e1 ("ASoC: qdsp6: q6adm: Add q6adm driver") Cc: Stable@vger.kernel.org Reported-by: Martino Facchin <m.facchin@arduino.cc> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-3-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6apm-dai: set flags to reflect correct operation of appl_ptrSrinivas Kandagatla
Driver does not expect the appl_ptr to move backward and requires explict sync. Make sure that the userspace does not do appl_ptr rewinds by specifying the correct flags in pcm_info. Without this patch, the result could be a forever loop as current logic assumes that appl_ptr can only move forward. Fixes: 3d4a4411aa8b ("ASoC: q6apm-dai: schedule all available frames to avoid dsp under-runs") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-30ASoC: qcom: sdw: fix memory leakMark Brown
Merge series from Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>: For some reason we endedup allocating sdw_stream_runtime for every cpu dai, this has two issues. 1. we never set snd_soc_dai_set_stream for non soundwire dai, which means there is no way that we can free this, resulting in memory leak 2. startup and shutdown callbacks can be called without hw_params callback called. This combination results in memory leak because machine driver sruntime array pointer is only set in hw_params callback. All the machine drivers have these memory leaks, so cleanup the mess and make them use common helpers from sdw.c This patch series fix the issue, and while we are at it, it also remove some redundant code from machine drivers.