[alsa-devel] [PATCH 2/3] ASoC: cs42xx8: allow IC master mode.

Matt Flax flatmax at flatmax.org
Sat Feb 25 06:03:13 CET 2017


This patch allows the cs42xx8 to be put into slave mode when an IC
(between this codec and the SoC) is master.

It sets slave mode by treating SND_SOC_DAIFMT_IBM_IFM in the same way
it treats SND_SOC_DAIFMT_CBS_CFS.

Signed-off-by: Matt Flax <flatmax at flatmax.org>
---
 sound/soc/codecs/cs42xx8.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c
index c1785bd..34f9adb 100644
--- a/sound/soc/codecs/cs42xx8.c
+++ b/sound/soc/codecs/cs42xx8.c
@@ -235,6 +235,7 @@ static int cs42xx8_set_dai_fmt(struct snd_soc_dai *codec_dai,
 	/* Set master/slave audio interface */
 	switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
 	case SND_SOC_DAIFMT_CBS_CFS:
+	case SND_SOC_DAIFMT_IBM_IFM:
 		cs42xx8->slave_mode = true;
 		break;
 	case SND_SOC_DAIFMT_CBM_CFM:
-- 
2.7.4



More information about the Alsa-devel mailing list