Commit Graph

1464296 Commits

Author SHA1 Message Date
Prasad Kumpatla
4d08401758
ASoC: qcom: q6apm-lpass-dais: add TDM DAI operations
Add TDM DAI operations to q6apm-lpass-dais so AudioReach TDM
backends can be configured through the normal ASoC hw_params and DAI
setup flow.

The TDM set_tdm_slot() callback validates the supported slot width and
slot count, stores the active slot mask in the AudioReach module
configuration, and leaves existing DMA, I2S and HDMI paths unchanged.

Reuse the existing LPASS child-clock handling for TDM nodes as well as
MI2S nodes, since TDM backends also request optional backend clocks
through the machine driver set_sysclk() path.

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260804070307.117119-3-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-04 17:32:18 +01:00
Prasad Kumpatla
67605cbf8d
ASoC: qcom: qdsp6: add topology-driven Audio IF support
Add topology parsing and media-format programming for Audio IF source and
sink modules.

Add the Audio IF module IDs, the required topology tokens, and a dedicated
topology loader that stores the parsed interface configuration in the
AudioReach module state. Also add the Audio IF media-format path that
sends the interface configuration, hardware endpoint media format, and
frame-duration parameters for Audio IF modules.

This keeps the serial-interface configuration topology-driven while still
allowing the machine driver to provide runtime slot and media format
settings. The same Audio IF path can then be reused for TDM, PCM, and I2S
style backends.

The new UAPI tokens (AR_TKN_U16_MODULE_SYNC_SRC=262 through
AR_TKN_U8_MODULE_INV_EXT_BIT_CLK=276) are added, together with the value
defines used by the sync source, sync mode, data delay, interface mode,
bit clock type, and polarity tokens.

MODULE_ID_AUDIO_IF_SINK (0x0700117C) and MODULE_ID_AUDIO_IF_SOURCE
(0x0700117D) are introduced in this patch.

This Module is validated on Hawi and Shikra platforms.

Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260804070307.117119-2-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-04 17:32:17 +01:00
Takashi Iwai
cf07f14806
ASoC: sdw_utils: Use auto-cleanup for put_device()
A temporary refcount management of a struct device can be done
gracefully with __clean(put_device) for avoiding potential leaks.

No functional change but just a code cleanup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260803135648.917760-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-03 20:03:13 +01:00
bui duc phuc
a6604d9fb2
ASoC: spacemit: Drop redundant error messages
The called functions already log failures where appropriate. Return the
original error directly and avoid duplicate error messages.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Link: https://patch.msgid.link/20260731101539.36290-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-03 19:36:11 +01:00
Krzysztof Kozlowski
abea6e6abd
ASoC: dt-bindings: Correct white-space style
Correct a few white-space issues, like double space after '=' character,
which will be flagged by dt-check-style.  No functional changes.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260801195425.234120-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-03 14:19:29 +01:00
Mark Brown
69ddd29d8f
ASoC: spear: Update the SPDIF drivers for current ASoC APIs
bui duc phuc <phucduc.bui@gmail.com> says:

While cleaning up the SPEAr SPDIF driver probe path by removing
redundant error messages, build testing revealed several compilation
failures caused by outdated ASoC APIs.

The series first removes the redundant error messages, then updates the
driver to match the current ASoC APIs by replacing the removed
capture_dma_data field usage with the corresponding helper API, and
moving the DAI probe callback to struct snd_soc_dai_ops.

Link: https://patch.msgid.link/20260730095407.33894-1-phucduc.bui@gmail.com
2026-08-01 02:41:18 +01:00
bui duc phuc
ad95fc2e9b
ASoC: spear: spdif_out: Move DAI probe callback to snd_soc_dai_ops
The .probe callback is no longer part of struct snd_soc_dai_driver
and is now provided through struct snd_soc_dai_ops.
Move spdif_soc_dai_probe() accordingly so the driver follows the current
ASoC API and builds correctly on modern kernels.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260730095407.33894-5-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 02:41:16 +01:00
bui duc phuc
9f2ba3a104
ASoC: spear: spdif_in: Move DAI probe callback to snd_soc_dai_ops
The .probe callback is no longer part of struct snd_soc_dai_driver
and is now provided through struct snd_soc_dai_ops.
Move spdif_in_dai_probe() accordingly so the driver follows the current
ASoC API and builds correctly on modern kernels.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260730095407.33894-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 02:41:15 +01:00
bui duc phuc
c6c14a9915
ASoC: spear: spdif_in: Switch to snd_soc_dai_dma_data_set_capture()
Replace the legacy direct access to dai->capture_dma_data with
snd_soc_dai_dma_data_set_capture().
The capture_dma_data field no longer exists in struct snd_soc_dai,
making the previous implementation incompatible with current ASoC APIs.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260730095407.33894-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 02:41:14 +01:00
bui duc phuc
ae788eeb17
ASoC: spear: spdif_in: Drop redundant error messages
The called functions already log failures where appropriate. Return the
original error directly and avoid duplicate error messages.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260730095407.33894-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 02:41:13 +01:00
Mark Brown
25213b6a88
ASoC: use .auto_selectable_formats
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> says:

