summaryrefslogtreecommitdiff
path: root/sound/soc
AgeCommit message (Collapse)AuthorFilesLines
2026-01-05ASoC: nau8821: Drop superfluous return statementCristian Ciocaltea1-3/+1
Simplify error handling in nau8821_enable_jack_detect() by removing the unnecessary return after logging the request irq message. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://patch.msgid.link/20251231-nau8821-cleanup-v1-4-6b0b76cbbb64@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: nau8821: Cancel pending work before suspendCristian Ciocaltea1-0/+4
A jack detection work that is unscheduled or in progress while executing the suspend handler could trigger a race condition. Ensure state consistency by cancelling any pending work or wait for its execution to complete before processing the suspend. Since driver (re)enables both insert and eject interrupts on resume, there is no risk to miss the related jack events. Therefore, flush_delayed_work() is not required here. Fixes: aab1ad11d69f ("ASoC: nau8821: new driver") Fixes: ee70bacef1c6 ("ASoC: nau8821: Avoid unnecessary blocking in IRQ handler") Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://patch.msgid.link/20251231-nau8821-cleanup-v1-3-6b0b76cbbb64@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: nau8821: Cancel delayed work on component removeCristian Ciocaltea1-0/+9
Attempting to unload the driver while a jack detection work is pending would likely crash the kernel when it is eventually scheduled for execution: [ 1984.896308] BUG: unable to handle page fault for address: ffffffffc10c2a20 [...] [ 1984.896388] Hardware name: Valve Jupiter/Jupiter, BIOS F7A0131 01/30/2024 [ 1984.896396] Workqueue: events nau8821_jdet_work [snd_soc_nau8821] [ 1984.896414] RIP: 0010:__mutex_lock+0x9f/0x11d0 [...] [ 1984.896504] Call Trace: [ 1984.896511] <TASK> [ 1984.896524] ? snd_soc_dapm_disable_pin+0x26/0x60 [snd_soc_core] [ 1984.896572] ? snd_soc_dapm_disable_pin+0x26/0x60 [snd_soc_core] [ 1984.896596] snd_soc_dapm_disable_pin+0x26/0x60 [snd_soc_core] [ 1984.896622] nau8821_jdet_work+0xeb/0x1e0 [snd_soc_nau8821] [ 1984.896636] process_one_work+0x211/0x590 [ 1984.896649] ? srso_return_thunk+0x5/0x5f [ 1984.896670] worker_thread+0x1cd/0x3a0 Cancel unscheduled jdet_work or wait for its execution to finish before the component driver gets removed. Fixes: aab1ad11d69f ("ASoC: nau8821: new driver") Fixes: ee70bacef1c6 ("ASoC: nau8821: Avoid unnecessary blocking in IRQ handler") Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://patch.msgid.link/20251231-nau8821-cleanup-v1-2-6b0b76cbbb64@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: nau8821: Fixup nau8821_enable_jack_detect()Cristian Ciocaltea2-0/+6
The nau8821_enable_jack_detect() function was supposed to allow enabling or disabling jack events reporting. However, once enabled, any subsequent invocation would fail and the following splat is shown: [ 3136.996771] Hardware name: Valve Jupiter/Jupiter, BIOS F7A0131 01/30/2024 [ 3136.996773] Workqueue: events_unbound deferred_probe_work_func [ 3136.996780] Call Trace: [ 3136.996782] <TASK> [ 3136.996787] dump_stack_lvl+0x6e/0xa0 [ 3136.996796] __setup_irq.cold+0x9c/0xce [ 3136.996803] ? __pfx_irq_default_primary_handler+0x10/0x10 [ 3136.996812] ? __pfx_nau8821_interrupt+0x10/0x10 [snd_soc_nau8821] [ 3136.996825] request_threaded_irq+0xd9/0x160 [ 3136.996853] devm_request_threaded_irq+0x71/0xd0 [ 3136.996859] ? __pfx_nau8821_interrupt+0x10/0x10 [snd_soc_nau8821] [ 3136.996882] nau8821_enable_jack_detect+0xa5/0xc0 [snd_soc_nau8821] [ 3136.996901] acp5x_8821_init+0x8d/0xa0 [snd_soc_acp5x_mach] [ 3136.996917] snd_soc_link_init+0x25/0x50 [snd_soc_core] [ 3136.996958] snd_soc_bind_card+0x615/0xd00 [snd_soc_core] [ 3136.997026] snd_soc_register_card+0x1b2/0x1c0 [snd_soc_core] [ 3136.997064] devm_snd_soc_register_card+0x47/0x90 [snd_soc_core] [ 3136.997108] acp5x_probe+0x72/0xb0 [snd_soc_acp5x_mach] [...] [ 3136.997508] nau8821 i2c-NVTN2020:00: Cannot request irq 58 (-16) Introduce jdet_active flag to driver data structure and use it to provide one-time initialization of the jack detection work queue and related interrupt line. Note this is also a prerequisite for additional fixes around module unloading and suspend handling. Fixes: aab1ad11d69f ("ASoC: nau8821: new driver") Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://patch.msgid.link/20251231-nau8821-cleanup-v1-1-6b0b76cbbb64@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: es8328: Remove duplicate DAPM routesHsieh Hung-En1-10/+0
The DAPM routes for "Left Line Mux" and "Right Line Mux" are defined twice in es8328_dapm_routes[]. The redundant entries appear after the "Mic Bias" route and duplicate the definitions found earlier in the array. Remove the duplicate entries to clean up the code. Tested on Rockchip RK3588 with ES8328 codec. Verified that removing the duplicate routes does not alter the DAPM graph or the mixer controls. Both 'tinymix' output and DAPM widget lists remain identical to the baseline. Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com> Link: https://patch.msgid.link/20251231084554.265916-1-hungen3108@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: rt5575: Add the codec driver for the ALC5575Oder Chiou6-0/+568
The ALC5575 integrates an audio DSP that typically loads its firmware from an external flash via its own SPI host interface. In certain hardware configurations, the firmware can alternatively be loaded through the SPI client interface. The driver provides basic mute and volume control functions. When the SPI client interface is enabled, firmware loading is handled by the SPI driver. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Link: https://patch.msgid.link/17c36d07af44ffb1d600977955da95852f8d60f3.1767148150.git.oder_chiou@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: codecs: ES8389: Update clock configurationZhang Yi1-81/+113
To ensure better performance of the codec, different configurations will be employed based on power supply conditions. Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20260105091548.4196-6-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: codecs: ES8389: Add members about the versionZhang Yi1-0/+8
Execute different configurations based on version number in order to support different versions of es8389. Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20260105091548.4196-5-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: codecs: ES8389: Adjust wakeup configurationZhang Yi1-4/+13
Update wake-up configuration to ensure the codec works properly. Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20260105091548.4196-4-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: codecs: ES8389: Add members related to power supplyZhang Yi2-1/+34
Added the members `avdd-supply` and `dvdd-supply` to enable the driver to get the power supply status. Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20260105091548.4196-3-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: simple-card-utils: Check device node before overwrite directionShengjiu Wang1-2/+2
Even the device node don't exist, the graph_util_parse_link_direction() will overwrite the playback_only and capture_only to be zero. Which cause the playback_only and capture_only are not correct, so check device node exist or not before update the value. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20251229090432.3964848-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: Intel: sof_sdw: Add new quirks for PTL on Dell with CS42L43Deep Harsora1-0/+8
Add missing quirks for some new Dell laptops using cs42l43's speaker outputs. Signed-off-by: Deep Harsora <Deep_Harsora@dell.com> Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Link: https://patch.msgid.link/20260102152132.3053106-1-mstrozek@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: codecs: wsa883x: suppress variant printkJohan Hovold1-8/+9
Drivers should generally be silent on successful probe. Demote the codec variant printk to debug level and instead add a warning in case an unknown variant is ever encountered. Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260102111413.9605-5-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: codecs: wsa884x: fix codec initialisationJohan Hovold1-2/+1
The soundwire update_status() callback may be called multiple times with the same ATTACHED status but initialisation should only be done when transitioning from UNATTACHED to ATTACHED. Fix the inverted hw_init flag which was set to false instead of true after initialisation which defeats its purpose and may result in repeated unnecessary initialisation. Similarly, the initial state of the flag was also inverted so that the codec would only be initialised and brought out of regmap cache only mode if its status first transitions to UNATTACHED. Fixes: aa21a7d4f68a ("ASoC: codecs: wsa884x: Add WSA884x family of speakers") Cc: stable@vger.kernel.org # 6.5 Cc: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260102111413.9605-4-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: codecs: wsa881x: fix unnecessary initialisationJohan Hovold1-0/+9
The soundwire update_status() callback may be called multiple times with the same ATTACHED status but initialisation should only be done when transitioning from UNATTACHED to ATTACHED. Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support") Cc: stable@vger.kernel.org # 5.6 Cc: Srinivas Kandagatla <srini@kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260102111413.9605-3-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05ASoC: codecs: wsa883x: fix unnecessary initialisationJohan Hovold1-0/+9
The soundwire update_status() callback may be called multiple times with the same ATTACHED status but initialisation should only be done when transitioning from UNATTACHED to ATTACHED. This avoids repeated initialisation of the codecs during boot of machines like the Lenovo ThinkPad X13s: [ 11.614523] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2 [ 11.618022] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2 [ 11.621377] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2 [ 11.624065] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2 [ 11.631382] wsa883x-codec sdw:1:0:0217:0202:00:2: WSA883X Version 1_1, Variant: WSA8835_V2 [ 11.634424] wsa883x-codec sdw:1:0:0217:0202:00:2: WSA883X Version 1_1, Variant: WSA8835_V2 Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support") Cc: stable@vger.kernel.org # 6.0 Cc: Srinivas Kandagatla <srini@kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260102111413.9605-2-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-27ASoC: rt1320: fix the remainder calculation of r0 valueShuming Fan1-2/+2
This patch fixes the remainder calculation of r0 value. Fixes: 836ecc740ca8 ("ASoC: rt1320: fix 32-bit link failure") Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20251226064255.993735-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-27ASoC: alc5623: tidyup clock inversion in alc5623_set_dai_fmt()Kuninori Morimoto1-5/+0
It supports inverted bitclock (= _NB_, _IB_), but has no control for the frame polarity (= _NF, _IF). Let's tidyup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87y0mrtogw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-24ASoC: rt1320: fix size_t format stringArnd Bergmann1-1/+1
Printing a size_t portably requires the use of %z instead of %l: sound/soc/codecs/rt1320-sdw.c:1494:30: error: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] 1494 | dev_dbg(dev, "%s, rae_fw size=0x%lx\n", __func__, rae_fw->size); | ^~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 22937af75abb ("ASoC: rt1320: support RAE parameters loading") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20251223215322.694265-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-24ASoC: rt1320: fix 32-bit link failureArnd Bergmann1-8/+8
A plain 64-bit division causes a link failure in some configurations: ERROR: modpost: "__aeabi_uldivmod" [sound/soc/codecs/snd-soc-rt1320-sdw.ko] undefined! Since this divides by a constant, using the div_u64() macro ends up turning this into an efficient multiply/shift operation where possible. In rt1320_calc_r0(), the open-coded shift seems a litle simpler. Fixes: da1682d5e8b5 ("ASoC: rt1320: support calibration and temperature/r0 loading") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20251223215259.677762-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-23ASoC: Intel: avs: replace strcmp with sysfs_streqBrahmajit Das1-1/+1
allmodconfig failes to build with GCC 16 with the following build error sound/soc/intel/avs/path.c:137:38: error: ‘strcmp’ reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread] 137 | return id->id == id2->id && !strcmp(id->tplg_name, id2->tplg_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ‘avs_condpaths_walk’: events 1-3 137 | return id->id == id2->id && !strcmp(id->tplg_name, id2->tplg_name); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (3) warning happens here | (1) when the condition is evaluated to true ...... 155 | if (id->id != path->template->owner->id || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | (2) when the condition is evaluated to false 156 | strcmp(id->tplg_name, path->template->owner->owner->name)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from sound/soc/intel/avs/path.h:14, from sound/soc/intel/avs/path.c:15: sound/soc/intel/avs/topology.h: In function ‘avs_condpaths_walk’: sound/soc/intel/avs/topology.h:152:13: note: at offset 4 into source object ‘id’ of size 4 152 | u32 id; | ^~ Using the sysfs_streq as an alternative to strcmp helps getting around this build failure. Please also refer https://docs.kernel.org/core-api/kernel-api.html#c.__sysfs_match_string Signed-off-by: Brahmajit Das <listout@listout.xyz> Link: https://patch.msgid.link/20251221185531.6453-1-listout@listout.xyz Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-23ASoC: rockchip: Discard pm_runtime_put() return valueRafael J. Wysocki1-2/+3
It is better to check directly whether or not CONFIG_PM has been enabled instead of relying on an error value returned by pm_runtime_put() in that case because pm_runtime_put() may also return an error value in other cases, like after writing "on" to the devices' runtime PM "control" attribute in sysfs for one example. This will facilitate a planned change of the pm_runtime_put() return type to void in the future. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/5160923.0VBMTVartN@rafael.j.wysocki Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-23soundwire: Make remove function return no valueUwe Kleine-König23-69/+23
All remove functions return zero and the driver core ignores any other returned value (just emits a warning about it being ignored). So make all remove callbacks return void instead of an ignored int. This is in line with most other subsystems. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20251215174925.1327021-5-u.kleine-koenig@baylibre.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
2025-12-23ASoC: qcom: Constify few things in audioreach andMark Brown3-105/+116
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-23ASoC: drop bogus container_of() error handlingMark Brown3-15/+0
Merge series from Johan Hovold <johan@kernel.org>: The dev_to_sdw_dev() helper uses container_of() to return the containing soundwire device structure of its pointer argument and will never return NULL.
2025-12-22SDCA Jack FixupsMark Brown4-77/+265
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: Some fixups to the jack handling, adding some necessary hooks to connect things with the machine driver. I have split these out from the system suspend chain as that has been generating a fair amount of discussion and getting these 3 merged is far more important to get basic functionality working smoothly. I will do a spin of the system suspend stuff soon, if either no new comments pop up, or we reach some consensus on how to proceed.
2025-12-22ASoC / soc/qcom: Constify APR/GPR callback responseMark Brown6-22/+22
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>: This constifies the response data used for APR/GPR callbacks.
2025-12-22ASoC: sun4i-spdif: Add missing kerneldoc fields for sun4i_spdif_quirksChen-Yu Tsai1-0/+2
When sun4i_spdif_quirks was recently expanded, the kerneldoc covering the structure was not expanded to match. This ends up causing a warning when the documents are built. Add the missing fields. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501311953.0Ox9CW5w-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202503060947.QKUUR62l-lkp@intel.com/ Fixes: 0a2319308de8 ("ASoC: sun4i-spdif: Add clock multiplier settings") Fixes: 4a5ac6cd05a7 ("ASoC: sun4i-spdif: Support SPDIF output on A523 family") Signed-off-by: Chen-Yu Tsai <wens@kernel.org> Reviewed-by: Marcus Cooper <codekipper@gmail.com> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://patch.msgid.link/20251221035715.1722584-1-wens@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: codecs: pm4125: clean up bind() device reference handlingJohan Hovold1-9/+2
A recent change fixed a couple of device leaks on component bind failure and on unbind but did so in a confusing way by adding misleading initialisations at bind() and bogus NULL checks at unbind(). Cc: Ma Ke <make24@iscas.ac.cn> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20251219142412.19043-1-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: rt1320: fix the warning the string may be truncatedShuming Fan1-2/+2
1488 | "realtek/rt1320/rt1320_%s_%s_%s.dat", vendor, product, sku); | ^~ ~~~~~~ sound/soc/codecs/rt1320-sdw.c:1487:17: note: 'snprintf' output between 29 and 410 bytes into a destination of size 128 1487 | snprintf(filename, sizeof(filename), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1488 | "realtek/rt1320/rt1320_%s_%s_%s.dat", vendor, product, sku); | Fixes: da1682d5e8b5 ("ASoC: rt1320: support calibration and temperature/r0 loading") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202512191521.RK0edKdX-lkp@intel.com/ Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20251222101329.558973-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: soc_sdw_utils: drop bogus container_of() error handlingJohan Hovold1-4/+0
The dev_to_sdw_dev() helper uses container_of() to return the containing soundwire device structure of its pointer argument and will never return NULL. Fixes: 4f8ef33dd44a ("ASoC: soc_sdw_utils: skip the endpoint that doesn't present") Cc: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20251219142715.19254-4-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: codecs: wcd937x: drop bogus container_of() error handlingJohan Hovold1-5/+0
The dev_to_sdw_dev() helper uses container_of() to return the containing soundwire device structure of its pointer argument and will never return NULL. Fixes: 9be3ec196da4 ("ASoC: codecs: wcd937x: add wcd937x codec driver") Cc: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20251219142715.19254-3-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: codecs: pm4125: drop bogus container_of() error handlingJohan Hovold1-6/+0
The dev_to_sdw_dev() helper uses container_of() to return the containing soundwire device structure of its pointer argument and will never return NULL. Fixes: 8ad529484937 ("ASoC: codecs: add new pm4125 audio codec driver") Cc: Alexey Klimov <alexey.klimov@linaro.org> Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Alexey Klimov <alexey.klimov@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20251219142715.19254-2-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: rt1320: Fix retry checking in rt1320_rae_load()Dan Carpenter1-1/+1
This loop iterates 200 times and then gives up. The problem is that currently the loop exits with "retry" set to -1 on the failure path but the check for failure expects it to be 0. Change from a post-op to a pre-op so that it exits with "retry" set to 0. Fixes: 22937af75abb ("ASoC: rt1320: support RAE parameters loading") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/aUZiNJ7pzuahXFYE@stanley.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: rt1320: Change return type of rt1320_t0_load() to voidNathan Chancellor1-7/+3
Clang warns (or errors with CONFIG_WERROR=y / W=e): sound/soc/codecs/rt1320-sdw.c:1387:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 1387 | if (!fw_ready) { | ^~~~~~~~~ sound/soc/codecs/rt1320-sdw.c:1421:9: note: uninitialized use occurs here 1421 | return ret; | ^~~ sound/soc/codecs/rt1320-sdw.c:1387:2: note: remove the 'if' if its condition is always false 1387 | if (!fw_ready) { | ^~~~~~~~~~~~~~~~ 1388 | dev_warn(dev, "%s, DSP FW is NOT ready\n", __func__); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | goto _exit_; | ~~~~~~~~~~~~ 1390 | } | ~ sound/soc/codecs/rt1320-sdw.c:1366:9: note: initialize the variable 'ret' to silence this warning 1366 | int ret; | ^ | = 0 The return value of rt1320_t0_load() is never actually used, so it can just be eliminated altogether by returning void, clearing up the warning. Fixes: da1682d5e8b5 ("ASoC: rt1320: support calibration and temperature/r0 loading") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202512191711.wY6XU796-lkp@intel.com/ Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20251219-rt1320-sdw-avoid-uninit-ret-v1-1-faa3e250ebc4@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: qcom: audioreach: Constify function argumentsKrzysztof Kozlowski2-46/+57
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 Kozlowski1-7/+7
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 Kozlowski1-11/+11
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 Kozlowski1-6/+6
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 Kozlowski1-35/+35
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-22ASoC: SDCA: Add ASoC jack hookup in class driverCharles Keepax1-0/+13
Add the necessary calls to the class driver to connect the ASoC jack from the machine driver. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20251215153650.3913117-4-ckeepax@opensource.cirrus.com Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: SDCA: Add ability to connect SDCA jacks to ASoC jacksCharles Keepax1-1/+105
Add handling for the ASoC jack API to SDCA to allow user-space to be hooked up normally. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20251215153650.3913117-3-ckeepax@opensource.cirrus.com Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: SDCA: Factor out jack handling into new c fileCharles Keepax3-77/+148
The jack code is perhaps a bit large for being in the interrupt code directly. Improve the encapsulation by factoring out the jack handling code into a new c file, as is already done for HID and FDL. Whilst doing so also add a jack_state structure to hold the jack state for improved expandability in the future. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20251215153650.3913117-2-ckeepax@opensource.cirrus.com Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: SOF: Intel: add -bt tplg suffix if BT is presentBard Liao1-1/+13
We need to distinguish the topologies with and without BT PCM. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20251219034937.3630569-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: Intel: sof_sdw: shift SSP BT mask bits.Mac Chiang1-3/+3
The SSP BT mask bits overlapped with SOC_SDW_CODEC_SPKR, SOC_SDW_SIDECAR_AMPS, and SOC_SDW_CODEC_MIC BIT[15–17] in sdw_utils.h. Shift the SSP BT mask bits to a higher range to eliminate the conflict. Signed-off-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20251219034902.3630537-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-20ASoC: qcom: Constify APR/GPR result structsKrzysztof Kozlowski6-6/+6
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-20ASoC: qcom: Constify GPR callback response dataKrzysztof Kozlowski2-6/+6
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-20ASoC: qcom: Constify APR callback response dataKrzysztof Kozlowski4-10/+10
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-19ASoC: Intel: mtl-match: Add 6-amp matches for CS35L56Mark Brown1-0/+104
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: These two commits add support for 6 amps with feedback, primarily for the CDB35L56-EIGHT-C and CDB35L63-CB8 and similar hardware.
2025-12-19ASoC: fsl_easrc: Fix duplicate debufs entriesMark Brown2-0/+6
Merge series from Alexander Stein <alexander.stein@ew.tq-group.com>: this series fixes the error regarding duplicate debugfs directory creation on TQMa8MPxL (imx8mp) when easrc is enabled: debugfs: '30c90000.easrc' already exists in 'tqm-tlv320aic32' This is caused because fsl_easrc adds two components which use the device name as component name. Debugfs directories for each component is created, resulting on name conflict. Fix this by adding the debugfs_prefix for both component drivers. Before: $ ls /sys/kernel/debug/asoc/tqm-tlv320aic32/ 30c30000.sai 30c90000.easrc HiFi-ASRC-FE dapm dapm_pop_time dma:30c30000.sai tlv320aic32x4.1-0018 After: $ ls /sys/kernel/debug/asoc/tqm-tlv320aic32/ 30c30000.sai HiFi-ASRC-FE asrc:30c90000.easrc dapm dapm_pop_time dma:30c30000.sai easrc:30c90000.easrc tlv320aic32x4.1-0018