aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/qcom
AgeCommit message (Collapse)AuthorFilesLines
2026-09-04treewide: refresh kmalloc_obj() conversionsKees Cook1-1/+1
This is another run of the Coccinelle script for converting kmalloc() family of allocations to kmalloc_obj() via the existing rules in scripts/coccinelle/api/kmalloc_objs.cocci This catches both the set of kmalloc() uses added since the first kmalloc_obj() conversions in v7.0 and adds a large group missed in the first pass due to Coccinelle not interacting well with the cleanup.h scoped_...() family of macros[1]. I worked around this with spatch's "--macro-file" argument to a file with all the scoped_...() macros mapped to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control flow indicator I could find. Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc, riscv, and s390 with no new warnings. Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1] Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2] Signed-off-by: Kees Cook <kees+treewide@kernel.org>
2026-08-18ASoC: qcom: Fix AudioReach TDM review findingsMark Brown5-67/+76
Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> says: Address review findings for the recently merged AudioReach TDM backend support. The first patch fixes a typo in the newly added QAIF clock ID names by renaming the LAPSS-prefixed identifiers to LPASS and updating all corresponding in-tree users. The remaining patches address issues identified in the AudioReach TDM configuration and machine-driver paths: - Zero-initialize AudioReach module configuration structures so unspecified slot parameters correctly fall back to topology defaults. - Distinguish between missing TDM configuration and malformed TDM slot properties by using separate return codes, preventing valid DT configuration errors from being silently ignored. - Fix sc8280xp TDM hw_params error handling by properly distinguishing optional and invalid TDM slot configurations and propagating errors accordingly. All issues were reported by Sashiko. Link: https://sashiko.dev/#/patchset/20260804070307.117119-1-prasad.kumpatla@oss.qualcomm.com Link: https://patch.msgid.link/20260818084655.3240284-1-prasad.kumpatla@oss.qualcomm.com
2026-08-18ASoC: qcom: sc8280xp: Fix TDM hw_params error handlingPrasad Kumpatla1-6/+15
Treat -ENOENT from TDM slot parsing as the optional "configuration not present" case and continue to propagate real configuration errors. Also ignore -ENOTSUPP from optional DAI format and codec sysclk callbacks, apply codec_dai_fmt to codec DAIs on TDM links, and use a signed bclk_freq variable so errors from snd_soc_tdm_params_to_bclk() are handled correctly. Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/patchset/20260804070307.117119-1-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260818084655.3240284-5-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-18ASoC: qcom: common: Distinguish missing and invalid TDM slot configurationPrasad Kumpatla1-3/+3
qcom_snd_parse_dai_tdm_slots() uses -EINVAL for both missing DAI-link TDM configuration and malformed TDM slot properties. As a result, qcom_snd_apply_dai_tdm_slots() silently ignores configuration errors. Return -ENOENT for missing DAI-link configuration and preserve -EINVAL for malformed TDM slot properties. Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/patchset/20260804070307.117119-1-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260818084655.3240284-4-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-18ASoC: qcom: qdsp6: Zero-initialize AudioReach module configPrasad Kumpatla1-2/+2
q6apm_dai_prepare() and q6apm_dai_compr_set_params() build an AudioReach module config on the stack and populate only the fields needed for the stream type. Audio IF media-format setup treats zero slot_mask, nslots_per_frame and slot_width as a request to use the topology defaults. Leave those fields uninitialized and random stack data can override the topology values sent to the DSP. Initialize the whole config structure so omitted fields reliably retain their zero/default meaning. Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/patchset/20260804070307.117119-1-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260818084655.3240284-3-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-18ASoC: dt-bindings: qcom,q6dsp-lpass-ports: Rename QAIF clock IDsPrasad Kumpatla2-56/+56
The QAIF clock IDs were introduced with a LAPSS prefix typo. Rename them to use the existing LPASS naming convention and update all corresponding in-tree users. Since these IDs are new, rename them directly instead of keeping backward-compatible aliases. Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/patchset/20260804070307.117119-1-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260818084655.3240284-2-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-11ASoC: dt-bindings: qcom,sm8250: Add Maili sound cardMark Brown1-0/+1
Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> says: This series add support for sound card on Qualcomm Maili boards. Link: https://patch.msgid.link/20260811084605.1820056-1-prasad.kumpatla@oss.qualcomm.com
2026-08-11ASoC: qcom: sc8280xp: Add Maili sound card supportPrasad Kumpatla1-0/+1
Add the Maili sound card compatible. Maili can reuse the Hawi sound card data. Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260811084605.1820056-3-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-11ASoC: qcom: q6apm: keep the graph start count in sync with the DSPJorijn van der Graaf1-3/+9
q6apm_graph_start() increments start_count even when APM_CMD_GRAPH_START fails, leaving the graph counted as running while the DSP never started it. A later start - a retried prepare, or a resume after a failed start - then finds a non-zero count, skips the command and returns success with no data flowing. Count the graph only once the DSP has accepted the start. The count then stays at zero for a graph that never started, so also stop decrementing below zero in q6apm_graph_stop(): the compressed free path stops unconditionally, and a negative count would make the next start skip the command in the same way. Fixes: 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support") Assisted-by: Claude:claude-opus-5 Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net> Link: https://patch.msgid.link/20260726211226.94059-1-jorijnvdgraaf@catcrafts.net Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: Use auto-cleanup for firmware loadingMark Brown1-3/+1
Takashi Iwai <tiwai@suse.de> says: here is a revised series of trivial patches to use the auto-cleanup (via __free(firmware)) for firmware management. Now compile warnings due to the mixture with goto have been addressed for rt1320-sdw and wm2000 drivers. Others remain identical, just took a few review Acks. Link: https://patch.msgid.link/20260806140006.1412298-1-tiwai@suse.de
2026-08-10ASoC: qcom: Use auto-cleanup for firmware loadingTakashi Iwai1-3/+1
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Cc: Srinivas Kandagatla <srini@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-29-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: qcom: sc8280xp: configure codec sysclk for QCS615Le Qi1-0/+1
Continuous high-amplitude noise could occur in the DA7213 microphone capture path after a Bluetooth out-of-range/reset event followed by reconnection. The noise was present in both the raw ALSA capture and PipeWire input, confirming that it originated before Bluetooth encoding. The codec already obtains and enables MCLK through its DT clock and bias-level handling. However, the machine driver did not explicitly configure the codec sysclk during hw_params(). Enable codec_sysclk_set for QCS615 so that the DA7213 clock source and rate are configured before the codec power-up sequence. Verified on QCS615 Talos with repeated Bluetooth disconnect and reconnect cycles. The noise was no longer reproducible. Signed-off-by: Le Qi <le.qi@oss.qualcomm.com> Link: https://patch.msgid.link/20260810031032.2001053-1-le.qi@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-04ASoC: qcom: sc8280xp: add TDM hw_params supportPrasad Kumpatla1-0/+59
Add TDM backend handling to the sc8280xp machine driver. Use the common QCOM DAI-node TDM helper to parse the standard DAI TDM slot properties from backend CPU and codec endpoints. Reuse the parsed configuration when programming DAIs so hw_params does not need a second DT traversal. Derive the LPASS backend bit clock from the runtime TDM parameters and request it through the backend child-clock path using LPAIF_MI2S_BCLK. Program codec sysclk in hw_params so codec PLL setup happens before the stream is triggered. Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260804070307.117119-8-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-04ASoC: qcom: common: add DAI-node TDM slot helpersPrasad Kumpatla2-0/+169
Add common helpers to parse standard dai-tdm-slot-* properties from the CPU and codec child nodes of a backend DAI link and apply the result to the active DAIs. QCOM machine drivers already use qcom_snd_parse_of() to build links from DT, but they lacked a shared helper to translate endpoint TDM properties into snd_soc_dai_set_tdm_slot() calls. Boards therefore had to carry ad hoc parsing or rely on non-standard DT properties. The helpers parse endpoint masks, validate the shared slot count and slot width, and program CPU and codec DAIs with the resulting slot configuration. A cfg-based apply helper is provided for callers that already parsed the DT data and want to avoid a second DT traversal. Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260804070307.117119-7-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-04ASoC: qcom: q6prm: add Audio IF clock IDsPrasad Kumpatla2-0/+57
Add the q6prm clock table entries and internal DSP clock IDs for LPASS Audio IF backend clocks. The public binding IDs map to q6prm DSP clock IDs starting at 0x500 for Audio IF0 IBIT/EBIT. Add the internal definitions and register all Audio IF IBIT and EBIT clocks so machine drivers can request them through the APM clock controller. 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-5-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-04ASoC: qcom: q6apm-lpass-dais: add TDM DAI operationsPrasad Kumpatla1-0/+60
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-04ASoC: qcom: qdsp6: add topology-driven Audio IF supportPrasad Kumpatla3-0/+286
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-01ASoC: qcom: sc8280xp: add Monaco/Monza (MAX98090) support on QCS8275Mark Brown3-37/+78
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-01ASoC: qcom: sc8280xp: add monaco/monza controls for qcs8275Srinivas Kandagatla1-2/+27
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-01ASoC: qcom: sc8280xp: rename snd_soc_common to qcom_snd_soc_commonSrinivas Kandagatla1-30/+30
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-01ASoC: qcom: qdsp6: q6prm: add the missing MCLK clock IDsNeil Armstrong2-0/+16
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-01ASoC: qcom: sc8280xp: tolerate -ENOTSUPP from codec set_sysclkSrinivas Kandagatla1-1/+1
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: 766f3f79c312 ("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-01SDM660 sound card and internal MI2S supportMark Brown7-2/+205
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-01ASoC: qcom: sm8250: add SDM660 compatibleRichard Acayan1-0/+1
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-01ASoC: qcom: sm8250: add support for LPI_MI2S_RX_0 and LPI_MI2S_TX_3Richard Acayan1-0/+16
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-01ASoC: qdsp6: common: support headphone jacks connected to lpi mi2sRichard Acayan1-0/+1
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-01ASoC: qdsp6: q6routing: add lpi mi2s supportRichard Acayan1-1/+77
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-01ASoC: qdsp6: q6afe-dai: add internal mi2s supportRichard Acayan1-0/+48
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-01ASoC: qdsp6: q6afe: add internal mi2s supportRichard Acayan1-0/+56
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-01ASoC: qdsp6: q6dsp-lpass-ports: add support for lpi mi2s ports 5-6Richard Acayan2-1/+6
Add the extra LPI MI2S ports used for internal MI2S on SDM660. Link: https://android.googlesource.com/kernel/msm-extra/+/530cffa4cc977a348753831b163eb9d3302b954a/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-01Subject: [PATCH v6 0/7] ASoC: qcom and pinctrl: add LPASS LPR voting and Hawi LPASS LPI supportMark Brown4-4/+17
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-01ASoC: qcom: q6prm: add support for LPASS LPR resource votingPrasad Kumpatla3-3/+16
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-01ASoC: qcom: qdsp6: Increase Q6DSP_MAX_CLK_ID for LPASS LPR vote clockPrasad Kumpatla1-1/+1
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-07-31ASoC: qcom: audioreach: support WSA speakers only on WSA2Mark Brown2-10/+94
Neil Armstrong <neil.armstrong@linaro.org> says: The Qualcom SM8650 based Ayaneo Pocket S2 gaming device has a set of 2 WSA speakers connected on the WSA2 lines. But the Audioreach DSP only handles WSA2 in pair with the WSA interface by using the upper bits of the active_channels_mask for WSA2 and the lower bits for WSA: __________________________________________________ | Bits | 3 | 2 | 1 | 0 | --------------------------------------------------- | Line | WSA2 Ch2 | WSA2 Ch1 | WSA Ch2 | WSA Ch1 | --------------------------------------------------- Setting only the WSA2 upper bits is perfectly valid and functional but the current Audioreach code builds the bitmask from the channels count with: active_channels_mask = (1 << num_channels) - 1; In order to enable the WSA2 bits the channel count should be 4, but the lower WSA bits are then also enabled and the DSP errors out when trying to play on the disabled WSA interface. A solution would've been to add a fake WSA2 topology element which would be translated into the top bits only, but it's not clean and add some special exceptions in the generic Audioreach code. The solution suggested by Srinivas is to use the channel mapping to set this bitmask. This works but makes all the other calls using the channel mapping fail because the DSP requires the channel_mapping table to start from index 0 and using num_channel length in order to apply the mapping on the active_channels_mask bits in order. So if you have an active_channels_mask like: _______________________ | Bits | 3 | 2 | 1 | 0 | ------------------------- | Mask | 1 | 1 | 0 | 0 | ------------------------ And the channel mapping: _________________________________ | Channel | 3 | 2 | 1 | 0 | ----------------------------------- | Mapping | FR | FL | NULL | NULL | ----------------------------------- Will need to be converted to: ____________________ | Channel | 1 | 0 | --------------------- | Mapping | FR | FL | --------------------- And the DSP will map FR on WSA2 Ch2 and FL on WSA2 Ch1 as: _________________________________ | Line | WSA2 Ch2 | WSA2 Ch1 | ---------------------------------- | Mapping | FR | FL | ---------------------------------- So we need to skip the empty channel mapping entries in all other users of the channel_map to build valid channel_mapping tables. This should not break any other usecases since the default channel mapping always start from index 0, and will add flexibilty to allow some special non linear mapping for other interfaces as well. Finally we add a special prepare callback for the Ayaneo PS2 sound card which sets the custom channel mapping for the WSA interface to make audio work properly on the gaming device. Link: https://patch.msgid.link/20260728-topic-sm8650-ayaneo-pocket-s2-wsa2-fix-v3-0-b29f44720178@linaro.org
2026-07-31ASoC: qcom: sc8280xp: add Ayaneo Pocket S2 card with special WSA channel mappingNeil Armstrong1-0/+57
The WSA Speakers are connected on the WSA2 interface, but the WSA and WSA2 links are handled as a single dai and DSP interface, so we need to specify the channel mapping of the Ayaneo Pocket S2 for the WSA dai in order to have functional playback and avoid DSP errors. Let's add a special entry for the Ayaneo Pocket S2 adding a prepare callback in order to set the proper channel mapping. Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260728-topic-sm8650-ayaneo-pocket-s2-wsa2-fix-v3-3-b29f44720178@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-31ASoC: qcom: audioreach: compute active channel maps from channel_mapNeil Armstrong1-10/+37
The Qualcom SM8650 based Ayaneo Pocket S2 gaming device has a set of 2 WSA speakers connected on the WSA2 lines. But the Audioreach DSP only handles WSA2 in pair with the WSA interface by using the upper bits of the active_channels_mask for WSA2 and the lower bits for WSA: /-------------------------------------------------\ | Bits | 3 | 2 | 1 | 0 | |-------------------------------------------------| | Line | WSA2 Ch2 | WSA2 Ch1 | WSA Ch2 | WSA Ch1 | \-------------------------------------------------/ Setting only the WSA2 upper bits is perfectly valid and functional but the current Audioreach code builds the bitmask from the channels count with: active_channels_mask = (1 << num_channels) - 1; In order to enable the WSA2 bits the channel count should be 4, but the lower WSA bits are then also enabled and the DSP errors out when trying to play on the disabled WSA interface. A solution would've been to add a fake WSA2 topology element which would be translated into the top bits only, but it's not clean and add some special exceptions in the generic Audioreach code. The solution suggested by Srinivas is to use the channel mapping to set this bitmask. This works but makes all the other calls using the channel mapping fail because the DSP requires the channel_mapping table to start from index 0 and using num_channel length in order to apply the mapping on the active_channels_mask bits in order. So we need to skip the empty channel mapping entries in all other users of the channel_map to build valid channel_mapping tables. This should not break any other usecases since the default channel mapping always start from index 0, and will add flexibilty to allow some special non linear mapping for other interfaces as well. Suggested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260728-topic-sm8650-ayaneo-pocket-s2-wsa2-fix-v3-1-b29f44720178@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: SM8475 sndcard supportMark Brown1-0/+8
Esteban Urrutia <esteuwu@proton.me> says: Add the required bindings and driver support for supporting the sound card found in the SM8475 SoC. Link: https://patch.msgid.link/20260729-sm8475-asoc-v1-0-3edad8aa7628@proton.me
2026-07-30ASoC: qcom: sc8280xp: Add support for SM8475Esteban Urrutia1-0/+8
With this, SM8475 topologies can have their own firmware folder. Signed-off-by: Esteban Urrutia <esteuwu@proton.me> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260729-sm8475-asoc-v1-2-3edad8aa7628@proton.me Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: qcom: sc8280xp: allow setting m2is clocks for SM8[456]50 boardsNeil Armstrong1-0/+18
Extend the sc8280xp card to add settings to setup I2S clock and line properties. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260728-topic-sm8x50-next-hdk-i2s-v1-1-2393a0fe4aa9@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-27ASoC: qcom: sc8280xp: Add support for HawiPrasad Kumpatla1-0/+10
Add compatible for sound card on Qualcomm Hawi platform. Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260713180907.874954-3-prasad.kumpatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-26ASoC: qcom: sc8280xp: enhance machine driver for board-specific configMohammad Rafi Shaik1-20/+231
The sc8280xp machine driver is currently written with a largely SoC-centric view and assumes a uniform audio topology across all boards. In practice, multiple products based on the same SoC use different board designs and external audio components, which require board-specific configuration to function correctly. Several Qualcomm platforms integrate third-party audio codecs or use different external audio paths. These designs often require additional configuration such as explicit MI2S MCLK/BCLK settings for audio to work. This change enhances the sc8280xp machine driver to support board-specific configuration such as allowing each board variant to provide its own DAPM widgets and routes, reflecting the actual audio components and connectors present and enabling MI2S MCLK programming for boards that use external codecs requiring a stable master clock. Tested-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com> Link: https://patch.msgid.link/20260724182446.1484894-4-mohammad.rafi.shaik@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-26ASoC: qcom: q6apm-lpass-dais: Add MI2S clock controlMohammad Rafi Shaik2-2/+169
Add support for MI2S clock control within q6apm-lpass DAIs, including handling of MCLK, BCLK via the DAI .set_sysclk callback. Each MI2S port now retrieves its clock handles from the device tree, allowing per-port clock configuration and proper enable/disable during startup and shutdown. Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com> Link: https://patch.msgid.link/20260724182446.1484894-3-mohammad.rafi.shaik@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21ASoC: qcom: storm: use dev instead of card on storm_parse_of()Kuninori Morimoto1-6/+6
storm_parse_of() can be processed without using *card. No functional change, but is preparation for Card capsuling. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/87mrvli0hx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21ASoC: qcom: sdm845: remove unused cardKuninori Morimoto1-2/+0
It is not used. Let's remove. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/87o6g1i0i6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21ASoC: qcom: common: use devKuninori Morimoto1-4/+4
qcom_snd_parse_of() already have dev. Let's use it. No functional change, but is preparation for Card capsuling. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/87pl0hi0il.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08ASoC: qcom: sc8280xp: Add support for ElizaRavi Hothi1-0/+1
Add compatible for sound card on Qualcomm Eliza boards. Signed-off-by: Ravi Hothi <ravi.hothi@oss.qualcomm.com> Link: https://patch.msgid.link/20260703073434.2589657-4-ravi.hothi@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-03Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files)Uwe Kleine-König (The Capable Hub)3-3/+0
Replace the #include of <linux/mod_devicetable.h> by the more specific <linux/device-id/*.h> where applicable. For most cases the include can be dropped completely, only a few drivers need one or two headers added. Acked-by: Danilo Krummrich <dakr@kernel.org> Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
2026-06-17ASoC: qcom: q6apm: fix NULL pointer dereference in graph_callbackSrinivas Kandagatla1-0/+8
When q6apm_free_fragments() is called it frees rx_data.buf/tx_data.buf and sets them to NULL under graph->lock. A late DSP buffer-done response can race with this: graph_callback() passes the !graph->ar_graph guard (not yet NULL), acquires the lock, but then dereferences a now-NULL buf pointer to read buf[token].phys, crashing at virtual address 0x10. Add a NULL check for buf inside the mutex-protected section in both the write-done (DATA_CMD_RSP_WR_SH_MEM_EP_DATA_BUFFER_DONE_V2) and read-done (DATA_CMD_RSP_RD_SH_MEM_EP_DATA_BUFFER_V2) handlers and bail out cleanly if buffers have already been freed. This problem is only shown up recently while apr bus was updated to process the commands per service rather from single global queue. Fixes: 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support") Cc: Stable@vger.kernel.org Assisted-by: Claude:claude-4-6-sonnet Reported-by: Val Packett <val@packett.cool> Closes: https://lore.kernel.org/all/133ced18-1aa9-475d-80d8-6120678bdde4@packett.cool/ Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260616170257.9381-1-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-12ASoC: use scoped OF node handling in manual cleanup pathsMark Brown1-32/+15
Cássio Gabriel <cassiogabrielcontato@gmail.com> says: Some ASoC drivers still manually release child OF nodes when leaving child-node iteration loops early. Convert these focused cases to scoped OF node cleanup so early returns and normal loop exits keep the same node lifetime handling without explicit of_node_put() calls. - Patch 1 updates qcom_snd_parse_of() to use for_each_available_child_of_node_scoped() for link nodes and __free(device_node) for temporary cpu/platform/codec child nodes. - Patch 2 updates fsl_qmc_audio to use for_each_available_child_of_node_scoped() for DAI child-node parsing. - Patch 3 updates cygnus-ssp to use for_each_available_child_of_node_scoped() for SSP child-node parsing. Link: https://patch.msgid.link/20260608-asoc-of-node-scoped-cleanup-v1-0-9e3ac518dc2e@gmail.com
2026-06-12ASoC: qcom: common: use scoped OF node handlingCássio Gabriel1-32/+15
qcom_snd_parse_of() manually drops the link child node and the cpu/platform/codec child nodes on error paths and at the end of each iteration. Use for_each_available_child_of_node_scoped() for the link node and __free(device_node) for the named child nodes. This keeps the existing ownership rules for DAI component phandle references, while removing the manual cleanup labels from a path that has previously needed OF refcount fixes. Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260608-asoc-of-node-scoped-cleanup-v1-1-9e3ac518dc2e@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>