This is v3 of "ASoC: use .auto_selectable_formats", but separated into
small blocks. It is Step1, and it will be Step4 in total.

x: this patch-set

	[x] Step1: ASoC: a to b
	[ ] Step2: ASoC: codec: ...
	[ ] Step3: ASoC: d to r
	[ ] Step4: ASoC: r to x

Current ASoC supports snd_soc_daifmt_parse_format() which can specify DAI
format by "dai-format" property from DT.
But strictly speaking, it is SW settings, so doesn't match to DT's policy.

Current ASoC is supporting auto format select via
snd_soc_dai_ops :: .auto_selectable_formats.
But the user is very few today.

DT doesn't need to specify the DAI format via "dai-format", if both CPU
and Codec drivers were supporting .auto_selectable_formats. It will be
automatically selected from .auto_selectable_formats.

One note is that auto select might not find best format on some CPU/Codec
combination. So "dai-format" is necessary anyway.

Link: https://lore.kernel.org/r/8733zfj5jj.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87pl0r20qo.wl-kuninori.morimoto.gx@renesas.com
Link: https://patch.msgid.link/87zezljgxy.wl-kuninori.morimoto.gx@renesas.com
2026-08-01 02:40:29 +01:00
Kuninori Morimoto
01856b7ac9
ASoC: cirrus: use .auto_selectable_formats
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87se5djgw5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 02:40:27 +01:00
Kuninori Morimoto
9626075249
ASoC: bcm: use .auto_selectable_formats
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87tsptjgwa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 02:40:26 +01:00
Kuninori Morimoto
d2b8012401
ASoC: au1x: use .auto_selectable_formats
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87v7a9jgwh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 02:40:25 +01:00
Kuninori Morimoto
f7726b4600
ASoC: atmel: use .auto_selectable_formats
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87wlupjgwp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 02:40:25 +01:00
Kuninori Morimoto
1bd470f27f
ASoC: apple: use .auto_selectable_formats
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87y0f5jgx2.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 02:40:24 +01:00
Mark Brown
f82522bb52
ASoC: qcom: sc8280xp: add Monaco/Monza (MAX98090) support on QCS8275
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> says:

This series adds sound support for the Monaco/Monza (VENTUNO-Q)
platform on the QCS8275 board, which uses a MAX98091 codec on an
LPI MI2S link.

Patch 2 (from Neil) registers the LPASS MCLK1..MCLK5 clock IDs in
q6prm-clocks.c. Without these entries the DT clock reference
"clocks = <&q6prmcc LPASS_CLK_ID_MCLK_3 ...>" that the MAX98091
node uses cannot resolve at probe, and the codec silently runs
without MCLK.

Note: this patch has been posted to the list more than once from Oct
2025 and does not appear to be actively pursued by anyone. I
am picking it up here because the rest of this series depends on
it to get sound working on QCS8275, and it makes little sense to
send the machine-driver changes without the clock IDs they rely
on.

With these patches now we have full audio working on Arduino VENTUNO-Q.

Link: https://patch.msgid.link/20260731162626.1588561-1-srinivas.kandagatla@oss.qualcomm.com
2026-08-01 02:39:17 +01:00
Srinivas Kandagatla
4ba2678ad0
ASoC: qcom: sc8280xp: add monaco/monza controls for qcs8275
Update dai-ids and add DAPM widgets, sysclk and controls required
for the VENTUNO-Q platform which uses MAX98090 codec.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260731162626.1588561-5-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:43:47 +01:00
Srinivas Kandagatla
a28da0f80d
ASoC: qcom: sc8280xp: rename snd_soc_common to qcom_snd_soc_common
The driver-local structure was named 'snd_soc_common', which occupies
the generic snd_soc_ ASoC namespace even though it is specific to the
Qualcomm sc8280xp machine driver.

Rename the type to qcom_snd_soc_common so the identifier is properly
scoped to this driver, and rename the pointer field in
sc8280xp_snd_data from 'snd_soc_common_priv' to 'priv' so the shorter
name doesn't repeat the type name at every use.

No functional change.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260731162626.1588561-4-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:43:46 +01:00
Neil Armstrong
a2fdf929fb
ASoC: qcom: qdsp6: q6prm: add the missing MCLK clock IDs
Add the missing MCLK ids for the q6prm DSP interface.

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260731162626.1588561-3-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:43:45 +01:00
Srinivas Kandagatla
07fd957b53
ASoC: qcom: sc8280xp: tolerate -ENOTSUPP from codec set_sysclk
Not all codecs implement the set_sysclk operation. When the board
enables codec_sysclk_set, snd_soc_dai_set_sysclk() on the codec DAI
can return -ENOTSUPP, which currently aborts hw_params and breaks
playback/capture on such boards even though the missing clock setup
is harmless.

Ignore -ENOTSUPP for the codec set_sysclk call.

Fixes: 766f3f79c3 ("ASoC: qcom: sc8280xp: enhance machine driver for board-specific config")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260731162626.1588561-2-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:43:44 +01:00
Mark Brown
f3caa0b024
SDM660 sound card and internal MI2S support
Richard Acayan <mailingradian@gmail.com> says:

This adds support for the SDM660 (formerly "SDM660 internal") sound card
and support for WCD codecs over internal MI2S (represented in APIs as
LPI MI2S).

Like on MSM8916 and MSM8953, some SDM660 and SDM670 devices connect to a
digital and analog codec. The connection to the digital codec is through
special "internal" MI2S ports. The digital and analog codecs are used on
the Xiaomi Redmi Note 7 for headset (playback + capture) and earpiece,
and also on the Google Pixel 3a for the headset.

This series does not include devicetree patches.

Link: https://patch.msgid.link/20260730174353.108023-1-mailingradian@gmail.com
2026-08-01 00:28:01 +01:00
Richard Acayan
ff01bff076
ASoC: msm8916-wcd-analog: add quirk for cajon 2.0
The codec version CAJON_2_0 on the Snapdragon 670 requires touching the
HPH test registers. Add the quirk so this driver can also support
SDM670.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Link: https://patch.msgid.link/20260730174353.108023-16-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:59 +01:00
Vladimir Lypak
4583c12453
ASoC: msm8916-wcd-analog: add pm8953 codec
Add regs overrides for PM8953 codec.

Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
[Adam: rename codec]
Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Link: https://patch.msgid.link/20260730174353.108023-15-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:58 +01:00
Adam Skladowski
a3e1181e12
ASoC: msm8916-wcd-analog: add pm8950 codec
Add regs overrides for PM8950 codec and implement matching reg overrides
via compatible.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Link: https://patch.msgid.link/20260730174353.108023-14-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:57 +01:00
Richard Acayan
84f950973d
ASoC: qcom: sm8250: add SDM660 compatible
Add the compatible for SDM660 and SDM670 devices, which can use the
support for WCD codecs connected to internal MI2S.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-13-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:56 +01:00
Richard Acayan
5e913c10bd
ASoC: qcom: sm8250: add support for LPI_MI2S_RX_0 and LPI_MI2S_TX_3
The LPI_MI2S_RX_0 and LPI_MI2S_TX_3 ports on SDM660 can be connected to
the digital and analog WCD codecs. They can be supported with the same
logic for other ports, but just need to be explicitly stated. Add
support for these ports.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-12-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:55 +01:00
Richard Acayan
bd8216bfe2
ASoC: qdsp6: common: support headphone jacks connected to lpi mi2s
On SDM660, LPI MI2S ports can be connected to a WCD codec which may
support headphones. Register the headphone jack on codecs connected to
the playback port, LPI_MI2S_RX_0.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-11-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:53 +01:00
Richard Acayan
14d3cca9c2
ASoC: qdsp6: q6routing: add lpi mi2s support
Add the ASM-AFE routing for LPI MI2S ports which represent internal MI2S
ports on SDM660.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-10-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:52 +01:00
Richard Acayan
0b494ae6a5
ASoC: qdsp6: q6afe-dai: add internal mi2s support
The bindings for LPI MI2S ports, originally exclusive to q6apm, can be
used for internal MI2S ports on q6afe. Add the internal MI2S ports found
on the SDM660 internal sound card using the LPI MI2S bindings.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-9-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:51 +01:00
Richard Acayan
bfe9098dc2
ASoC: qdsp6: q6afe: add internal mi2s support
The bindings for LPI MI2S ports, originally exclusive to q6apm, can be
used for internal MI2S ports on q6afe. Add the port mappings for
internal MI2S, found on the Snapdragon 660 internal sound card.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-8-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:50 +01:00
Richard Acayan
68400191e0
ASoC: qdsp6: q6dsp-lpass-ports: add support for lpi mi2s ports 5-6
Add the extra LPI MI2S ports used for internal MI2S on SDM660.

