diff options
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/wm8580.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8900.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/wm8904.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm8955.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm8960.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm8961.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/wm8990.c | 10 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 17 | ||||
-rw-r--r-- | sound/soc/codecs/wm_hubs.c | 17 |
9 files changed, 34 insertions, 31 deletions
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 72deeabef4fe..a961fc6f0c5f 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c | |||
@@ -171,7 +171,7 @@ | |||
171 | static const u16 wm8580_reg[] = { | 171 | static const u16 wm8580_reg[] = { |
172 | 0x0121, 0x017e, 0x007d, 0x0014, /*R3*/ | 172 | 0x0121, 0x017e, 0x007d, 0x0014, /*R3*/ |
173 | 0x0121, 0x017e, 0x007d, 0x0194, /*R7*/ | 173 | 0x0121, 0x017e, 0x007d, 0x0194, /*R7*/ |
174 | 0x001c, 0x0002, 0x0002, 0x00c2, /*R11*/ | 174 | 0x0010, 0x0002, 0x0002, 0x00c2, /*R11*/ |
175 | 0x0182, 0x0082, 0x000a, 0x0024, /*R15*/ | 175 | 0x0182, 0x0082, 0x000a, 0x0024, /*R15*/ |
176 | 0x0009, 0x0000, 0x00ff, 0x0000, /*R19*/ | 176 | 0x0009, 0x0000, 0x00ff, 0x0000, /*R19*/ |
177 | 0x00ff, 0x00ff, 0x00ff, 0x00ff, /*R23*/ | 177 | 0x00ff, 0x00ff, 0x00ff, 0x00ff, /*R23*/ |
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index 5da17a704e5a..4b8ffc2ea71d 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c | |||
@@ -188,7 +188,6 @@ static int wm8900_volatile_register(unsigned int reg) | |||
188 | { | 188 | { |
189 | switch (reg) { | 189 | switch (reg) { |
190 | case WM8900_REG_ID: | 190 | case WM8900_REG_ID: |
191 | case WM8900_REG_POWER1: | ||
192 | return 1; | 191 | return 1; |
193 | default: | 192 | default: |
194 | return 0; | 193 | return 0; |
@@ -1236,11 +1235,6 @@ static __devinit int wm8900_i2c_probe(struct i2c_client *i2c, | |||
1236 | goto err; | 1235 | goto err; |
1237 | } | 1236 | } |
1238 | 1237 | ||
1239 | /* Read back from the chip */ | ||
1240 | reg = snd_soc_read(codec, WM8900_REG_POWER1); | ||
1241 | reg = (reg >> 12) & 0xf; | ||
1242 | dev_info(&i2c->dev, "WM8900 revision %d\n", reg); | ||
1243 | |||
1244 | wm8900_reset(codec); | 1238 | wm8900_reset(codec); |
1245 | 1239 | ||
1246 | /* Turn the chip on */ | 1240 | /* Turn the chip on */ |
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index f7dcabf6283c..f0897d8f444e 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -820,7 +820,8 @@ static int wm8904_get_deemph(struct snd_kcontrol *kcontrol, | |||
820 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 820 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
821 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); | 821 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); |
822 | 822 | ||
823 | return wm8904->deemph; | 823 | ucontrol->value.enumerated.item[0] = wm8904->deemph; |
824 | return 0; | ||
824 | } | 825 | } |
825 | 826 | ||
826 | static int wm8904_put_deemph(struct snd_kcontrol *kcontrol, | 827 | static int wm8904_put_deemph(struct snd_kcontrol *kcontrol, |
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 5f025593d84d..004e83765642 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c | |||
@@ -384,7 +384,8 @@ static int wm8955_get_deemph(struct snd_kcontrol *kcontrol, | |||
384 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 384 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
385 | struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec); | 385 | struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec); |
386 | 386 | ||
387 | return wm8955->deemph; | 387 | ucontrol->value.enumerated.item[0] = wm8955->deemph; |
388 | return 0; | ||
388 | } | 389 | } |
389 | 390 | ||
390 | static int wm8955_put_deemph(struct snd_kcontrol *kcontrol, | 391 | static int wm8955_put_deemph(struct snd_kcontrol *kcontrol, |
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 3c6ee61f6c95..2331f51b0d11 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c | |||
@@ -137,7 +137,8 @@ static int wm8960_get_deemph(struct snd_kcontrol *kcontrol, | |||
137 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 137 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
138 | struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); | 138 | struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); |
139 | 139 | ||
140 | return wm8960->deemph; | 140 | ucontrol->value.enumerated.item[0] = wm8960->deemph; |
141 | return 0; | ||
141 | } | 142 | } |
142 | 143 | ||
143 | static int wm8960_put_deemph(struct snd_kcontrol *kcontrol, | 144 | static int wm8960_put_deemph(struct snd_kcontrol *kcontrol, |
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index 2549d3a297ab..3bd65c88d4a0 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c | |||
@@ -711,7 +711,7 @@ static int wm8961_hw_params(struct snd_pcm_substream *substream, | |||
711 | if (fs <= 24000) | 711 | if (fs <= 24000) |
712 | reg |= WM8961_DACSLOPE; | 712 | reg |= WM8961_DACSLOPE; |
713 | else | 713 | else |
714 | reg &= WM8961_DACSLOPE; | 714 | reg &= ~WM8961_DACSLOPE; |
715 | snd_soc_write(codec, WM8961_ADC_DAC_CONTROL_2, reg); | 715 | snd_soc_write(codec, WM8961_ADC_DAC_CONTROL_2, reg); |
716 | 716 | ||
717 | return 0; | 717 | return 0; |
@@ -736,7 +736,7 @@ static int wm8961_set_sysclk(struct snd_soc_dai *dai, int clk_id, | |||
736 | freq /= 2; | 736 | freq /= 2; |
737 | } else { | 737 | } else { |
738 | dev_dbg(codec->dev, "Using MCLK/1 for %dHz MCLK\n", freq); | 738 | dev_dbg(codec->dev, "Using MCLK/1 for %dHz MCLK\n", freq); |
739 | reg &= WM8961_MCLKDIV; | 739 | reg &= ~WM8961_MCLKDIV; |
740 | } | 740 | } |
741 | 741 | ||
742 | snd_soc_write(codec, WM8961_CLOCKING1, reg); | 742 | snd_soc_write(codec, WM8961_CLOCKING1, reg); |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index dd8d909788c1..0022c7adb893 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -1183,7 +1183,7 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec, | |||
1183 | WM8990_VMIDTOG); | 1183 | WM8990_VMIDTOG); |
1184 | 1184 | ||
1185 | /* Delay to allow output caps to discharge */ | 1185 | /* Delay to allow output caps to discharge */ |
1186 | msleep(msecs_to_jiffies(300)); | 1186 | msleep(300); |
1187 | 1187 | ||
1188 | /* Disable VMIDTOG */ | 1188 | /* Disable VMIDTOG */ |
1189 | snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | | 1189 | snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | |
@@ -1195,17 +1195,17 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec, | |||
1195 | /* Enable outputs */ | 1195 | /* Enable outputs */ |
1196 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1b00); | 1196 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1b00); |
1197 | 1197 | ||
1198 | msleep(msecs_to_jiffies(50)); | 1198 | msleep(50); |
1199 | 1199 | ||
1200 | /* Enable VMID at 2x50k */ | 1200 | /* Enable VMID at 2x50k */ |
1201 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f02); | 1201 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f02); |
1202 | 1202 | ||
1203 | msleep(msecs_to_jiffies(100)); | 1203 | msleep(100); |
1204 | 1204 | ||
1205 | /* Enable VREF */ | 1205 | /* Enable VREF */ |
1206 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f03); | 1206 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f03); |
1207 | 1207 | ||
1208 | msleep(msecs_to_jiffies(600)); | 1208 | msleep(600); |
1209 | 1209 | ||
1210 | /* Enable BUFIOEN */ | 1210 | /* Enable BUFIOEN */ |
1211 | snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | | 1211 | snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | |
@@ -1250,7 +1250,7 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec, | |||
1250 | /* Disable VMID */ | 1250 | /* Disable VMID */ |
1251 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f01); | 1251 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f01); |
1252 | 1252 | ||
1253 | msleep(msecs_to_jiffies(300)); | 1253 | msleep(300); |
1254 | 1254 | ||
1255 | /* Enable all output discharge bits */ | 1255 | /* Enable all output discharge bits */ |
1256 | snd_soc_write(codec, WM8990_ANTIPOP1, WM8990_DIS_LLINE | | 1256 | snd_soc_write(codec, WM8990_ANTIPOP1, WM8990_DIS_LLINE | |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 522249d5c2b4..f3732c20806f 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -2519,18 +2519,18 @@ SND_SOC_DAPM_SUPPLY("DSPINTCLK", WM8994_CLOCKING_1, 1, 0, NULL, 0), | |||
2519 | SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, NULL, 0), | 2519 | SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, NULL, 0), |
2520 | SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, NULL, 0), | 2520 | SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, NULL, 0), |
2521 | 2521 | ||
2522 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1L", "AIF1 Capture", | 2522 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1L", NULL, |
2523 | 0, WM8994_POWER_MANAGEMENT_4, 9, 0), | 2523 | 0, WM8994_POWER_MANAGEMENT_4, 9, 0), |
2524 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1R", "AIF1 Capture", | 2524 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1R", NULL, |
2525 | 0, WM8994_POWER_MANAGEMENT_4, 8, 0), | 2525 | 0, WM8994_POWER_MANAGEMENT_4, 8, 0), |
2526 | SND_SOC_DAPM_AIF_IN("AIF1DAC1L", NULL, 0, | 2526 | SND_SOC_DAPM_AIF_IN("AIF1DAC1L", NULL, 0, |
2527 | WM8994_POWER_MANAGEMENT_5, 9, 0), | 2527 | WM8994_POWER_MANAGEMENT_5, 9, 0), |
2528 | SND_SOC_DAPM_AIF_IN("AIF1DAC1R", NULL, 0, | 2528 | SND_SOC_DAPM_AIF_IN("AIF1DAC1R", NULL, 0, |
2529 | WM8994_POWER_MANAGEMENT_5, 8, 0), | 2529 | WM8994_POWER_MANAGEMENT_5, 8, 0), |
2530 | 2530 | ||
2531 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2L", "AIF1 Capture", | 2531 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2L", NULL, |
2532 | 0, WM8994_POWER_MANAGEMENT_4, 11, 0), | 2532 | 0, WM8994_POWER_MANAGEMENT_4, 11, 0), |
2533 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2R", "AIF1 Capture", | 2533 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2R", NULL, |
2534 | 0, WM8994_POWER_MANAGEMENT_4, 10, 0), | 2534 | 0, WM8994_POWER_MANAGEMENT_4, 10, 0), |
2535 | SND_SOC_DAPM_AIF_IN("AIF1DAC2L", NULL, 0, | 2535 | SND_SOC_DAPM_AIF_IN("AIF1DAC2L", NULL, 0, |
2536 | WM8994_POWER_MANAGEMENT_5, 11, 0), | 2536 | WM8994_POWER_MANAGEMENT_5, 11, 0), |
@@ -2571,6 +2571,7 @@ SND_SOC_DAPM_AIF_IN("AIF2DACR", NULL, 0, | |||
2571 | 2571 | ||
2572 | SND_SOC_DAPM_AIF_IN("AIF1DACDAT", "AIF1 Playback", 0, SND_SOC_NOPM, 0, 0), | 2572 | SND_SOC_DAPM_AIF_IN("AIF1DACDAT", "AIF1 Playback", 0, SND_SOC_NOPM, 0, 0), |
2573 | SND_SOC_DAPM_AIF_IN("AIF2DACDAT", "AIF2 Playback", 0, SND_SOC_NOPM, 0, 0), | 2573 | SND_SOC_DAPM_AIF_IN("AIF2DACDAT", "AIF2 Playback", 0, SND_SOC_NOPM, 0, 0), |
2574 | SND_SOC_DAPM_AIF_OUT("AIF1ADCDAT", "AIF1 Capture", 0, SND_SOC_NOPM, 0, 0), | ||
2574 | SND_SOC_DAPM_AIF_OUT("AIF2ADCDAT", "AIF2 Capture", 0, SND_SOC_NOPM, 0, 0), | 2575 | SND_SOC_DAPM_AIF_OUT("AIF2ADCDAT", "AIF2 Capture", 0, SND_SOC_NOPM, 0, 0), |
2575 | 2576 | ||
2576 | SND_SOC_DAPM_MUX("AIF1DAC Mux", SND_SOC_NOPM, 0, 0, &aif1dac_mux), | 2577 | SND_SOC_DAPM_MUX("AIF1DAC Mux", SND_SOC_NOPM, 0, 0, &aif1dac_mux), |
@@ -2766,6 +2767,11 @@ static const struct snd_soc_dapm_route intercon[] = { | |||
2766 | { "AIF2DAC2R Mixer", "Left Sidetone Switch", "Left Sidetone" }, | 2767 | { "AIF2DAC2R Mixer", "Left Sidetone Switch", "Left Sidetone" }, |
2767 | { "AIF2DAC2R Mixer", "Right Sidetone Switch", "Right Sidetone" }, | 2768 | { "AIF2DAC2R Mixer", "Right Sidetone Switch", "Right Sidetone" }, |
2768 | 2769 | ||
2770 | { "AIF1ADCDAT", NULL, "AIF1ADC1L" }, | ||
2771 | { "AIF1ADCDAT", NULL, "AIF1ADC1R" }, | ||
2772 | { "AIF1ADCDAT", NULL, "AIF1ADC2L" }, | ||
2773 | { "AIF1ADCDAT", NULL, "AIF1ADC2R" }, | ||
2774 | |||
2769 | { "AIF2ADCDAT", NULL, "AIF2ADC Mux" }, | 2775 | { "AIF2ADCDAT", NULL, "AIF2ADC Mux" }, |
2770 | 2776 | ||
2771 | /* AIF3 output */ | 2777 | /* AIF3 output */ |
@@ -2914,6 +2920,7 @@ static int wm8994_set_fll(struct snd_soc_dai *dai, int id, int src, | |||
2914 | /* Allow no source specification when stopping */ | 2920 | /* Allow no source specification when stopping */ |
2915 | if (freq_out) | 2921 | if (freq_out) |
2916 | return -EINVAL; | 2922 | return -EINVAL; |
2923 | src = wm8994->fll[id].src; | ||
2917 | break; | 2924 | break; |
2918 | case WM8994_FLL_SRC_MCLK1: | 2925 | case WM8994_FLL_SRC_MCLK1: |
2919 | case WM8994_FLL_SRC_MCLK2: | 2926 | case WM8994_FLL_SRC_MCLK2: |
@@ -3485,7 +3492,7 @@ static int wm8994_set_tristate(struct snd_soc_dai *codec_dai, int tristate) | |||
3485 | else | 3492 | else |
3486 | val = 0; | 3493 | val = 0; |
3487 | 3494 | ||
3488 | return snd_soc_update_bits(codec, reg, mask, reg); | 3495 | return snd_soc_update_bits(codec, reg, mask, val); |
3489 | } | 3496 | } |
3490 | 3497 | ||
3491 | #define WM8994_RATES SNDRV_PCM_RATE_8000_96000 | 3498 | #define WM8994_RATES SNDRV_PCM_RATE_8000_96000 |
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 2cb81538cd91..359ad8869349 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -92,6 +92,7 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec, unsigned int op) | |||
92 | static void calibrate_dc_servo(struct snd_soc_codec *codec) | 92 | static void calibrate_dc_servo(struct snd_soc_codec *codec) |
93 | { | 93 | { |
94 | struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); | 94 | struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); |
95 | s8 offset; | ||
95 | u16 reg, reg_l, reg_r, dcs_cfg; | 96 | u16 reg, reg_l, reg_r, dcs_cfg; |
96 | 97 | ||
97 | /* Set for 32 series updates */ | 98 | /* Set for 32 series updates */ |
@@ -130,16 +131,14 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec) | |||
130 | dev_dbg(codec->dev, "DCS input: %x %x\n", reg_l, reg_r); | 131 | dev_dbg(codec->dev, "DCS input: %x %x\n", reg_l, reg_r); |
131 | 132 | ||
132 | /* HPOUT1L */ | 133 | /* HPOUT1L */ |
133 | if (reg_l + hubs->dcs_codes > 0 && | 134 | offset = reg_l; |
134 | reg_l + hubs->dcs_codes < 0xff) | 135 | offset += hubs->dcs_codes; |
135 | reg_l += hubs->dcs_codes; | 136 | dcs_cfg = (u8)offset << WM8993_DCS_DAC_WR_VAL_1_SHIFT; |
136 | dcs_cfg = reg_l << WM8993_DCS_DAC_WR_VAL_1_SHIFT; | ||
137 | 137 | ||
138 | /* HPOUT1R */ | 138 | /* HPOUT1R */ |
139 | if (reg_r + hubs->dcs_codes > 0 && | 139 | offset = reg_r; |
140 | reg_r + hubs->dcs_codes < 0xff) | 140 | offset += hubs->dcs_codes; |
141 | reg_r += hubs->dcs_codes; | 141 | dcs_cfg |= (u8)offset; |
142 | dcs_cfg |= reg_r; | ||
143 | 142 | ||
144 | dev_dbg(codec->dev, "DCS result: %x\n", dcs_cfg); | 143 | dev_dbg(codec->dev, "DCS result: %x\n", dcs_cfg); |
145 | 144 | ||
@@ -293,7 +292,7 @@ SOC_DOUBLE_R("Speaker Switch", | |||
293 | SOC_DOUBLE_R("Speaker ZC Switch", | 292 | SOC_DOUBLE_R("Speaker ZC Switch", |
294 | WM8993_SPEAKER_VOLUME_LEFT, WM8993_SPEAKER_VOLUME_RIGHT, | 293 | WM8993_SPEAKER_VOLUME_LEFT, WM8993_SPEAKER_VOLUME_RIGHT, |
295 | 7, 1, 0), | 294 | 7, 1, 0), |
296 | SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 0, 3, 7, 0, | 295 | SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 3, 0, 7, 0, |
297 | spkboost_tlv), | 296 | spkboost_tlv), |
298 | SOC_ENUM("Speaker Reference", speaker_ref), | 297 | SOC_ENUM("Speaker Reference", speaker_ref), |
299 | SOC_ENUM("Speaker Mode", speaker_mode), | 298 | SOC_ENUM("Speaker Mode", speaker_mode), |