diff options
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/wm5110.c | 27 | ||||
-rw-r--r-- | sound/soc/codecs/wm8731.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/wm8904.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8962.c | 13 | ||||
-rw-r--r-- | sound/soc/codecs/wm8990.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm_adsp.c | 10 |
6 files changed, 26 insertions, 32 deletions
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index c3c7396a6181..0ab2dc296474 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -248,19 +248,6 @@ ARIZONA_MIXER_CONTROLS("SPKDAT1R", ARIZONA_OUT5RMIX_INPUT_1_SOURCE), | |||
248 | ARIZONA_MIXER_CONTROLS("SPKDAT2L", ARIZONA_OUT6LMIX_INPUT_1_SOURCE), | 248 | ARIZONA_MIXER_CONTROLS("SPKDAT2L", ARIZONA_OUT6LMIX_INPUT_1_SOURCE), |
249 | ARIZONA_MIXER_CONTROLS("SPKDAT2R", ARIZONA_OUT6RMIX_INPUT_1_SOURCE), | 249 | ARIZONA_MIXER_CONTROLS("SPKDAT2R", ARIZONA_OUT6RMIX_INPUT_1_SOURCE), |
250 | 250 | ||
251 | SOC_SINGLE("HPOUT1 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_1L, | ||
252 | ARIZONA_OUT1_OSR_SHIFT, 1, 0), | ||
253 | SOC_SINGLE("HPOUT2 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_2L, | ||
254 | ARIZONA_OUT2_OSR_SHIFT, 1, 0), | ||
255 | SOC_SINGLE("HPOUT3 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_3L, | ||
256 | ARIZONA_OUT3_OSR_SHIFT, 1, 0), | ||
257 | SOC_SINGLE("Speaker High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_4L, | ||
258 | ARIZONA_OUT4_OSR_SHIFT, 1, 0), | ||
259 | SOC_SINGLE("SPKDAT1 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_5L, | ||
260 | ARIZONA_OUT5_OSR_SHIFT, 1, 0), | ||
261 | SOC_SINGLE("SPKDAT2 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_6L, | ||
262 | ARIZONA_OUT6_OSR_SHIFT, 1, 0), | ||
263 | |||
264 | SOC_DOUBLE_R("HPOUT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_1L, | 251 | SOC_DOUBLE_R("HPOUT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_1L, |
265 | ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_MUTE_SHIFT, 1, 1), | 252 | ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_MUTE_SHIFT, 1, 1), |
266 | SOC_DOUBLE_R("HPOUT2 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_2L, | 253 | SOC_DOUBLE_R("HPOUT2 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_2L, |
@@ -293,18 +280,6 @@ SOC_DOUBLE_R_TLV("SPKDAT2 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_6L, | |||
293 | ARIZONA_DAC_DIGITAL_VOLUME_6R, ARIZONA_OUT6L_VOL_SHIFT, | 280 | ARIZONA_DAC_DIGITAL_VOLUME_6R, ARIZONA_OUT6L_VOL_SHIFT, |
294 | 0xbf, 0, digital_tlv), | 281 | 0xbf, 0, digital_tlv), |
295 | 282 | ||
296 | SOC_DOUBLE_R_RANGE_TLV("HPOUT1 Volume", ARIZONA_OUTPUT_PATH_CONFIG_1L, | ||
297 | ARIZONA_OUTPUT_PATH_CONFIG_1R, | ||
298 | ARIZONA_OUT1L_PGA_VOL_SHIFT, | ||
299 | 0x34, 0x40, 0, ana_tlv), | ||
300 | SOC_DOUBLE_R_RANGE_TLV("HPOUT2 Volume", ARIZONA_OUTPUT_PATH_CONFIG_2L, | ||
301 | ARIZONA_OUTPUT_PATH_CONFIG_2R, | ||
302 | ARIZONA_OUT2L_PGA_VOL_SHIFT, | ||
303 | 0x34, 0x40, 0, ana_tlv), | ||
304 | SOC_DOUBLE_R_RANGE_TLV("HPOUT3 Volume", ARIZONA_OUTPUT_PATH_CONFIG_3L, | ||
305 | ARIZONA_OUTPUT_PATH_CONFIG_3R, | ||
306 | ARIZONA_OUT3L_PGA_VOL_SHIFT, 0x34, 0x40, 0, ana_tlv), | ||
307 | |||
308 | SOC_DOUBLE("SPKDAT1 Switch", ARIZONA_PDM_SPK1_CTRL_1, ARIZONA_SPK1L_MUTE_SHIFT, | 283 | SOC_DOUBLE("SPKDAT1 Switch", ARIZONA_PDM_SPK1_CTRL_1, ARIZONA_SPK1L_MUTE_SHIFT, |
309 | ARIZONA_SPK1R_MUTE_SHIFT, 1, 1), | 284 | ARIZONA_SPK1R_MUTE_SHIFT, 1, 1), |
310 | SOC_DOUBLE("SPKDAT2 Switch", ARIZONA_PDM_SPK2_CTRL_1, ARIZONA_SPK2L_MUTE_SHIFT, | 285 | SOC_DOUBLE("SPKDAT2 Switch", ARIZONA_PDM_SPK2_CTRL_1, ARIZONA_SPK2L_MUTE_SHIFT, |
@@ -1037,7 +1012,7 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = { | |||
1037 | { "AEC Loopback", "HPOUT3L", "OUT3L" }, | 1012 | { "AEC Loopback", "HPOUT3L", "OUT3L" }, |
1038 | { "AEC Loopback", "HPOUT3R", "OUT3R" }, | 1013 | { "AEC Loopback", "HPOUT3R", "OUT3R" }, |
1039 | { "HPOUT3L", NULL, "OUT3L" }, | 1014 | { "HPOUT3L", NULL, "OUT3L" }, |
1040 | { "HPOUT3R", NULL, "OUT3L" }, | 1015 | { "HPOUT3R", NULL, "OUT3R" }, |
1041 | 1016 | ||
1042 | { "AEC Loopback", "SPKOUTL", "OUT4L" }, | 1017 | { "AEC Loopback", "SPKOUTL", "OUT4L" }, |
1043 | { "SPKOUTLN", NULL, "OUT4L" }, | 1018 | { "SPKOUTLN", NULL, "OUT4L" }, |
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 456bb8c6d759..bc7472c968e3 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -447,10 +447,10 @@ static int wm8731_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
447 | iface |= 0x0001; | 447 | iface |= 0x0001; |
448 | break; | 448 | break; |
449 | case SND_SOC_DAIFMT_DSP_A: | 449 | case SND_SOC_DAIFMT_DSP_A: |
450 | iface |= 0x0003; | 450 | iface |= 0x0013; |
451 | break; | 451 | break; |
452 | case SND_SOC_DAIFMT_DSP_B: | 452 | case SND_SOC_DAIFMT_DSP_B: |
453 | iface |= 0x0013; | 453 | iface |= 0x0003; |
454 | break; | 454 | break; |
455 | default: | 455 | default: |
456 | return -EINVAL; | 456 | return -EINVAL; |
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 3938fb1c203e..53bbfac6a83a 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -1444,7 +1444,7 @@ static int wm8904_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) | |||
1444 | 1444 | ||
1445 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 1445 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
1446 | case SND_SOC_DAIFMT_DSP_B: | 1446 | case SND_SOC_DAIFMT_DSP_B: |
1447 | aif1 |= WM8904_AIF_LRCLK_INV; | 1447 | aif1 |= 0x3 | WM8904_AIF_LRCLK_INV; |
1448 | case SND_SOC_DAIFMT_DSP_A: | 1448 | case SND_SOC_DAIFMT_DSP_A: |
1449 | aif1 |= 0x3; | 1449 | aif1 |= 0x3; |
1450 | break; | 1450 | break; |
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 543c5c2631b6..0f17ed3e29f4 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -2439,7 +2439,20 @@ static void wm8962_configure_bclk(struct snd_soc_codec *codec) | |||
2439 | snd_soc_update_bits(codec, WM8962_CLOCKING_4, | 2439 | snd_soc_update_bits(codec, WM8962_CLOCKING_4, |
2440 | WM8962_SYSCLK_RATE_MASK, clocking4); | 2440 | WM8962_SYSCLK_RATE_MASK, clocking4); |
2441 | 2441 | ||
2442 | /* DSPCLK_DIV can be only generated correctly after enabling SYSCLK. | ||
2443 | * So we here provisionally enable it and then disable it afterward | ||
2444 | * if current bias_level hasn't reached SND_SOC_BIAS_ON. | ||
2445 | */ | ||
2446 | if (codec->dapm.bias_level != SND_SOC_BIAS_ON) | ||
2447 | snd_soc_update_bits(codec, WM8962_CLOCKING2, | ||
2448 | WM8962_SYSCLK_ENA_MASK, WM8962_SYSCLK_ENA); | ||
2449 | |||
2442 | dspclk = snd_soc_read(codec, WM8962_CLOCKING1); | 2450 | dspclk = snd_soc_read(codec, WM8962_CLOCKING1); |
2451 | |||
2452 | if (codec->dapm.bias_level != SND_SOC_BIAS_ON) | ||
2453 | snd_soc_update_bits(codec, WM8962_CLOCKING2, | ||
2454 | WM8962_SYSCLK_ENA_MASK, 0); | ||
2455 | |||
2443 | if (dspclk < 0) { | 2456 | if (dspclk < 0) { |
2444 | dev_err(codec->dev, "Failed to read DSPCLK: %d\n", dspclk); | 2457 | dev_err(codec->dev, "Failed to read DSPCLK: %d\n", dspclk); |
2445 | return; | 2458 | return; |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 253c88bb7a4c..4f05fb88bddf 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -1259,6 +1259,8 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec, | |||
1259 | 1259 | ||
1260 | /* disable POBCTRL, SOFT_ST and BUFDCOPEN */ | 1260 | /* disable POBCTRL, SOFT_ST and BUFDCOPEN */ |
1261 | snd_soc_write(codec, WM8990_ANTIPOP2, 0x0); | 1261 | snd_soc_write(codec, WM8990_ANTIPOP2, 0x0); |
1262 | |||
1263 | codec->cache_sync = 1; | ||
1262 | break; | 1264 | break; |
1263 | } | 1265 | } |
1264 | 1266 | ||
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 46ec0e9744d4..4fbcab63e61f 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c | |||
@@ -1474,13 +1474,17 @@ static int wm_adsp2_ena(struct wm_adsp *dsp) | |||
1474 | return ret; | 1474 | return ret; |
1475 | 1475 | ||
1476 | /* Wait for the RAM to start, should be near instantaneous */ | 1476 | /* Wait for the RAM to start, should be near instantaneous */ |
1477 | count = 0; | 1477 | for (count = 0; count < 10; ++count) { |
1478 | do { | ||
1479 | ret = regmap_read(dsp->regmap, dsp->base + ADSP2_STATUS1, | 1478 | ret = regmap_read(dsp->regmap, dsp->base + ADSP2_STATUS1, |
1480 | &val); | 1479 | &val); |
1481 | if (ret != 0) | 1480 | if (ret != 0) |
1482 | return ret; | 1481 | return ret; |
1483 | } while (!(val & ADSP2_RAM_RDY) && ++count < 10); | 1482 | |
1483 | if (val & ADSP2_RAM_RDY) | ||
1484 | break; | ||
1485 | |||
1486 | msleep(1); | ||
1487 | } | ||
1484 | 1488 | ||
1485 | if (!(val & ADSP2_RAM_RDY)) { | 1489 | if (!(val & ADSP2_RAM_RDY)) { |
1486 | adsp_err(dsp, "Failed to start DSP RAM\n"); | 1490 | adsp_err(dsp, "Failed to start DSP RAM\n"); |