Link: 530cffa4cc/asoc/msm-dai-q6-v2.c (4597)
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-7-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:49 +01:00
Richard Acayan
6f48a57f4b
ASoC: dt-bindings: msm8916-digital-codec: Add SDM660 compatible
The MSM8916 digital codec is also found on SDM660, typically connected to
the SDM660 internal sound card. Provide a space
for specific compatibles and add the compatible for SDM660.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-6-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:48 +01:00
Richard Acayan
5f42d4525b
ASoC: dt-bindings: pm8916-analog-codec: Add PM660L compatible
The PM8953 (cajon 2.0) revision of the PM8916 analog codec is also found
on PM660L, typically connected to the SDM660 internal sound card via the
digital codec. Provide a space for specific compatibles and add the
compatible for PM660L.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-5-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:43 +01:00
Adam Skladowski
e70f039588
ASoC: dt-bindings: pm8916-wcd-analog-codec: Document pm8950/pm8953
Document pm8950 and pm8953 analog audio codecs.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
[richard: add back empty line]
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-4-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:39 +01:00
Richard Acayan
96591d7030
ASoC: dt-bindings: qcom: q6dsp: add support for lpi mi2s ports 5-6
There are 7 internal MI2S ports per direction found on devices with the
internal sound card for Snapdragon 660. This is similar to the LPI MI2S
ports, and the LPI MI2S bindings can be reused for internal MI2S. Extend
the bindings for LPI MI2S ports to accommodate the internal MI2S ports.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-3-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:38 +01:00
Nickolay Goppen
c143608b56
ASoC: dt-bindings: qcom,sm8250: add compatible for sdm660
Add compatibles for sdm660 based soundcards.

Signed-off-by: Nickolay Goppen <setotau@mainlining.org>
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260730174353.108023-2-mailingradian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:27:36 +01:00
Mark Brown
dbc2afea82
ASoC: Add support for the Qualcomm WSA885X Stereo smart speaker amplifier
Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> says:

The series first documents the WSA885X devicetree binding,
including supplies, GPIOs, Interrupt and battery configuration.

It then adds the ASoC codec driver with register programming, serial
interface setup, clock handling, mute and gain control, reset handling,
interrupt support, runtime TDM slot-count configuration, and stream-time
power-state sequencing.

validated speaker playback on Shikra and Hawi platforms.

Link: https://patch.msgid.link/20260715115220.3093799-1-prasad.kumpatla@oss.qualcomm.com
2026-08-01 00:21:06 +01:00
Prasad Kumpatla
1d0368c987
ASoC: codecs: add Qualcomm WSA885X codec driver
Add an ASoC codec driver for the Qualcomm WSA885X stereo smart speaker
amplifier.

The driver programs the register map, handles reset and interrupt support,
exposes DAI operations for PCM/TDM playback, and provides mixer controls
for usage mode, speaker volume and RX slot mask.

Keep stream-time power-state sequencing in the DAI callbacks and use regmap
for the control path.

Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260715115220.3093799-3-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:21:04 +01:00
Prasad Kumpatla
9151afc314
ASoC: dt-bindings: qcom,wsa8855: add Qualcomm WSA8855 speaker amplifier
Add bindings for the Qualcomm WSA8855 stereo smart speaker amplifier.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260715115220.3093799-2-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:21:03 +01:00
Mark Brown
a452f59ed4
Subject: [PATCH v6 0/7] ASoC: qcom and pinctrl: add LPASS LPR voting and Hawi LPASS LPI support
Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> says:

This series adds support for LPASS low-power resource (LPR) voting
through PRM and introduces LPASS LPI TLMM pinctrl support for newer
platforms such as Hawi.

On such platforms, LPASS requires LPR resource voting via PRM to keep
the subsystem active. This is handled by adding a new clock ID and
support for PARAM_ID_RSC_CPU_LPR in q6prm.

Additionally, a new LPASS LPI TLMM block is introduced, requiring a
dedicated DT binding and pinctrl driver.

Link: https://patch.msgid.link/20260724141708.2212057-1-prasad.kumpatla@oss.qualcomm.com
2026-08-01 00:07:31 +01:00
Prasad Kumpatla
42cc644e07
ASoC: qcom: q6prm: add support for LPASS LPR resource voting
Add support for issuing LPASS low-power resource (LPR) votes through
the PRM interface.

Some platforms (e.g. Hawi) require the LPASS to be kept active via LPR
resource voting instead of the existing hardware core vote mechanism.
Handle this by introducing support for PARAM_ID_RSC_CPU_LPR when the
LPR vote clock ID is requested.

For LPR requests, use the appropriate parameter ID and payload format
to disable CPU subsystem sleep, ensuring that the LPASS register space
remains accessible.

Also add the corresponding clock mapping for LPASS_HW_LPR_VOTE.

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260724141708.2212057-4-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:07:29 +01:00
Prasad Kumpatla
037826ea44
ASoC: qcom: qdsp6: Increase Q6DSP_MAX_CLK_ID for LPASS LPR vote clock
Q6DSP_MAX_CLK_ID defines the upper bound of supported clock
identifiers in the qdsp6 LPASS clock driver.

Increase the maximum clock ID value to accommodate the LPASS
LPR vote clock identifier.

Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260724141708.2212057-3-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:07:28 +01:00
Prasad Kumpatla
cdba62ff74
ASoC: dt-bindings: qcom: add LPASS LPR vote clock ID
Add a new clock ID, LPASS_HW_LPR_VOTE, to represent the LPASS low-power
resource (LPR) vote through the PRM interface.

The LPASS PRM supports a resource voting mechanism to control low-power
states via PARAM_ID_RSC_CPU_LPR. Exposing this as a q6prm clock ID allows
clients to request the LPR vote using the existing qcom,q6prm clock
provider interface.

This functionality is required on newer platforms (e.g. Hawi) where LPASS
clients need to explicitly manage LPR resource voting via PRM.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260724141708.2212057-2-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-01 00:07:27 +01:00
Yu-Hsuan Hsu
ea1224da5d
ASoC: SOF: Use high-priority workqueue for PCM period elapsed
The snd_sof_pcm_period_elapsed function currently schedules work on the
system-wide workqueue. This can lead to potential delays or jitter in
audio processing if the system workqueue is busy with other tasks.

To improve real-time performance and ensure timely processing of PCM
periods, we can use the system_highpri_wq instead of the default work
queue.

In performance testing, this change significantly reduced the observed
scheduling delays. For instance, under load(stressapptest -M 15000 -m
60), the maximum delay dropped from 9ms on the system workqueue to 5ms
on the dedicated high-priority workqueue.

Suggested-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Yu-Hsuan Hsu <yuhsuan@google.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260730130445.8277-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-31 23:21:09 +01:00
Seppo Ingalsuo
cde3330916
ASoC: dapm: Add encoder and decoder widget types to kcontrol handling
This patch fixes the issue where encoder or decoder widget
types are assigned kcontrols in a topology but get ignored.
The controls were parsed successfully but were not registered
as ALSA kcontrols.

In dapm_create_or_share_kcontrol() the snd_soc_dapm_encoder
and the snd_soc_dapm_decoder are added to the switch statement
to be handled similarly as e.g. the snd_soc_dapm_effect for
assigning a proper long control name.

In dapm_widget_show_component() the snd_soc_dapm_encoder and
the snd_soc_dapm_decoder are added to switch statement to let
them to be shown in the debugfs power state output.

In snd_soc_dapm_new_widgets() the  snd_soc_dapm_encoder and the
snd_soc_dapm_decoder are added to same switch case handling as
e.g. snd_soc_dapm_effect to be registered with dapm_new_pga().
The previous operation with default in the switch statement
silently ignored them. Note: Despite the function name, the
dapm_new_pga() is generic utility that calls
dapm_create_or_share_kcontrol() for each kcontrol of the widget.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260730125600.6491-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-31 21:50:54 +01:00
Mark Brown
a56338f229
ASoC: SOF: Intel: Handle ACE2+ link DMA allocation restrictions
Peter Ujfalusi <peter.ujfalusi@linux.intel.com> says:

