Skip to contentSkip to conversation

ASoC: lm49453: Fix mask for setting mode bit in lm49453_set_dai_fmt()

PATCH Applied Axel Lin 3 participants 3 messages Dec 21, 2012 – Dec 24, 2012

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: lm49453: Fix mask for setting mode bit in lm49453_set_dai_fmt()

The mode variable is either 0 or 1.
To update mode setting, the mask should be BIT(0) rather than BIT(1).

---
Hi M R Swami,
I don't have the datasheet. Can you check if this patch is correct? Thanks,
Axel

 sound/soc/codecs/lm49453.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/lm49453.c +1 -1
index d75257d..c0d203b 100644
@@ -1218,7 +1218,7 @@ static int lm49453_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
 	}
 
 	snd_soc_update_bits(codec, LM49453_P0_AUDIO_PORT1_BASIC_REG,
-			    LM49453_AUDIO_PORT1_BASIC_FMT_MASK|BIT(1)|BIT(5),
+			    LM49453_AUDIO_PORT1_BASIC_FMT_MASK|BIT(0)|BIT(5),
 			    (aif_val | mode | clk_phase));
 
 	snd_soc_write(codec, LM49453_P0_AUDIO_PORT1_RX_MSB_REG, clk_shift);
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 7 lines · Axel Lin

The mode variable is either 0 or 1.
To update mode setting, the mask should be BIT(0) rather than BIT(1).

---
Hi M R Swami,
I don't have the datasheet. Can you check if this patch is correct?

Yes, according to the datasheet the STEREO mode is BIT(0).

Quoted 27 lines

Thanks,
Axel

 sound/soc/codecs/lm49453.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/lm49453.c +1 -1
index d75257d..c0d203b 100644
@@ -1218,7 +1218,7 @@ static int lm49453_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
 	}
 
 	snd_soc_update_bits(codec, LM49453_P0_AUDIO_PORT1_BASIC_REG,
-			    LM49453_AUDIO_PORT1_BASIC_FMT_MASK|BIT(1)|BIT(5),
+			    LM49453_AUDIO_PORT1_BASIC_FMT_MASK|BIT(0)|BIT(5),
 			    (aif_val | mode | clk_phase));
 
 	snd_soc_write(codec, LM49453_P0_AUDIO_PORT1_RX_MSB_REG, clk_shift);
Signature · 8 lines
1.7.9.5



_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Applied
#2 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

The mode variable is either 0 or 1.
To update mode setting, the mask should be BIT(0) rather than BIT(1).

Applied, thanks.