~ubuntu-branches/ubuntu/trusty/linux-linaro-omap/trusty

« back to all changes in this revision

Viewing changes to sound/soc/codecs/ad1836.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-57i0gl3v99b3lkfg
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
        /* bit size */
146
146
        switch (params_format(params)) {
147
147
        case SNDRV_PCM_FORMAT_S16_LE:
148
 
                word_len = 3;
 
148
                word_len = AD1836_WORD_LEN_16;
149
149
                break;
150
150
        case SNDRV_PCM_FORMAT_S20_3LE:
151
 
                word_len = 1;
 
151
                word_len = AD1836_WORD_LEN_20;
152
152
                break;
153
153
        case SNDRV_PCM_FORMAT_S24_LE:
154
154
        case SNDRV_PCM_FORMAT_S32_LE:
155
 
                word_len = 0;
 
155
                word_len = AD1836_WORD_LEN_24;
156
156
                break;
157
157
        }
158
158
 
159
 
        snd_soc_update_bits(codec, AD1836_DAC_CTRL1,
160
 
                AD1836_DAC_WORD_LEN_MASK, word_len);
 
159
        snd_soc_update_bits(codec, AD1836_DAC_CTRL1, AD1836_DAC_WORD_LEN_MASK,
 
160
                word_len << AD1836_DAC_WORD_LEN_OFFSET);
161
161
 
162
 
        snd_soc_update_bits(codec, AD1836_ADC_CTRL2,
163
 
                AD1836_ADC_WORD_LEN_MASK, word_len);
 
162
        snd_soc_update_bits(codec, AD1836_ADC_CTRL2, AD1836_ADC_WORD_LEN_MASK,
 
163
                word_len << AD1836_ADC_WORD_OFFSET);
164
164
 
165
165
        return 0;
166
166
}