Commit Graph

1462872 Commits

Author SHA1 Message Date
Ajay Kumar Nandam
6173e18dd4
ASoC: codecs: lpass-wsa-macro: check clk_set_rate() return value
clk_set_rate() returns 0 on success or a negative errno on failure but
the WSA macro probe function is ignoring it. Check the return value and
bail out of probe on failure.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260715-xo-sd-codec-wsa-va-clk-set-rate-v2-1-16ca64c2b929@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-16 13:18:18 +01:00
Mark Brown
4fe01a156e
ASoC: tegra: Simplify error handling
bui duc phuc <phucduc.bui@gmail.com> says:

This series contains a few small cleanups for the Tegra ASoC drivers.
 - Use dev_err_probe() for regmap initialization failures.
 - Return the original error from snd_soc_add_component_controls().
 - Use devm_clk_get_optional() for the optional sync_input clock.

Overall, this simplifies the error paths and makes the code more
consistent.

Link: https://patch.msgid.link/20260715051115.17385-1-phucduc.bui@gmail.com
2026-07-15 13:48:26 +01:00
bui duc phuc
226791fa6d
ASoC: tegra: tegra210: Use devm_clk_get_optional() for sync_input clock
The existing comment states that the sync_input clock is only needed
when another I/O is configured to use the current I2S instance as its
input clock, and the current code does not treat its absence as an
error.
Use devm_clk_get_optional() to match the existing behaviour while still
reporting real failures via dev_err_probe(). Update the comment to
describe the optional nature of the clock rather than the previous error
handling.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20260715051115.17385-5-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-15 13:48:24 +01:00
bui duc phuc
f7cbc51424
ASoC: tegra: tegra210_amx: Return the original error directly
snd_soc_add_component_controls() already reports failures internally.
Return its error code directly instead of logging the error again in the
component probe callback. Also remove the now unnecessary local error
variable.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20260715051115.17385-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-15 13:48:23 +01:00
bui duc phuc
b82384bffb
ASoC: tegra: tegra210_adx: Return the original error directly
snd_soc_add_component_controls() already reports failures internally.
Return its error code directly instead of logging the error again in the
component probe callback. Also remove the now unnecessary local error
variable.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20260715051115.17385-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-15 13:48:22 +01:00
bui duc phuc
70d0d7b24d
ASoC: tegra: tegra20_das: Use dev_err_probe() for error handling
Replace the existing dev_err() and PTR_ERR() sequence with
dev_err_probe(), preserving the original error code while simplifying
the error handling.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260715051115.17385-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-15 13:48:22 +01:00
Antonio Ignacio Campos Ruiz
d39e4e2796
ASoC: amd: yc: Add DMI quirk for MSI Vector A16 HX A8WIG
The internal digital microphone on the MSI Vector A16 HX A8WIG is not
detected: the ACP platform devices are created, but snd_soc_acp6x_mach
never binds because the machine is missing from the DMI quirk table, so
no capture device shows up at all.

This is the same board as the already supported "Vector A16 HX A8WHG",
differing only in the trailing model code. Add the corresponding entry.

Signed-off-by: Antonio Ignacio Campos Ruiz <acamposruiz@gmail.com>
Link: https://patch.msgid.link/20260713165709.19489-1-acamposruiz@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 22:27:07 +01:00
Chancel Liu
9f86aea992
ASoC: fsl: imx-card: Skip sysclk reset for active DAIs in shutdown
In a full-duplex setup, when one direction (playback or capture) is
closed while the other is still running, imx_aif_shutdown() was
unconditionally calling snd_soc_dai_set_sysclk() with rate=0 for all
cpu/codec DAIs, which would disable the clock still needed by the
active stream.

Add snd_soc_dai_active() checks before clearing sysclk so that only
truly inactive DAIs have their clocks reset.

Fixes: 2260bc6ea8 ("ASoC: imx-card: Add WM8524 support")
Cc: stable@vger.kernel.org
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20260710031333.3491445-1-chancel.liu@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 22:23:00 +01:00
Chen-Yu Tsai
eceeb7a564
ASoC: sun4i-codec: Sort sound related #include statements
Some of the sound related #include statements are not ordered in
alphabetic order.

Sort them. This results in no functional change.

Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20260714151950.316035-1-wens@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 22:19:33 +01:00
Chen-Yu Tsai
d9e96f859d
ASoC: sun4i-codec: Set quirks.playback_only for H616 codec
The H616 codec does not have capture capabilities. Set the
.playback_only quirks flag to denote this.

This was somehow missing from the original driver patch, even though
the patch prior to it in the series added this quirk.

