[PATCH v1 1/3] ASoC: qcom: common: set codecless link to be a backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When codec subnode is missing in DAI link description in DT
the DAI link codec will be set to a dummy codec and link will be
recognised as front end. Any playback attempt will fail since it
will not be able to install hardware parameters. Fix this by
setting codecless link to be a back end.

Signed-off-by: Alexey Klimov <alexey.klimov@xxxxxxxxxx>
---
 sound/soc/qcom/common.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c
index 928cf5cb5999..e8ae15fcb1a3 100644
--- a/sound/soc/qcom/common.c
+++ b/sound/soc/qcom/common.c
@@ -159,6 +159,10 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
 			link->nonatomic = 1;
 		}
 
+		/* set codecless link with dummy codec to be a backend */
+		if (platform && !codec && link->codecs == &snd_soc_dummy_dlc)
+			link->no_pcm = 1;
+
 		link->stream_name = link->name;
 		link++;
 
-- 
2.45.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux