diff options
Diffstat (limited to 'sound/soc/codecs/tlv320aic23.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index c3f4afb5d017..0b8dcb5cd729 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -86,7 +86,7 @@ static int tlv320aic23_write(struct snd_soc_codec *codec, unsigned int reg, | |||
86 | */ | 86 | */ |
87 | 87 | ||
88 | if ((reg < 0 || reg > 9) && (reg != 15)) { | 88 | if ((reg < 0 || reg > 9) && (reg != 15)) { |
89 | printk(KERN_WARNING "%s Invalid register R%d\n", __func__, reg); | 89 | printk(KERN_WARNING "%s Invalid register R%u\n", __func__, reg); |
90 | return -1; | 90 | return -1; |
91 | } | 91 | } |
92 | 92 | ||
@@ -98,7 +98,7 @@ static int tlv320aic23_write(struct snd_soc_codec *codec, unsigned int reg, | |||
98 | if (codec->hw_write(codec->control_data, data, 2) == 2) | 98 | if (codec->hw_write(codec->control_data, data, 2) == 2) |
99 | return 0; | 99 | return 0; |
100 | 100 | ||
101 | printk(KERN_ERR "%s cannot write %03x to register R%d\n", __func__, | 101 | printk(KERN_ERR "%s cannot write %03x to register R%u\n", __func__, |
102 | value, reg); | 102 | value, reg); |
103 | 103 | ||
104 | return -EIO; | 104 | return -EIO; |
@@ -273,14 +273,14 @@ static const unsigned short sr_valid_mask[] = { | |||
273 | * Every divisor is a factor of 11*12 | 273 | * Every divisor is a factor of 11*12 |
274 | */ | 274 | */ |
275 | #define SR_MULT (11*12) | 275 | #define SR_MULT (11*12) |
276 | #define A(x) (x) ? (SR_MULT/x) : 0 | 276 | #define A(x) (SR_MULT/x) |
277 | static const unsigned char sr_adc_mult_table[] = { | 277 | static const unsigned char sr_adc_mult_table[] = { |
278 | A(2), A(2), A(12), A(12), A(0), A(0), A(3), A(1), | 278 | A(2), A(2), A(12), A(12), 0, 0, A(3), A(1), |
279 | A(2), A(2), A(11), A(11), A(0), A(0), A(0), A(1) | 279 | A(2), A(2), A(11), A(11), 0, 0, 0, A(1) |
280 | }; | 280 | }; |
281 | static const unsigned char sr_dac_mult_table[] = { | 281 | static const unsigned char sr_dac_mult_table[] = { |
282 | A(2), A(12), A(2), A(12), A(0), A(0), A(3), A(1), | 282 | A(2), A(12), A(2), A(12), 0, 0, A(3), A(1), |
283 | A(2), A(11), A(2), A(11), A(0), A(0), A(0), A(1) | 283 | A(2), A(11), A(2), A(11), 0, 0, 0, A(1) |
284 | }; | 284 | }; |
285 | 285 | ||
286 | static unsigned get_score(int adc, int adc_l, int adc_h, int need_adc, | 286 | static unsigned get_score(int adc, int adc_l, int adc_h, int need_adc, |
@@ -523,6 +523,8 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
523 | case SND_SOC_DAIFMT_I2S: | 523 | case SND_SOC_DAIFMT_I2S: |
524 | iface_reg |= TLV320AIC23_FOR_I2S; | 524 | iface_reg |= TLV320AIC23_FOR_I2S; |
525 | break; | 525 | break; |
526 | case SND_SOC_DAIFMT_DSP_A: | ||
527 | iface_reg |= TLV320AIC23_LRP_ON; | ||
526 | case SND_SOC_DAIFMT_DSP_B: | 528 | case SND_SOC_DAIFMT_DSP_B: |
527 | iface_reg |= TLV320AIC23_FOR_DSP; | 529 | iface_reg |= TLV320AIC23_FOR_DSP; |
528 | break; | 530 | break; |