Fixes: 9155c321a1 ("ASoC: sun4i-codec: support allwinner H616 codec")
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Link: https://patch.msgid.link/20260714113304.270224-1-wens@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 15:23:08 +01:00
Valerio Setti
72fe2ef11d
ASoC: meson: aiu-formatter-i2s: remove pipeline reset from prepare
'aiu-fifo-i2s' (DAI FE) already resets the I2S pipeline in
'aiu_fifo_i2s_trigger' for all relevant trigger scenarios, right
before starting the FIFO. Since the DAI triggering order is the
default one (FE before BE), the reset performed in
'aiu_formatter_i2s_prepare' happens after the FIFO has already been
reset and started, which corrupts playback in 24-bit mode. Remove
the duplicated reset from the formatter.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Link: https://patch.msgid.link/20260702-fix-24-bit-i2s-playback-v2-1-9c008ff0b211@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 13:49:20 +01:00
Mark Brown
4a7c920458
ASoC: codecs: Use guard() for mutex & spin lock - part 1
bui duc phuc <phucduc.bui@gmail.com> says:

This series converts mutex and spinlock handling in ASoC codec drivers
to use the guard() and scoped_guard() helpers.

This series is split out from a larger 78-patch series to improve
reviewability and allow for incremental review:
https://lore.kernel.org/all/20260617103235.449609-1-phucduc.bui@gmail.com/

The changes are purely refactoring and have no functional impact.

Compile-tested only.

Link: https://patch.msgid.link/20260708125002.202515-1-phucduc.bui@gmail.com
2026-07-14 12:47:34 +01:00
bui duc phuc
1b302f955e
ASoC: codecs: cx2072x: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-25-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:32 +01:00
bui duc phuc
6ced86b1e2
ASoC: codecs: cs48l32: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-24-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:30 +01:00
bui duc phuc
f452b00f97
ASoC: codecs: cs47l92: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-23-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:29 +01:00
bui duc phuc
1b681fda5e
ASoC: codecs: cs47l90: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-22-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:28 +01:00
bui duc phuc
cea70877a2
ASoC: codecs: cs47l85: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-21-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:25 +01:00
bui duc phuc
db698e3721
ASoC: codecs: cs47l35: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-20-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:24 +01:00
bui duc phuc
a97c200c2f
ASoC: codecs: cs47l15: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-19-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:23 +01:00
bui duc phuc
e6eb5e269d
ASoC: codecs: cs43130: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-18-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:22 +01:00
bui duc phuc
2f952d2ff5
ASoC: codecs: cs42l84: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-17-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:21 +01:00
bui duc phuc
d1b5d20f53
ASoC: codecs: cs42l43: Use guard() and PM runtime scope helpers
Convert mutex locking to guard(mutex) and replace explicit runtime
PM handling with runtime PM scope helpers.
This simplifies the control flow by removing explicit cleanup paths
and unnecessary 'goto' labels.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-16-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:20 +01:00
bui duc phuc
6e982e8f5a
ASoC: codecs: cs42l42: Use guard() cleanup helpers
Clean up the code using guard() helpers for mutex locking
and PM runtime management.
No functional change intended.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-15-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:19 +01:00
bui duc phuc
fa08036d5d
ASoC: codecs: cs35l56: Use guard() and PM runtime scope helpers
Convert the interrupt handler to use guard(mutex) for automatic mutex
unlocking and PM_RUNTIME_ACQUIRE_IF_ENABLED() to manage the runtime PM
reference through scope-based cleanup.
This removes the explicit cleanup paths while preserving the existing
behavior.

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-14-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:18 +01:00
bui duc phuc
53651103db
ASoC: codecs: cs-amp-lib: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-13-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:17 +01:00
bui duc phuc
35150d26cb
ASoC: codecs: cros_ec_codec: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-12-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:16 +01:00
bui duc phuc
49204ed803
ASoC: codecs: aw88399: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-11-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:15 +01:00
bui duc phuc
6699b73f00
ASoC: codecs: aw88395: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-10-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:14 +01:00
bui duc phuc
9d8e98091f
ASoC: codecs: aw88261: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-9-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:14 +01:00
bui duc phuc
a0c8cd0ecf
ASoC: codecs: aw88166: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-8-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:13 +01:00
bui duc phuc
9c30350885
ASoC: codecs: aw88081: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-7-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:12 +01:00
bui duc phuc
95cc462fe4
ASoC: codecs: aw87390: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-6-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:11 +01:00
bui duc phuc
fa58edfcce
ASoC: codecs: arizona: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-5-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:05 +01:00
bui duc phuc
d46421aeac
ASoC: codecs: arizona-jack: Use guard() cleanup helpers
Clean up the code using guard() helpers for mutex locking
and PM runtime management.
No functional change intended.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:03 +01:00
bui duc phuc
da41b1716f
ASoC: codecs: ak4613: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:02 +01:00
bui duc phuc
350b7eae8e
ASoC: codecs: ab8500: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:47:00 +01:00
Pengpeng Hou
bc889dfcea
ASoC: tas2781: bound firmware description string parsing
The TAS2781 firmware parser reads several variable-length description
strings with strlen() before checking that the string terminator is
present inside the firmware blob. A malformed firmware image without a
NUL terminator can therefore make the parser walk past the end of the
firmware buffer before the later size checks run.

