[PATCH 1/2] ASoC: dt-bindings: qcom,q6dsp-lpass-ports: Add WSA2 audio ports IDs
Add defines for audio ports used on Qualcomm WSA2 LPASS (Low Power Audio SubSystem).
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h index 39f203256c4f..c5ea35abf129 100644 --- a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h +++ b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h @@ -139,6 +139,11 @@ #define DISPLAY_PORT_RX_5 133 #define DISPLAY_PORT_RX_6 134 #define DISPLAY_PORT_RX_7 135 +#define WSA2_CODEC_DMA_RX_0 136 +#define WSA2_CODEC_DMA_TX_0 137 +#define WSA2_CODEC_DMA_RX_1 138 +#define WSA2_CODEC_DMA_TX_1 139 +#define WSA2_CODEC_DMA_TX_2 140
#define LPASS_CLK_ID_PRI_MI2S_IBIT 1 #define LPASS_CLK_ID_PRI_MI2S_EBIT 2
Add support for Qualcomm WSA2 LPASS (Low Power Audio SubSystem) audio ports to several Qualcomm ADSP drivers: Q6APM LPASS DAIs, Q6DSP LPASS ports and shared Q6DSP Soundwire code.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 5 +++++ sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c | 6 ++++++ sound/soc/qcom/sdw.c | 5 +++++ 3 files changed, 16 insertions(+)
diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c index c5e065a21e27..2ae10f9dc78e 100644 --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c @@ -36,6 +36,9 @@ static int q6dma_set_channel_map(struct snd_soc_dai *dai, case WSA_CODEC_DMA_TX_0: case WSA_CODEC_DMA_TX_1: case WSA_CODEC_DMA_TX_2: + case WSA2_CODEC_DMA_TX_0: + case WSA2_CODEC_DMA_TX_1: + case WSA2_CODEC_DMA_TX_2: case VA_CODEC_DMA_TX_0: case VA_CODEC_DMA_TX_1: case VA_CODEC_DMA_TX_2: @@ -60,6 +63,8 @@ static int q6dma_set_channel_map(struct snd_soc_dai *dai, break; case WSA_CODEC_DMA_RX_0: case WSA_CODEC_DMA_RX_1: + case WSA2_CODEC_DMA_RX_0: + case WSA2_CODEC_DMA_RX_1: case RX_CODEC_DMA_RX_0: case RX_CODEC_DMA_RX_1: case RX_CODEC_DMA_RX_2: diff --git a/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c b/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c index 4919001de08b..a6502884531d 100644 --- a/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c +++ b/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c @@ -557,6 +557,11 @@ static struct snd_soc_dai_driver q6dsp_audio_fe_dais[] = { Q6AFE_CDC_DMA_RX_DAI(WSA_CODEC_DMA_RX_1), Q6AFE_CDC_DMA_TX_DAI(WSA_CODEC_DMA_TX_1), Q6AFE_CDC_DMA_TX_DAI(WSA_CODEC_DMA_TX_2), + Q6AFE_CDC_DMA_RX_DAI(WSA2_CODEC_DMA_RX_0), + Q6AFE_CDC_DMA_TX_DAI(WSA2_CODEC_DMA_TX_0), + Q6AFE_CDC_DMA_RX_DAI(WSA2_CODEC_DMA_RX_1), + Q6AFE_CDC_DMA_TX_DAI(WSA2_CODEC_DMA_TX_1), + Q6AFE_CDC_DMA_TX_DAI(WSA2_CODEC_DMA_TX_2), Q6AFE_CDC_DMA_TX_DAI(VA_CODEC_DMA_TX_0), Q6AFE_CDC_DMA_TX_DAI(VA_CODEC_DMA_TX_1), Q6AFE_CDC_DMA_TX_DAI(VA_CODEC_DMA_TX_2), @@ -622,6 +627,7 @@ struct snd_soc_dai_driver *q6dsp_audio_ports_set_config(struct device *dev, q6dsp_audio_fe_dais[i].ops = cfg->q6tdm_ops; break; case WSA_CODEC_DMA_RX_0 ... RX_CODEC_DMA_RX_7: + case WSA2_CODEC_DMA_RX_0 ... WSA2_CODEC_DMA_TX_2: q6dsp_audio_fe_dais[i].ops = cfg->q6dma_ops; break; default: diff --git a/sound/soc/qcom/sdw.c b/sound/soc/qcom/sdw.c index 1a41419c7eb8..612865b26f88 100644 --- a/sound/soc/qcom/sdw.c +++ b/sound/soc/qcom/sdw.c @@ -21,6 +21,8 @@ int qcom_snd_sdw_prepare(struct snd_pcm_substream *substream, switch (cpu_dai->id) { case WSA_CODEC_DMA_RX_0: case WSA_CODEC_DMA_RX_1: + case WSA2_CODEC_DMA_RX_0: + case WSA2_CODEC_DMA_RX_1: case RX_CODEC_DMA_RX_0: case RX_CODEC_DMA_RX_1: case TX_CODEC_DMA_TX_0: @@ -70,6 +72,7 @@ int qcom_snd_sdw_hw_params(struct snd_pcm_substream *substream,
switch (cpu_dai->id) { case WSA_CODEC_DMA_RX_0: + case WSA2_CODEC_DMA_RX_0: case RX_CODEC_DMA_RX_0: case RX_CODEC_DMA_RX_1: case TX_CODEC_DMA_TX_0: @@ -98,6 +101,8 @@ int qcom_snd_sdw_hw_free(struct snd_pcm_substream *substream, switch (cpu_dai->id) { case WSA_CODEC_DMA_RX_0: case WSA_CODEC_DMA_RX_1: + case WSA2_CODEC_DMA_RX_0: + case WSA2_CODEC_DMA_RX_1: case RX_CODEC_DMA_RX_0: case RX_CODEC_DMA_RX_1: case TX_CODEC_DMA_TX_0:
On 10/19/23 17:35, Krzysztof Kozlowski wrote:
Add support for Qualcomm WSA2 LPASS (Low Power Audio SubSystem) audio ports to several Qualcomm ADSP drivers: Q6APM LPASS DAIs, Q6DSP LPASS ports and shared Q6DSP Soundwire code.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
Wouldn't
sound/soc/qcom/qdsp6/q6afe.c sound/soc/qcom/qdsp6/q6routing.c sound/soc/qcom/qdsp6/q6afe-dai.c
also require updates?
Konrad
On 21/10/2023 19:40, Konrad Dybcio wrote:
On 10/19/23 17:35, Krzysztof Kozlowski wrote:
Add support for Qualcomm WSA2 LPASS (Low Power Audio SubSystem) audio ports to several Qualcomm ADSP drivers: Q6APM LPASS DAIs, Q6DSP LPASS ports and shared Q6DSP Soundwire code.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
Wouldn't
sound/soc/qcom/qdsp6/q6afe.c sound/soc/qcom/qdsp6/q6routing.c sound/soc/qcom/qdsp6/q6afe-dai.c
also require updates?
Not sure, these are older audio blocks (pre-audioreach), so I have never investigated if they have WSA2.
Best regards, Krzysztof
Hi Krzysztof,
On 19/10/2023 16:35, Krzysztof Kozlowski wrote:
Add defines for audio ports used on Qualcomm WSA2 LPASS (Low Power Audio SubSystem).
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h index 39f203256c4f..c5ea35abf129 100644 --- a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h +++ b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h @@ -139,6 +139,11 @@ #define DISPLAY_PORT_RX_5 133 #define DISPLAY_PORT_RX_6 134 #define DISPLAY_PORT_RX_7 135 +#define WSA2_CODEC_DMA_RX_0 136 +#define WSA2_CODEC_DMA_TX_0 137 +#define WSA2_CODEC_DMA_RX_1 138 +#define WSA2_CODEC_DMA_TX_1 139 +#define WSA2_CODEC_DMA_TX_2 140
Patches looks fine as it is, but do you realize that this s a dead code w.r.t upstream. WSA2 is used only with 4 speaker setup and in such cases we use WSA codec dma to drive 4 channels.
So WSA2 will not be used by itself. I would prefer support for this to be added when we are really able to test WSA2 by itself.
thanks, Srini
#define LPASS_CLK_ID_PRI_MI2S_IBIT 1 #define LPASS_CLK_ID_PRI_MI2S_EBIT 2
On 23/10/2023 10:37, Srinivas Kandagatla wrote:
Hi Krzysztof,
On 19/10/2023 16:35, Krzysztof Kozlowski wrote:
Add defines for audio ports used on Qualcomm WSA2 LPASS (Low Power Audio SubSystem).
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h index 39f203256c4f..c5ea35abf129 100644 --- a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h +++ b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h @@ -139,6 +139,11 @@ #define DISPLAY_PORT_RX_5 133 #define DISPLAY_PORT_RX_6 134 #define DISPLAY_PORT_RX_7 135 +#define WSA2_CODEC_DMA_RX_0 136 +#define WSA2_CODEC_DMA_TX_0 137 +#define WSA2_CODEC_DMA_RX_1 138 +#define WSA2_CODEC_DMA_TX_1 139 +#define WSA2_CODEC_DMA_TX_2 140
Patches looks fine as it is, but do you realize that this s a dead code w.r.t upstream. WSA2 is used only with 4 speaker setup and in such cases we use WSA codec dma to drive 4 channels.
So WSA2 will not be used by itself. I would prefer support for this to be added when we are really able to test WSA2 by itself.
OK, the patchset can be ignored.
Best regards, Krzysztof
participants (3)
-
Konrad Dybcio
-
Krzysztof Kozlowski
-
Srinivas Kandagatla