aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ad1836.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/ad1836.c')
-rw-r--r--sound/soc/codecs/ad1836.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index 9a92b7962f41..77f459868579 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -168,17 +168,19 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream,
168 int word_len = 0; 168 int word_len = 0;
169 169
170 /* bit size */ 170 /* bit size */
171 switch (params_format(params)) { 171 switch (params_width(params)) {
172 case SNDRV_PCM_FORMAT_S16_LE: 172 case 16:
173 word_len = AD1836_WORD_LEN_16; 173 word_len = AD1836_WORD_LEN_16;
174 break; 174 break;
175 case SNDRV_PCM_FORMAT_S20_3LE: 175 case 20:
176 word_len = AD1836_WORD_LEN_20; 176 word_len = AD1836_WORD_LEN_20;
177 break; 177 break;
178 case SNDRV_PCM_FORMAT_S24_LE: 178 case 24:
179 case SNDRV_PCM_FORMAT_S32_LE: 179 case 32:
180 word_len = AD1836_WORD_LEN_24; 180 word_len = AD1836_WORD_LEN_24;
181 break; 181 break;
182 default:
183 return -EINVAL;
182 } 184 }
183 185
184 regmap_update_bits(ad1836->regmap, AD1836_DAC_CTRL1, 186 regmap_update_bits(ad1836->regmap, AD1836_DAC_CTRL1,