Add a small bounded string-length helper and use it for all description
fields that are parsed from the firmware buffer. Keep the existing size
checks for the fixed bytes that follow each string.

Fixes: 915f5eadeb ("ASoC: tas2781: firmware lib")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260706144540.93929-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:24:23 +01:00
Jorijn van der Graaf
06b6f12455
ASoC: codecs: aw88261: only check PLL and clock state at power-up
The SYSST check performed during device start requires SWS (amplifier
switching, bit 8) and BSTS (boost finished, bit 9) on top of PLL lock
and clock stability. Those bits cannot be asserted at this point in the
sequence: the check runs after amppd release but before the
hmute/ULS-hmute release, and the amplifier neither switches nor
finishes ramping its boost converter while it is still muted. With the
Fairphone (Gen. 6) firmware profile, aw88261_dev_start() therefore
always fails with

  check sysst fail, reg_val=0x0011, check:0x311

and playback aborts, even though the amplifier is fine and PLL lock
and stable clocks are present.

Check only PLL lock and clock stability, for which a definition
already exists; this still re-validates the clocks after amppd release
(aw88261_dev_check_syspll() checked them before it). This matches the
vendor aw882xx driver, which only validates PLL lock and clock
stability at this stage, and the in-tree aw88399 driver, which skips
the SWS check whenever the amplifier may legitimately not be switching
(AW88399_BIT_SYSST_NOSWS_CHECK).

Fixes: 028a2ae256 ("ASoC: codecs: Add aw88261 amplifier driver")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-fable-5
Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
Link: https://patch.msgid.link/20260704192857.88366-1-jorijnvdgraaf@catcrafts.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 12:21:07 +01:00
Syed Saba Kareem
27d090f3cc
ASoC: amd: acp: add ACP70 DMI override for new ASUS TUF platforms
Some ASUS TUF ACP70-based systems expose ACP ACPI configuration flags
that select a non-working fallback audio path, similar to previously
affected ASUS platforms.

Add DMI-based overrides in snd_amd_acp_find_config() for the following
systems to skip ACP ACPI flag-based selection:

  - ASUS TUF Gaming Vivobook 18
  - ASUS TUF Gaming A14 FA401EA

This ensures the intended SoundWire-based machine driver is selected on
these platforms.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://patch.msgid.link/20260710102926.1633385-1-syed.sabakareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 20:22:38 +01:00
Mark Brown
9746c37469
ASoC: SOF: Intel: reset spib_addr in stream cleanup
Bard Liao <yung-chuan.liao@linux.intel.com> says:

The spib_addr register indicates the current position in the buffer
being processed by the host software to the host DMA. It must be reset
before being disabled. Also, add the missing disable call in
hda_data_stream_cleanup().

Link: https://patch.msgid.link/20260713084650.4138172-1-yung-chuan.liao@linux.intel.com
2026-07-13 20:03:48 +01:00
Bard Liao
0507d956c4
ASoC: SOF: Intel: Disable SPIB in non ICCMAX stream
The existing code disable SPIB in the playback direction only because
previously the hda data stream is only used for SOF firmware download
and we prepare capture stream for ICCMAX and prepare playback stream
for non ICCMAX case. But now the hda data stream is also used for
SoundWire BPT which will use both directions. The SPIB is enabled in
non ICCMAX cases and we should disable in clean up.
Add a is_iccmax flag in the hda_data_stream_cleanup() function to align
with the hda_data_stream_prepare() function to enable/disable the SPIB.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260713084650.4138172-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 20:03:47 +01:00
Bard Liao
552d9559ca
ASoC: SOF: Intel: reset spib_addr before disabling SPIB
The spib_addr register will indicate to the host DMA where the position
is in the buffer currently processed by host SW. The register is ignored
by the host DMA if SPIB is disabled. Reset it to 0 before disabling SPIB.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260713084650.4138172-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 20:03:46 +01:00
Mark Brown
a9a2c8c44b
ASoC: simple-card: Fix clang build
Jumping over the allocation of the link_info for a missing dev breaks
the build:

/tmp/next/build/sound/soc/generic/simple-card.c:676:3: error: cannot jump from this goto statement to its label
  676 |                 goto end;
      |                 ^
