diff options
Diffstat (limited to 'sound/soc/codecs/tlv320dac33.c')
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index f9f367d29a90..d1e0e81ef30c 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
33 | #include <linux/regulator/consumer.h> | 33 | #include <linux/regulator/consumer.h> |
34 | #include <linux/slab.h> | ||
34 | #include <sound/core.h> | 35 | #include <sound/core.h> |
35 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
36 | #include <sound/pcm_params.h> | 37 | #include <sound/pcm_params.h> |
@@ -778,7 +779,7 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream) | |||
778 | if (dac33->fifo_mode) { | 779 | if (dac33->fifo_mode) { |
779 | /* Generic for all FIFO modes */ | 780 | /* Generic for all FIFO modes */ |
780 | /* 50-51 : ASRC Control registers */ | 781 | /* 50-51 : ASRC Control registers */ |
781 | dac33_write(codec, DAC33_ASRC_CTRL_A, (1 << 4)); /* div=2 */ | 782 | dac33_write(codec, DAC33_ASRC_CTRL_A, DAC33_SRCLKDIV(1)); |
782 | dac33_write(codec, DAC33_ASRC_CTRL_B, 1); /* ??? */ | 783 | dac33_write(codec, DAC33_ASRC_CTRL_B, 1); /* ??? */ |
783 | 784 | ||
784 | /* Write registers 0x34 and 0x35 (MSB, LSB) */ | 785 | /* Write registers 0x34 and 0x35 (MSB, LSB) */ |
@@ -1038,11 +1039,7 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
1038 | case SND_SOC_DAIFMT_DSP_A: | 1039 | case SND_SOC_DAIFMT_DSP_A: |
1039 | aictrl_a |= DAC33_AFMT_DSP; | 1040 | aictrl_a |= DAC33_AFMT_DSP; |
1040 | aictrl_b &= ~DAC33_DATA_DELAY_MASK; | 1041 | aictrl_b &= ~DAC33_DATA_DELAY_MASK; |
1041 | aictrl_b |= DAC33_DATA_DELAY(1); /* 1 bit delay */ | 1042 | aictrl_b |= DAC33_DATA_DELAY(0); |
1042 | break; | ||
1043 | case SND_SOC_DAIFMT_DSP_B: | ||
1044 | aictrl_a |= DAC33_AFMT_DSP; | ||
1045 | aictrl_b &= ~DAC33_DATA_DELAY_MASK; /* No delay */ | ||
1046 | break; | 1043 | break; |
1047 | case SND_SOC_DAIFMT_RIGHT_J: | 1044 | case SND_SOC_DAIFMT_RIGHT_J: |
1048 | aictrl_a |= DAC33_AFMT_RIGHT_J; | 1045 | aictrl_a |= DAC33_AFMT_RIGHT_J; |
@@ -1066,7 +1063,7 @@ static void dac33_init_chip(struct snd_soc_codec *codec) | |||
1066 | { | 1063 | { |
1067 | /* 44-46: DAC Control Registers */ | 1064 | /* 44-46: DAC Control Registers */ |
1068 | /* A : DAC sample rate Fsref/1.5 */ | 1065 | /* A : DAC sample rate Fsref/1.5 */ |
1069 | dac33_write(codec, DAC33_DAC_CTRL_A, DAC33_DACRATE(1)); | 1066 | dac33_write(codec, DAC33_DAC_CTRL_A, DAC33_DACRATE(0)); |
1070 | /* B : DAC src=normal, not muted */ | 1067 | /* B : DAC src=normal, not muted */ |
1071 | dac33_write(codec, DAC33_DAC_CTRL_B, DAC33_DACSRCR_RIGHT | | 1068 | dac33_write(codec, DAC33_DAC_CTRL_B, DAC33_DACSRCR_RIGHT | |
1072 | DAC33_DACSRCL_LEFT); | 1069 | DAC33_DACSRCL_LEFT); |