[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251015131740.340258-10-srinivas.kandagatla@oss.qualcomm.com>
Date: Wed, 15 Oct 2025 14:17:39 +0100
From: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
To: broonie@...nel.org
Cc: perex@...ex.cz, tiwai@...e.com, srini@...nel.org, alexey.klimov@...aro.org,
linux-sound@...r.kernel.org, m.facchin@...uino.cc,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
Subject: [PATCH 9/9] ASoC: qcom: q6asm: set runtime correctly for each stream
Both capture and playback can have different runtimes, so set them
accordingly.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
---
sound/soc/qcom/qdsp6/q6asm-dai.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
index c2a33d6a0827..97256313c01a 100644
--- a/sound/soc/qcom/qdsp6/q6asm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
@@ -433,10 +433,13 @@ static int q6asm_dai_open(struct snd_soc_component *component,
runtime->private_data = prtd;
- snd_soc_set_runtime_hwparams(substream, &q6asm_dai_hardware_playback);
-
- runtime->dma_bytes = q6asm_dai_hardware_playback.buffer_bytes_max;
-
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ snd_soc_set_runtime_hwparams(substream, &q6asm_dai_hardware_playback);
+ runtime->dma_bytes = q6asm_dai_hardware_playback.buffer_bytes_max;
+ } else {
+ snd_soc_set_runtime_hwparams(substream, &q6asm_dai_hardware_capture);
+ runtime->dma_bytes = q6asm_dai_hardware_capture.buffer_bytes_max;
+ }
if (pdata->sid < 0)
prtd->phys = substream->dma_buffer.addr;
--
2.51.0
Powered by blists - more mailing lists