diff options
Diffstat (limited to 'sound/soc/codecs/ad1836.c')
-rw-r--r-- | sound/soc/codecs/ad1836.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index ab63d52e36e1..754c496412bd 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c | |||
@@ -145,22 +145,22 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream, | |||
145 | /* bit size */ | 145 | /* bit size */ |
146 | switch (params_format(params)) { | 146 | switch (params_format(params)) { |
147 | case SNDRV_PCM_FORMAT_S16_LE: | 147 | case SNDRV_PCM_FORMAT_S16_LE: |
148 | word_len = 3; | 148 | word_len = AD1836_WORD_LEN_16; |
149 | break; | 149 | break; |
150 | case SNDRV_PCM_FORMAT_S20_3LE: | 150 | case SNDRV_PCM_FORMAT_S20_3LE: |
151 | word_len = 1; | 151 | word_len = AD1836_WORD_LEN_20; |
152 | break; | 152 | break; |
153 | case SNDRV_PCM_FORMAT_S24_LE: | 153 | case SNDRV_PCM_FORMAT_S24_LE: |
154 | case SNDRV_PCM_FORMAT_S32_LE: | 154 | case SNDRV_PCM_FORMAT_S32_LE: |
155 | word_len = 0; | 155 | word_len = AD1836_WORD_LEN_24; |
156 | break; | 156 | break; |
157 | } | 157 | } |
158 | 158 | ||
159 | snd_soc_update_bits(codec, AD1836_DAC_CTRL1, | 159 | snd_soc_update_bits(codec, AD1836_DAC_CTRL1, AD1836_DAC_WORD_LEN_MASK, |
160 | AD1836_DAC_WORD_LEN_MASK, word_len); | 160 | word_len << AD1836_DAC_WORD_LEN_OFFSET); |
161 | 161 | ||
162 | snd_soc_update_bits(codec, AD1836_ADC_CTRL2, | 162 | snd_soc_update_bits(codec, AD1836_ADC_CTRL2, AD1836_ADC_WORD_LEN_MASK, |
163 | AD1836_ADC_WORD_LEN_MASK, word_len); | 163 | word_len << AD1836_ADC_WORD_OFFSET); |
164 | 164 | ||
165 | return 0; | 165 | return 0; |
166 | } | 166 | } |