All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC: qcom: misc fixes for LPASS driver
@ 2026-09-02  7:19 wangdich9700
  2026-09-02  7:19 ` [PATCH 1/3] ASoC: qcom: fix assorted whitespace issues wangdich9700
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: wangdich9700 @ 2026-09-02  7:19 UTC (permalink / raw)
  To: srini, broonie, tiwai, wangdich9700
  Cc: linux-sound, linux-kernel, wangdicheng

From: wangdicheng <wangdicheng@kylinos.cn>

A few small fixes for the Qualcomm LPASS ASoC driver:

  - Fix "LPASS_CDC_DMA_VA_TX0 ... LPASS_CDC_DMA_VA_TX0" case ranges
    that only matched VA_TX0, so VA_TX1..VA_TX8 hit the default case.
    In lpass-cdc-dma.c the va_mem0 clock was also not prepared for
    those DAIs.

  - Fix a misleading error message in lpass-hdmi.c that reported an
    invalid bit width when an unsupported sample rate was given.

  - Fix stray double spaces and blank lines.

wangdicheng (3):
  ASoC: qcom: fix assorted whitespace issues
  ASoC: qcom: lpass-hdmi: fix invalid rate error message
  ASoC: qcom: fix VA CDC DMA DAI range handling

 sound/soc/qcom/common.c         |  1 -
 sound/soc/qcom/lpass-cdc-dma.c  | 10 +++++-----
 sound/soc/qcom/lpass-cpu.c      |  2 +-
 sound/soc/qcom/lpass-hdmi.c     |  5 ++---
 sound/soc/qcom/lpass-platform.c |  6 +++---
 sound/soc/qcom/sdw.c            |  3 +--
 6 files changed, 12 insertions(+), 15 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] ASoC: qcom: fix assorted whitespace issues
  2026-09-02  7:19 [PATCH 0/3] ASoC: qcom: misc fixes for LPASS driver wangdich9700
@ 2026-09-02  7:19 ` wangdich9700
  2026-09-02  7:19 ` [PATCH 2/3] ASoC: qcom: lpass-hdmi: fix invalid rate error message wangdich9700
  2026-09-02  7:19 ` [PATCH 3/3] ASoC: qcom: fix VA CDC DMA DAI range handling wangdich9700
  2 siblings, 0 replies; 5+ messages in thread
From: wangdich9700 @ 2026-09-02  7:19 UTC (permalink / raw)
  To: srini, broonie, tiwai, wangdich9700
  Cc: linux-sound, linux-kernel, wangdicheng

From: wangdicheng <wangdicheng@kylinos.cn>

Fix stray double spaces and blank lines across the qcom ASoC driver.

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

diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c
index d9f256d51973..5e1ee8466901 100644
--- a/sound/soc/qcom/common.c
+++ b/sound/soc/qcom/common.c
@@ -389,7 +389,6 @@ int qcom_snd_wcd_jack_setup(struct snd_soc_pcm_runtime *rtd,
 		break;
 	}
 
-
 	return 0;
 }
 EXPORT_SYMBOL_GPL(qcom_snd_wcd_jack_setup);
diff --git a/sound/soc/qcom/lpass-cdc-dma.c b/sound/soc/qcom/lpass-cdc-dma.c
index 2dc8c75c4bf0..5be13dd59517 100644
--- a/sound/soc/qcom/lpass-cdc-dma.c
+++ b/sound/soc/qcom/lpass-cdc-dma.c
@@ -111,7 +111,7 @@ static int __lpass_get_codec_dma_intf_type(int dai_id)
 		ret = LPASS_CDC_DMA_INTERFACE9;
 		break;
 	case LPASS_CDC_DMA_RX9:
-		ret  = LPASS_CDC_DMA_INTERFACE10;
+		ret = LPASS_CDC_DMA_INTERFACE10;
 		break;
 	default:
 		ret = -EINVAL;
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index 242bc16da36d..4f8017357aa4 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -468,7 +468,7 @@ static int asoc_qcom_of_xlate_dai_name(struct snd_soc_component *component,
 	int ret = -EINVAL;
 	int i;
 
-	for (i = 0; i  < variant->num_dai; i++) {
+	for (i = 0; i < variant->num_dai; i++) {
 		if (variant->dai_driver[i].id == id) {
 			*dai_name = variant->dai_driver[i].name;
 			ret = 0;
diff --git a/sound/soc/qcom/lpass-hdmi.c b/sound/soc/qcom/lpass-hdmi.c
index 6d9795306cfa..8bbe43facdc1 100644
--- a/sound/soc/qcom/lpass-hdmi.c
+++ b/sound/soc/qcom/lpass-hdmi.c
@@ -5,7 +5,6 @@
  * lpass-hdmi.c -- ALSA SoC HDMI-CPU DAI driver for QTi LPASS HDMI
  */
 
-
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <sound/pcm_params.h>
diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c
index e162627d6f86..b335b2c8bb16 100644
--- a/sound/soc/qcom/lpass-platform.c
+++ b/sound/soc/qcom/lpass-platform.c
@@ -19,7 +19,7 @@
 
 #define DRV_NAME "lpass-platform"
 
-#define LPASS_PLATFORM_BUFFER_SIZE	(24 *  2 * 1024)
+#define LPASS_PLATFORM_BUFFER_SIZE	(24 * 2 * 1024)
 #define LPASS_PLATFORM_PERIODS		2
 #define LPASS_RXTX_CDC_DMA_LPM_BUFF_SIZE (8 * 1024)
 #define LPASS_VA_CDC_DMA_LPM_BUFF_SIZE (12 * 1024)
diff --git a/sound/soc/qcom/sdw.c b/sound/soc/qcom/sdw.c
index 6576b47a4c8c..981884927e30 100644
--- a/sound/soc/qcom/sdw.c
+++ b/sound/soc/qcom/sdw.c
@@ -131,7 +131,6 @@ int qcom_snd_sdw_prepare(struct snd_pcm_substream *substream,
 	struct sdw_stream_runtime *sruntime;
 	int ret;
 
-
 	if (!qcom_snd_is_sdw_dai(cpu_dai->id))
 		return 0;
 
@@ -159,7 +158,7 @@ int qcom_snd_sdw_prepare(struct snd_pcm_substream *substream,
 		sdw_deprepare_stream(sruntime);
 		return ret;
 	}
-	*stream_prepared  = true;
+	*stream_prepared = true;
 
 	return ret;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] ASoC: qcom: lpass-hdmi: fix invalid rate error message
  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 ` wangdich9700
  2026-09-02 14:45   ` Mark Brown
  2026-09-02  7:19 ` [PATCH 3/3] ASoC: qcom: fix VA CDC DMA DAI range handling wangdich9700
  2 siblings, 1 reply; 5+ messages in thread
From: wangdich9700 @ 2026-09-02  7:19 UTC (permalink / raw)
  To: srini, broonie, tiwai, wangdich9700
  Cc: linux-sound, linux-kernel, wangdicheng

From: wangdicheng <wangdicheng@kylinos.cn>

The sampling rate switch reused the bitwidth error path, so an
unsupported rate logged "invalid bit width" with the bitwidth value.
Print the rate instead.

Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
---
 sound/soc/qcom/lpass-hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/qcom/lpass-hdmi.c b/sound/soc/qcom/lpass-hdmi.c
index 8bbe43facdc1..dd0ae4fbc841 100644
--- a/sound/soc/qcom/lpass-hdmi.c
+++ b/sound/soc/qcom/lpass-hdmi.c
@@ -64,8 +64,8 @@ static int lpass_hdmi_daiops_hw_params(struct snd_pcm_substream *substream,
 		sampling_freq = LPASS_SAMPLING_FREQ48;
 		break;
 	default:
-		dev_err(dai->dev, "%s invalid bit width given : %d\n",
-					__func__, bitwidth);
+		dev_err(dai->dev, "%s invalid sampling rate given : %d\n",
+					__func__, rate);
 		return -EINVAL;
 	}
 	data_format = LPASS_DATA_FORMAT_LINEAR;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ASoC: qcom: fix VA CDC DMA DAI range handling
  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  7:19 ` wangdich9700
  2 siblings, 0 replies; 5+ messages in thread
From: wangdich9700 @ 2026-09-02  7:19 UTC (permalink / raw)
  To: srini, broonie, tiwai, wangdich9700
  Cc: linux-sound, linux-kernel, wangdicheng

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/3] ASoC: qcom: lpass-hdmi: fix invalid rate error message
  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
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-09-02 14:45 UTC (permalink / raw)
  To: wangdich9700; +Cc: srini, tiwai, linux-sound, linux-kernel, wangdicheng

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

On Wed, Sep 02, 2026 at 03:19:42PM +0800, wangdich9700@163.com wrote:
> From: wangdicheng <wangdicheng@kylinos.cn>
> 
> The sampling rate switch reused the bitwidth error path, so an
> unsupported rate logged "invalid bit width" with the bitwidth value.
> Print the rate instead.

>  	default:
> -		dev_err(dai->dev, "%s invalid bit width given : %d\n",
> -					__func__, bitwidth);
> +		dev_err(dai->dev, "%s invalid sampling rate given : %d\n",

rate is unsigned; I am surprised you don't get compiler warnings about
that.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-02 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 3/3] ASoC: qcom: fix VA CDC DMA DAI range handling wangdich9700

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.