aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320dac33.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>2010-01-20 02:39:35 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-01-20 06:47:49 -0500
commit6cd6cede8c33364d8e1abb5ea35adf627e3781b0 (patch)
tree17e588f659be6801ef0299a1b7f18019bd6b956e /sound/soc/codecs/tlv320dac33.c
parent84740ac19a0aeb87d1dc21e9d7d517f11bd49748 (diff)
ASoC: tlv320dac33: BCLK divider fix
The BCLK divider was not configured in case of mode7. This leads to unpredictable behavior when switching between FIFO modes. Configure the BCLK divider depending on the fifo_mode (FIFO is in use, or FIFO bypass). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/tlv320dac33.c')
-rw-r--r--sound/soc/codecs/tlv320dac33.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 65683aa3920c..e1aa66ff7f1c 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -845,11 +845,14 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream)
845 dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_A, aictrl_a); 845 dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_A, aictrl_a);
846 dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_B, aictrl_b); 846 dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_B, aictrl_b);
847 847
848 switch (dac33->fifo_mode) { 848 /* BCLK divide ratio */
849 case DAC33_FIFO_MODE1: 849 if (dac33->fifo_mode)
850 /* 20: BCLK divide ratio */
851 dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_C, 3); 850 dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_C, 3);
851 else
852 dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_C, 32);
852 853
854 switch (dac33->fifo_mode) {
855 case DAC33_FIFO_MODE1:
853 dac33_write16(codec, DAC33_ATHR_MSB, 856 dac33_write16(codec, DAC33_ATHR_MSB,
854 DAC33_THRREG(dac33->alarm_threshold)); 857 DAC33_THRREG(dac33->alarm_threshold));
855 break; 858 break;
@@ -864,8 +867,6 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream)
864 DAC33_THRREG(10)); 867 DAC33_THRREG(10));
865 break; 868 break;
866 default: 869 default:
867 /* BYPASS mode */
868 dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_C, 32);
869 break; 870 break;
870 } 871 }
871 872