All of lore.kernel.org
 help / color / mirror / Atom feed
From: wangdich9700@163.com
To: srini@kernel.org, broonie@kernel.org, tiwai@suse.com,
	wangdich9700@163.com
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	wangdicheng@kylinos.cn
Subject: [PATCH 3/3] ASoC: qcom: fix VA CDC DMA DAI range handling
Date: Wed,  2 Sep 2026 15:19:43 +0800	[thread overview]
Message-ID: <20260902071943.522194-4-wangdich9700@163.com> (raw)
In-Reply-To: <20260902071943.522194-1-wangdich9700@163.com>

From: wangdicheng <wangdicheng@kylinos.cn>

Several switch statements used "LPASS_CDC_DMA_VA_TX0 ...
LPASS_CDC_DMA_VA_TX0" which only matches VA_TX0, leaving VA_TX1
through VA_TX8 to hit the default case and print a spurious error.
In lpass-cdc-dma.c this also meant the va_mem0 clock was not
prepared for those DAIs. Use LPASS_CDC_DMA_VA_TX8 as the upper bound
to match the rest of the driver.

Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
---
 sound/soc/qcom/lpass-cdc-dma.c  | 8 ++++----
 sound/soc/qcom/lpass-platform.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/qcom/lpass-cdc-dma.c b/sound/soc/qcom/lpass-cdc-dma.c
index 5be13dd59517..dc645fcfd33b 100644
--- a/sound/soc/qcom/lpass-cdc-dma.c
+++ b/sound/soc/qcom/lpass-cdc-dma.c
@@ -180,12 +180,12 @@ static int lpass_cdc_dma_daiops_startup(struct snd_pcm_substream *substream,
 		clk_set_rate(drvdata->codec_mem0, CODEC_MEM_HZ_NORMAL);
 		clk_prepare_enable(drvdata->codec_mem0);
 		break;
-	case LPASS_CDC_DMA_VA_TX0 ... LPASS_CDC_DMA_VA_TX0:
+	case LPASS_CDC_DMA_VA_TX0 ... LPASS_CDC_DMA_VA_TX8:
 		clk_set_rate(drvdata->va_mem0, CODEC_MEM_HZ_NORMAL);
 		clk_prepare_enable(drvdata->va_mem0);
 		break;
 	default:
-		dev_err(soc_runtime->dev, "%s: invalid  interface: %d\n", __func__, dai->id);
+		dev_err(soc_runtime->dev, "%s: invalid interface: %d\n", __func__, dai->id);
 		break;
 	}
 	return 0;
@@ -202,11 +202,11 @@ static void lpass_cdc_dma_daiops_shutdown(struct snd_pcm_substream *substream,
 	case LPASS_CDC_DMA_TX0 ... LPASS_CDC_DMA_TX8:
 		clk_disable_unprepare(drvdata->codec_mem0);
 		break;
-	case LPASS_CDC_DMA_VA_TX0 ... LPASS_CDC_DMA_VA_TX0:
+	case LPASS_CDC_DMA_VA_TX0 ... LPASS_CDC_DMA_VA_TX8:
 		clk_disable_unprepare(drvdata->va_mem0);
 		break;
 	default:
-		dev_err(soc_runtime->dev, "%s: invalid  interface: %d\n", __func__, dai->id);
+		dev_err(soc_runtime->dev, "%s: invalid interface: %d\n", __func__, dai->id);
 		break;
 	}
 }
diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c
index b335b2c8bb16..2f65e6a589bc 100644
--- a/sound/soc/qcom/lpass-platform.c
+++ b/sound/soc/qcom/lpass-platform.c
@@ -490,10 +490,10 @@ static int lpass_platform_pcmops_hw_params(struct snd_soc_component *component,
 		break;
 	case LPASS_CDC_DMA_RX0 ... LPASS_CDC_DMA_RX9:
 	case LPASS_CDC_DMA_TX0 ... LPASS_CDC_DMA_TX8:
-	case LPASS_CDC_DMA_VA_TX0 ... LPASS_CDC_DMA_VA_TX0:
+	case LPASS_CDC_DMA_VA_TX0 ... LPASS_CDC_DMA_VA_TX8:
 		break;
 	default:
-		dev_err(soc_runtime->dev, "%s: invalid  interface: %d\n", __func__, dai_id);
+		dev_err(soc_runtime->dev, "%s: invalid interface: %d\n", __func__, dai_id);
 		break;
 	}
 	switch (bitwidth) {
-- 
2.25.1


      parent reply	other threads:[~2026-09-02  7:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02  7:19 [PATCH 0/3] ASoC: qcom: misc fixes for LPASS driver wangdich9700
2026-09-02  7:19 ` [PATCH 1/3] ASoC: qcom: fix assorted whitespace issues wangdich9700
2026-09-02  7:19 ` [PATCH 2/3] ASoC: qcom: lpass-hdmi: fix invalid rate error message wangdich9700
2026-09-02 14:45   ` Mark Brown
2026-09-02  7:19 ` wangdich9700 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260902071943.522194-4-wangdich9700@163.com \
    --to=wangdich9700@163.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    --cc=wangdicheng@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.