We have seen cases when the delay reporting unexpectedly behaves incorrectly,
counters are not counting in hardware registers under seemingly random
conditions.
It turned out that there are few cases that the driver must handle in order
to make sure that LLP, PPLC counters are working correctly:

- non-alt links must not be reset during probe
- Concurrent (cross-direction) hazard: when SoundWire shares a physical
  link DMA stream index with HDaudio, iDisp or UAOL across the two
  directions, the LLP and timestamp values for the affected stream are
  wrong. SSP and DMIC are not affected because every DMA request from
  those links carries one sample block.

- Sequential (playback only) hazard: once a HDaudio or iDisp link has
  used a playback stream index, that index cannot drive any non
  HDA/iDisp link in the same direction until the next controller
  reset (CRST#).

For users the impact was not visible as the link counter issue only affected
the delay reporting which already have defensive path to filter out
incorrect delays and the DSP caused delay for normal PCMs are negligible to
cause A/V sync issues for example.

Link: https://patch.msgid.link/20260730125130.29887-1-peter.ujfalusi@linux.intel.com
2026-07-31 20:57:18 +01:00
Peter Ujfalusi
34d466aaa0
ASoC: SOF: Intel: hda: Avoid ACE2+ link DMA stream allocation hazards
On ACE2+ platforms the link DMA stream allocator must avoid two
hardware errata in mlink-capable systems:

- Concurrent (cross-direction) hazard: when SoundWire shares a physical
  link DMA stream index with HDaudio, iDisp or UAOL across the two
  directions, the LLP and timestamp values for the affected stream are
  wrong. SSP and DMIC are not affected because every DMA request from
  those links carries one sample block.

- Sequential (playback only) hazard: once a HDaudio or iDisp link has
  used a playback stream index, that index cannot drive any non
  HDA/iDisp link in the same direction until the next controller
  reset (CRST#).

Track the active link type per direction in two masks (one for SoundWire,
one for HDA/iDisp/UAOL) and the persistent set of playback stream
indices touched by HDA/iDisp in a third mask. The link DMA allocator
skips streams that would violate either rule. Streams are released from
the active masks when the stream is released; all masks are cleared in
hda_dsp_ctrl_init_chip() because the CRST# performed there clears the
hardware state as well.

A new helper hda_bus_ml_link_get_type() returns the link type from the
existing extended link descriptor so the SOF allocator can tell
SoundWire, HDA/iDisp and UAOL apart without duplicating the parsing.

The implementation is generic. On platforms older than ACE2 every link
is reported as HDA, only the sequential mask is ever set and it has no
effect because no other link types are present, so behavior is
unchanged.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20260730125130.29887-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-31 20:57:16 +01:00
Peter Ujfalusi
1548868531
ASoC: SOF: Intel: hda: Remove unused hda_bus_ml_put_all()
The helper became unused after probe no longer drops all non-alt
links, so remove the dead API and implementation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20260730125130.29887-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-31 20:57:09 +01:00
Peter Ujfalusi
9e6966f704
ASoC: SOF: Intel: hda: Keep non-alt mlinks powered at probe on ACE2+
Drop the hda_bus_ml_put_all() call at the end of hda_init_caps().

On multi-link (mlink) capable platforms the non-alternate links
(HDaudio and iDisp) are powered on by hardware when CRST# is
de-asserted (LCTL.SPA = 1) and their ref_count is pre-charged to 1 in
hda_ml_alloc_h2link() to match this state. The put_all call
immediately dropped that reference and toggled LCTL.SPA back to 0,
relying on the first stream open to power the link up again.

On ACE2+ platforms this redundant SPA 1->0->1 toggle at probe leaves
the Processing Pipe Capability (PPLC) Linear Link Position counters in
a state where they do not advance on the first stream after boot. The
counters only start working after the first full runtime suspend/resume
cycle, which includes a CRST# assert/deassert that fully resets the PPC
AON block.

Keep the non-alt links powered from CRST# de-assert through first use.
System suspend still powers them down via hda_bus_ml_suspend(), and
resume relies on CRST# de-assert to bring them back up, so no other
path is affected.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20260730125130.29887-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-31 20:57:07 +01:00