/tmp/next/build/sound/soc/generic/simple-card.c:679:20: note: jump bypasses initialization of variable with __attribute__((cleanup))
  679 |         struct link_info *li __free(kfree) = kzalloc_obj(*li);
      |                           ^

Fixes: 7f20b9b05b ("ASoC: simple-card: merge extra method into simple_parse_of()")
Link: https://patch.msgid.link/20260713-asoc-fix-simple-card-build-v1-1-671ad44ad1a0@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 17:42:53 +01:00
Chancel Liu
d091132889
ASoC: fsl_sai: Fix spurious BCLK on resume by clearing BYP
When the BCLK divider ratio is 1:1, fsl_sai_set_bclk() enables bypass
mode by setting BYP, but never clears the bit. The BYP=1 value remains
in the regcache, and is restored by regcache_sync() on the next runtime
resume.

Since BYP=1 combined with BCD=1 immediately outputs the ungated MCLK
as BCLK without waiting for BCE/TE/RE to be enabled, the clock is
driven prematurely before the stream is fully configured, causing
noise on some codecs.

Fix this by clearing BYP and BCI in fsl_sai_hw_free() taking into
account sync mode and the opposite stream's state, so that the regcache
holds BYP=0 before runtime suspend and regcache_sync() on resume will
not restore bypass mode prematurely.

Fixes: a50b7926d0 ("ASoC: fsl_sai: implement 1:1 bclk:mclk ratio support")
Cc: stable@vger.kernel.org
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://patch.msgid.link/20260710070835.3749817-1-chancel.liu@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 13:41:11 +01:00
Mark Brown
cd02656216
ASoC: apple: mca: support simultaneous I2S capture on the frontend
James Calligeros <jcalligeros99@gmail.com> says:

This series introduces a number of changes to the ASoC driver
for the Apple MCA peripheral to enable support for bidirectional
I2S. This is achieved by allowing frontends to act as clock consumers
and logically ORing data input lines when multiple backends are linked
to a frontend.

This allows the Texas Instruments speaker amps used on Apple Silicon Macs
(Apple-specific revisions of TAS2764 and TAS2770) to send their IVSENSE
data back to the SoC. Since these amps do not have any sort of integrated
speaker protection logic, we must use the IVSENSE data and the Thiele/Small
Parameters of the attached speaker(s) to implement our own in software.

Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-0-2994d87c2f24@gmail.com
2026-07-13 13:22:44 +01:00
Hector Martin
8dd595bca5
ASoC: apple: mca: Add delay after configuring clock
Right after the early FE setup, ADMAC gets told to start the DMA. This
can end up in a weird "slip" state with the channels transposed. Waiting
a bit fixes this; presumably this allows the clock to stabilize.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-7-2994d87c2f24@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 13:22:42 +01:00
Hector Martin
889c26cfb9
ASoC: apple: mca: Do not mark clocks in use for non-providers
On the speakers PCM, this sequence:

1. Open playback
2. Open sense
3. Close playback
4. Close sense

would result in the sense FE being marked as clocks in use at (2), since
there is a clock provider (playback FE). Then at (4) this would WARN since
there is no driver any more when closing the in use clocks.

If (1) and (2) are reversed this does not happen, since the sense PCM is
not marked as using the clocks when there is no provider yet. So, check
explicitly whether the substream FE is a clock provider in be_prepare,
and skip everything if it isn't.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-6-2994d87c2f24@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 13:22:41 +01:00
Martin Povišer
108a14b20f
ASoC: apple: mca: Support capture on multiples BEs
When multiple BEs are linked to a FE, the former behavior was to source
the data line from the DIN pin of the first BE only. Change this to
ORing the DIN inputs of all linked BEs.

As long as the unused slots on each BE's line are zeroed out and the
slots on the BEs don't overlap, this will work out well.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-5-2994d87c2f24@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 13:22:40 +01:00
Martin Povišer
00309bfb1f
ASoC: apple: mca: Support FEs being clock consumers
Support FEs being I2S clock consumers. This does not mean we support
accepting clocks from outside the SoC (although it paves the way for
that support in the future), but it means multiple FEs can attach to one
BE, one being clock producer and the rest clock consumers.

This is useful for grabbing I/V sense data on some machines, since in
such a scenario the format of the sense data on the I2S bus differs
from that of the audio data (the two formats differing in slot width).
With two FEs attached to the bus, we can split the responsibilities and
command different slot widths to the two.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-4-2994d87c2f24@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 13:22:38 +01:00
Martin Povišer
2aab6230f8
ASoC: apple: mca: Factor out mca_be_get_fe
This is a function that we also want to use from within mca_be_shutdown,
so factor it out.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-3-2994d87c2f24@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 13:22:37 +01:00