Commit 961e7ba5 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Mark Brown

ASoC: qcom: sm8250: add support for TX and RX Macro dais

On SM8250 MTP boards WCD938x codec is connected via TX and RX Macros,
so add support for this dais in the soundcard driver.
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20211006172745.22103-2-srinivas.kandagatla@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a79b02d5
...@@ -69,6 +69,12 @@ static int sm8250_snd_hw_params(struct snd_pcm_substream *substream, ...@@ -69,6 +69,12 @@ static int sm8250_snd_hw_params(struct snd_pcm_substream *substream,
switch (cpu_dai->id) { switch (cpu_dai->id) {
case WSA_CODEC_DMA_RX_0: case WSA_CODEC_DMA_RX_0:
case RX_CODEC_DMA_RX_0:
case RX_CODEC_DMA_RX_1:
case TX_CODEC_DMA_TX_0:
case TX_CODEC_DMA_TX_1:
case TX_CODEC_DMA_TX_2:
case TX_CODEC_DMA_TX_3:
for_each_rtd_codec_dais(rtd, i, codec_dai) { for_each_rtd_codec_dais(rtd, i, codec_dai) {
sruntime = snd_soc_dai_get_sdw_stream(codec_dai, sruntime = snd_soc_dai_get_sdw_stream(codec_dai,
substream->stream); substream->stream);
...@@ -129,6 +135,12 @@ static int sm8250_snd_prepare(struct snd_pcm_substream *substream) ...@@ -129,6 +135,12 @@ static int sm8250_snd_prepare(struct snd_pcm_substream *substream)
switch (cpu_dai->id) { switch (cpu_dai->id) {
case WSA_CODEC_DMA_RX_0: case WSA_CODEC_DMA_RX_0:
case WSA_CODEC_DMA_RX_1: case WSA_CODEC_DMA_RX_1:
case RX_CODEC_DMA_RX_0:
case RX_CODEC_DMA_RX_1:
case TX_CODEC_DMA_TX_0:
case TX_CODEC_DMA_TX_1:
case TX_CODEC_DMA_TX_2:
case TX_CODEC_DMA_TX_3:
return sm8250_snd_wsa_dma_prepare(substream); return sm8250_snd_wsa_dma_prepare(substream);
default: default:
break; break;
...@@ -147,6 +159,12 @@ static int sm8250_snd_hw_free(struct snd_pcm_substream *substream) ...@@ -147,6 +159,12 @@ static int sm8250_snd_hw_free(struct snd_pcm_substream *substream)
switch (cpu_dai->id) { switch (cpu_dai->id) {
case WSA_CODEC_DMA_RX_0: case WSA_CODEC_DMA_RX_0:
case WSA_CODEC_DMA_RX_1: case WSA_CODEC_DMA_RX_1:
case RX_CODEC_DMA_RX_0:
case RX_CODEC_DMA_RX_1:
case TX_CODEC_DMA_TX_0:
case TX_CODEC_DMA_TX_1:
case TX_CODEC_DMA_TX_2:
case TX_CODEC_DMA_TX_3:
if (sruntime && data->stream_prepared[cpu_dai->id]) { if (sruntime && data->stream_prepared[cpu_dai->id]) {
sdw_disable_stream(sruntime); sdw_disable_stream(sruntime);
sdw_deprepare_stream(sruntime); sdw_deprepare_stream(sruntime);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment