ad1836.c (959d851caa48829eb85cb85aa949fd6b4c5d5bc6) | ad1836.c (e6968a1719a88afa4708ff43696d6615f0be90be) |
---|---|
1 /* 2 * Audio Codec driver supporting: 3 * AD1835A, AD1836, AD1837A, AD1838A, AD1839A 4 * 5 * Copyright 2009-2011 Analog Devices Inc. 6 * 7 * Licensed under the GPL-2 or later. 8 */ --- 148 unchanged lines hidden (view full) --- 157 return 0; 158} 159 160static int ad1836_hw_params(struct snd_pcm_substream *substream, 161 struct snd_pcm_hw_params *params, 162 struct snd_soc_dai *dai) 163{ 164 int word_len = 0; | 1 /* 2 * Audio Codec driver supporting: 3 * AD1835A, AD1836, AD1837A, AD1838A, AD1839A 4 * 5 * Copyright 2009-2011 Analog Devices Inc. 6 * 7 * Licensed under the GPL-2 or later. 8 */ --- 148 unchanged lines hidden (view full) --- 157 return 0; 158} 159 160static int ad1836_hw_params(struct snd_pcm_substream *substream, 161 struct snd_pcm_hw_params *params, 162 struct snd_soc_dai *dai) 163{ 164 int word_len = 0; |
165 struct snd_soc_codec *codec = dai->codec; |
|
165 | 166 |
166 struct snd_soc_pcm_runtime *rtd = substream->private_data; 167 struct snd_soc_codec *codec = rtd->codec; 168 | |
169 /* bit size */ 170 switch (params_format(params)) { 171 case SNDRV_PCM_FORMAT_S16_LE: 172 word_len = AD1836_WORD_LEN_16; 173 break; 174 case SNDRV_PCM_FORMAT_S20_3LE: 175 word_len = AD1836_WORD_LEN_20; 176 break; --- 222 unchanged lines hidden --- | 167 /* bit size */ 168 switch (params_format(params)) { 169 case SNDRV_PCM_FORMAT_S16_LE: 170 word_len = AD1836_WORD_LEN_16; 171 break; 172 case SNDRV_PCM_FORMAT_S20_3LE: 173 word_len = AD1836_WORD_LEN_20; 174 break; --- 222 unchanged lines hidden --- |