Skip to contentSkip to conversation

ASoC: Fix setting aif_val in lm49453_set_dai_fmt

PATCH RESEND In review Axel Lin 2 participants 2 messages Apr 9, 2012 – Apr 10, 2012

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH RESEND 1/1 ASoC: Fix setting aif_val in lm49453_set_dai_fmt

CBS/CBM/CFS/CFM settings are controlled by BIT[3:4] of 0x60h

for example, for SND_SOC_DAIFMT_CBS_CFS: what we want is to clear both BIT[3:4].

aif_val = ~LM49453_AUDIO_PORT1_BASIC_CLK_MS | ~LM49453_AUDIO_PORT1_BASIC_SYNC_MS; actually set both bits.

---
Seems the my mail failed to reach alsa mailing list. I resend to LKML instead.

Axel

 sound/soc/codecs/lm49453.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
sound/soc/codecs/lm49453.c +2 -6
index 744063d..a25e80a 100644
@@ -1185,16 +1185,12 @@ static int lm49453_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
 
 	switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
 	case SND_SOC_DAIFMT_CBS_CFS:
-		aif_val = ~LM49453_AUDIO_PORT1_BASIC_CLK_MS |
-			~LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
 		break;
 	case SND_SOC_DAIFMT_CBS_CFM:
-		aif_val = ~LM49453_AUDIO_PORT1_BASIC_CLK_MS |
-			LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
+		aif_val = LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
 		break;
 	case SND_SOC_DAIFMT_CBM_CFS:
-		aif_val = LM49453_AUDIO_PORT1_BASIC_CLK_MS |
-			~LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
+		aif_val = LM49453_AUDIO_PORT1_BASIC_CLK_MS;
 		break;
 	case SND_SOC_DAIFMT_CBM_CFM:
 		aif_val = LM49453_AUDIO_PORT1_BASIC_CLK_MS |
Signature · 1 line
1.7.5.4
#1 lore raw

This issues was fixed last week itself.
URL for the patch -
http://mailman.alsa-project.org/pipermail/alsa-devel/2012-April/050967.html

Thanks
Swami

Quoted 44 lines · Axel Lin

CBS/CBM/CFS/CFM settings are controlled by BIT[3:4] of 0x60h

for example, for SND_SOC_DAIFMT_CBS_CFS: what we want is to clear both BIT[3:4].

aif_val = ~LM49453_AUDIO_PORT1_BASIC_CLK_MS | ~LM49453_AUDIO_PORT1_BASIC_SYNC_MS; actually set both bits.

---
Seems the my mail failed to reach alsa mailing list. I resend to LKML instead.

Axel

 sound/soc/codecs/lm49453.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
sound/soc/codecs/lm49453.c +2 -7
index 744063d..a25e80a 100644
@@ -1185,16 +1185,12 @@ static int lm49453_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
 
        switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
        case SND_SOC_DAIFMT_CBS_CFS:
-               aif_val = ~LM49453_AUDIO_PORT1_BASIC_CLK_MS |
-                       ~LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
                break;
        case SND_SOC_DAIFMT_CBS_CFM:
-               aif_val = ~LM49453_AUDIO_PORT1_BASIC_CLK_MS |
-                       LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
+               aif_val = LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
                break;
        case SND_SOC_DAIFMT_CBM_CFS:
-               aif_val = LM49453_AUDIO_PORT1_BASIC_CLK_MS |
-                       ~LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
+               aif_val = LM49453_AUDIO_PORT1_BASIC_CLK_MS;
                break;
        case SND_SOC_DAIFMT_CBM_CFM:
                aif_val = LM49453_AUDIO_PORT1_BASIC_CLK_MS |
--

1.7.5.4