diff options
-rw-r--r-- | sound/soc/codecs/arizona.c | 59 | ||||
-rw-r--r-- | sound/soc/codecs/cs47l24.c | 22 | ||||
-rw-r--r-- | sound/soc/codecs/wm5102.c | 20 | ||||
-rw-r--r-- | sound/soc/codecs/wm5110.c | 62 | ||||
-rw-r--r-- | sound/soc/codecs/wm8997.c | 14 | ||||
-rw-r--r-- | sound/soc/codecs/wm8998.c | 33 |
6 files changed, 113 insertions, 97 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index ffcfe8ea1848..5727ea079ad7 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c | |||
@@ -90,7 +90,8 @@ static int arizona_spk_ev(struct snd_soc_dapm_widget *w, | |||
90 | 90 | ||
91 | switch (event) { | 91 | switch (event) { |
92 | case SND_SOC_DAPM_POST_PMU: | 92 | case SND_SOC_DAPM_POST_PMU: |
93 | val = snd_soc_component_read32(component, ARIZONA_INTERRUPT_RAW_STATUS_3); | 93 | val = snd_soc_component_read32(component, |
94 | ARIZONA_INTERRUPT_RAW_STATUS_3); | ||
94 | if (val & ARIZONA_SPK_OVERHEAT_STS) { | 95 | if (val & ARIZONA_SPK_OVERHEAT_STS) { |
95 | dev_crit(arizona->dev, | 96 | dev_crit(arizona->dev, |
96 | "Speaker not enabled due to temperature\n"); | 97 | "Speaker not enabled due to temperature\n"); |
@@ -641,7 +642,6 @@ const unsigned int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE] = { | |||
641 | }; | 642 | }; |
642 | EXPORT_SYMBOL_GPL(arizona_rate_val); | 643 | EXPORT_SYMBOL_GPL(arizona_rate_val); |
643 | 644 | ||
644 | |||
645 | const struct soc_enum arizona_isrc_fsh[] = { | 645 | const struct soc_enum arizona_isrc_fsh[] = { |
646 | SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_1_CTRL_1, | 646 | SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_1_CTRL_1, |
647 | ARIZONA_ISRC1_FSH_SHIFT, 0xf, | 647 | ARIZONA_ISRC1_FSH_SHIFT, 0xf, |
@@ -923,7 +923,8 @@ int arizona_in_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, | |||
923 | priv->in_pending++; | 923 | priv->in_pending++; |
924 | break; | 924 | break; |
925 | case SND_SOC_DAPM_POST_PMU: | 925 | case SND_SOC_DAPM_POST_PMU: |
926 | snd_soc_component_update_bits(component, reg, ARIZONA_IN1L_MUTE, 0); | 926 | snd_soc_component_update_bits(component, reg, |
927 | ARIZONA_IN1L_MUTE, 0); | ||
927 | 928 | ||
928 | /* If this is the last input pending then allow VU */ | 929 | /* If this is the last input pending then allow VU */ |
929 | priv->in_pending--; | 930 | priv->in_pending--; |
@@ -1070,9 +1071,8 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w, | |||
1070 | } | 1071 | } |
1071 | EXPORT_SYMBOL_GPL(arizona_out_ev); | 1072 | EXPORT_SYMBOL_GPL(arizona_out_ev); |
1072 | 1073 | ||
1073 | int arizona_hp_ev(struct snd_soc_dapm_widget *w, | 1074 | int arizona_hp_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, |
1074 | struct snd_kcontrol *kcontrol, | 1075 | int event) |
1075 | int event) | ||
1076 | { | 1076 | { |
1077 | struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); | 1077 | struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); |
1078 | struct arizona_priv *priv = snd_soc_component_get_drvdata(component); | 1078 | struct arizona_priv *priv = snd_soc_component_get_drvdata(component); |
@@ -1275,8 +1275,8 @@ static unsigned int arizona_opclk_ref_44k1_rates[] = { | |||
1275 | 45158400, | 1275 | 45158400, |
1276 | }; | 1276 | }; |
1277 | 1277 | ||
1278 | static int arizona_set_opclk(struct snd_soc_component *component, unsigned int clk, | 1278 | static int arizona_set_opclk(struct snd_soc_component *component, |
1279 | unsigned int freq) | 1279 | unsigned int clk, unsigned int freq) |
1280 | { | 1280 | { |
1281 | struct arizona_priv *priv = snd_soc_component_get_drvdata(component); | 1281 | struct arizona_priv *priv = snd_soc_component_get_drvdata(component); |
1282 | unsigned int reg; | 1282 | unsigned int reg; |
@@ -1302,7 +1302,7 @@ static int arizona_set_opclk(struct snd_soc_component *component, unsigned int c | |||
1302 | rates = arizona_opclk_ref_48k_rates; | 1302 | rates = arizona_opclk_ref_48k_rates; |
1303 | 1303 | ||
1304 | for (ref = 0; ref < ARRAY_SIZE(arizona_opclk_ref_48k_rates) && | 1304 | for (ref = 0; ref < ARRAY_SIZE(arizona_opclk_ref_48k_rates) && |
1305 | rates[ref] <= refclk; ref++) { | 1305 | rates[ref] <= refclk; ref++) { |
1306 | div = 1; | 1306 | div = 1; |
1307 | while (rates[ref] / div >= freq && div < 32) { | 1307 | while (rates[ref] / div >= freq && div < 32) { |
1308 | if (rates[ref] / div == freq) { | 1308 | if (rates[ref] / div == freq) { |
@@ -1727,18 +1727,23 @@ static int arizona_hw_params_rate(struct snd_pcm_substream *substream, | |||
1727 | } | 1727 | } |
1728 | 1728 | ||
1729 | snd_soc_component_update_bits(component, ARIZONA_SAMPLE_RATE_1, | 1729 | snd_soc_component_update_bits(component, ARIZONA_SAMPLE_RATE_1, |
1730 | ARIZONA_SAMPLE_RATE_1_MASK, sr_val); | 1730 | ARIZONA_SAMPLE_RATE_1_MASK, |
1731 | sr_val); | ||
1731 | if (base) | 1732 | if (base) |
1732 | snd_soc_component_update_bits(component, base + ARIZONA_AIF_RATE_CTRL, | 1733 | snd_soc_component_update_bits(component, |
1733 | ARIZONA_AIF1_RATE_MASK, 0); | 1734 | base + ARIZONA_AIF_RATE_CTRL, |
1735 | ARIZONA_AIF1_RATE_MASK, 0); | ||
1734 | break; | 1736 | break; |
1735 | case ARIZONA_CLK_ASYNCCLK: | 1737 | case ARIZONA_CLK_ASYNCCLK: |
1736 | snd_soc_component_update_bits(component, ARIZONA_ASYNC_SAMPLE_RATE_1, | 1738 | snd_soc_component_update_bits(component, |
1737 | ARIZONA_ASYNC_SAMPLE_RATE_1_MASK, sr_val); | 1739 | ARIZONA_ASYNC_SAMPLE_RATE_1, |
1740 | ARIZONA_ASYNC_SAMPLE_RATE_1_MASK, | ||
1741 | sr_val); | ||
1738 | if (base) | 1742 | if (base) |
1739 | snd_soc_component_update_bits(component, base + ARIZONA_AIF_RATE_CTRL, | 1743 | snd_soc_component_update_bits(component, |
1740 | ARIZONA_AIF1_RATE_MASK, | 1744 | base + ARIZONA_AIF_RATE_CTRL, |
1741 | 8 << ARIZONA_AIF1_RATE_SHIFT); | 1745 | ARIZONA_AIF1_RATE_MASK, |
1746 | 8 << ARIZONA_AIF1_RATE_SHIFT); | ||
1742 | break; | 1747 | break; |
1743 | default: | 1748 | default: |
1744 | arizona_aif_err(dai, "Invalid clock %d\n", dai_priv->clk); | 1749 | arizona_aif_err(dai, "Invalid clock %d\n", dai_priv->clk); |
@@ -1849,9 +1854,10 @@ static int arizona_hw_params(struct snd_pcm_substream *substream, | |||
1849 | base + ARIZONA_AIF_RX_ENABLES); | 1854 | base + ARIZONA_AIF_RX_ENABLES); |
1850 | /* Disable AIF TX/RX before reconfiguring it */ | 1855 | /* Disable AIF TX/RX before reconfiguring it */ |
1851 | regmap_update_bits_async(arizona->regmap, | 1856 | regmap_update_bits_async(arizona->regmap, |
1852 | base + ARIZONA_AIF_TX_ENABLES, 0xff, 0x0); | 1857 | base + ARIZONA_AIF_TX_ENABLES, |
1858 | 0xff, 0x0); | ||
1853 | regmap_update_bits(arizona->regmap, | 1859 | regmap_update_bits(arizona->regmap, |
1854 | base + ARIZONA_AIF_RX_ENABLES, 0xff, 0x0); | 1860 | base + ARIZONA_AIF_RX_ENABLES, 0xff, 0x0); |
1855 | } | 1861 | } |
1856 | 1862 | ||
1857 | ret = arizona_hw_params_rate(substream, params, dai); | 1863 | ret = arizona_hw_params_rate(substream, params, dai); |
@@ -1960,8 +1966,9 @@ static int arizona_set_tristate(struct snd_soc_dai *dai, int tristate) | |||
1960 | else | 1966 | else |
1961 | reg = 0; | 1967 | reg = 0; |
1962 | 1968 | ||
1963 | return snd_soc_component_update_bits(component, base + ARIZONA_AIF_RATE_CTRL, | 1969 | return snd_soc_component_update_bits(component, |
1964 | ARIZONA_AIF1_TRI, reg); | 1970 | base + ARIZONA_AIF_RATE_CTRL, |
1971 | ARIZONA_AIF1_TRI, reg); | ||
1965 | } | 1972 | } |
1966 | 1973 | ||
1967 | static void arizona_set_channels_to_mask(struct snd_soc_dai *dai, | 1974 | static void arizona_set_channels_to_mask(struct snd_soc_dai *dai, |
@@ -2319,7 +2326,6 @@ static int arizona_calc_fll(struct arizona_fll *fll, | |||
2319 | arizona_fll_dbg(fll, "GAIN=0x%x(%d)\n", cfg->gain, 1 << cfg->gain); | 2326 | arizona_fll_dbg(fll, "GAIN=0x%x(%d)\n", cfg->gain, 1 << cfg->gain); |
2320 | 2327 | ||
2321 | return 0; | 2328 | return 0; |
2322 | |||
2323 | } | 2329 | } |
2324 | 2330 | ||
2325 | static void arizona_apply_fll(struct arizona *arizona, unsigned int base, | 2331 | static void arizona_apply_fll(struct arizona *arizona, unsigned int base, |
@@ -2565,9 +2571,8 @@ int arizona_set_fll_refclk(struct arizona_fll *fll, int source, | |||
2565 | fll->ref_src = source; | 2571 | fll->ref_src = source; |
2566 | fll->ref_freq = Fref; | 2572 | fll->ref_freq = Fref; |
2567 | 2573 | ||
2568 | if (fll->fout && Fref > 0) { | 2574 | if (fll->fout && Fref > 0) |
2569 | ret = arizona_enable_fll(fll); | 2575 | ret = arizona_enable_fll(fll); |
2570 | } | ||
2571 | 2576 | ||
2572 | return ret; | 2577 | return ret; |
2573 | } | 2578 | } |
@@ -2656,7 +2661,8 @@ EXPORT_SYMBOL_GPL(arizona_init_fll); | |||
2656 | * Most systems have a single static configuration and should use | 2661 | * Most systems have a single static configuration and should use |
2657 | * platform data instead. | 2662 | * platform data instead. |
2658 | */ | 2663 | */ |
2659 | int arizona_set_output_mode(struct snd_soc_component *component, int output, bool diff) | 2664 | int arizona_set_output_mode(struct snd_soc_component *component, int output, |
2665 | bool diff) | ||
2660 | { | 2666 | { |
2661 | unsigned int reg, val; | 2667 | unsigned int reg, val; |
2662 | 2668 | ||
@@ -2670,7 +2676,8 @@ int arizona_set_output_mode(struct snd_soc_component *component, int output, boo | |||
2670 | else | 2676 | else |
2671 | val = 0; | 2677 | val = 0; |
2672 | 2678 | ||
2673 | return snd_soc_component_update_bits(component, reg, ARIZONA_OUT1_MONO, val); | 2679 | return snd_soc_component_update_bits(component, reg, |
2680 | ARIZONA_OUT1_MONO, val); | ||
2674 | } | 2681 | } |
2675 | EXPORT_SYMBOL_GPL(arizona_set_output_mode); | 2682 | EXPORT_SYMBOL_GPL(arizona_set_output_mode); |
2676 | 2683 | ||
diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c index c93d3f7e8e36..196e9c343aeb 100644 --- a/sound/soc/codecs/cs47l24.c +++ b/sound/soc/codecs/cs47l24.c | |||
@@ -196,14 +196,13 @@ SOC_SINGLE("HPOUT1 SC Protect Switch", ARIZONA_HP1_SHORT_CIRCUIT_CTRL, | |||
196 | SOC_DOUBLE_R("HPOUT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_1L, | 196 | SOC_DOUBLE_R("HPOUT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_1L, |
197 | ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_MUTE_SHIFT, 1, 1), | 197 | ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_MUTE_SHIFT, 1, 1), |
198 | SOC_SINGLE("Speaker Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_4L, | 198 | SOC_SINGLE("Speaker Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_4L, |
199 | ARIZONA_OUT4L_MUTE_SHIFT, 1, 1), | 199 | ARIZONA_OUT4L_MUTE_SHIFT, 1, 1), |
200 | 200 | ||
201 | SOC_DOUBLE_R_TLV("HPOUT1 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_1L, | 201 | SOC_DOUBLE_R_TLV("HPOUT1 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_1L, |
202 | ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_VOL_SHIFT, | 202 | ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_VOL_SHIFT, |
203 | 0xbf, 0, digital_tlv), | 203 | 0xbf, 0, digital_tlv), |
204 | SOC_SINGLE_TLV("Speaker Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_4L, | 204 | SOC_SINGLE_TLV("Speaker Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_4L, |
205 | ARIZONA_OUT4L_VOL_SHIFT, | 205 | ARIZONA_OUT4L_VOL_SHIFT, 0xbf, 0, digital_tlv), |
206 | 0xbf, 0, digital_tlv), | ||
207 | 206 | ||
208 | SOC_ENUM("Output Ramp Up", arizona_out_vi_ramp), | 207 | SOC_ENUM("Output Ramp Up", arizona_out_vi_ramp), |
209 | SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp), | 208 | SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp), |
@@ -494,8 +493,7 @@ SND_SOC_DAPM_PGA("ISRC3DEC4", ARIZONA_ISRC_3_CTRL_3, | |||
494 | ARIZONA_ISRC3_DEC3_ENA_SHIFT, 0, NULL, 0), | 493 | ARIZONA_ISRC3_DEC3_ENA_SHIFT, 0, NULL, 0), |
495 | 494 | ||
496 | SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, | 495 | SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, |
497 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, | 496 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, &cs47l24_aec_loopback_mux), |
498 | &cs47l24_aec_loopback_mux), | ||
499 | 497 | ||
500 | SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, | 498 | SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, |
501 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), | 499 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), |
@@ -931,8 +929,8 @@ static const struct snd_soc_dapm_route cs47l24_dapm_routes[] = { | |||
931 | { "DSP3 Voice Trigger", "Switch", "DSP3" }, | 929 | { "DSP3 Voice Trigger", "Switch", "DSP3" }, |
932 | }; | 930 | }; |
933 | 931 | ||
934 | static int cs47l24_set_fll(struct snd_soc_component *component, int fll_id, int source, | 932 | static int cs47l24_set_fll(struct snd_soc_component *component, int fll_id, |
935 | unsigned int Fref, unsigned int Fout) | 933 | int source, unsigned int Fref, unsigned int Fout) |
936 | { | 934 | { |
937 | struct cs47l24_priv *cs47l24 = snd_soc_component_get_drvdata(component); | 935 | struct cs47l24_priv *cs47l24 = snd_soc_component_get_drvdata(component); |
938 | 936 | ||
@@ -1144,7 +1142,8 @@ static int cs47l24_component_probe(struct snd_soc_component *component) | |||
1144 | goto err_adsp2_codec_probe; | 1142 | goto err_adsp2_codec_probe; |
1145 | 1143 | ||
1146 | ret = snd_soc_add_component_controls(component, | 1144 | ret = snd_soc_add_component_controls(component, |
1147 | &arizona_adsp2_rate_controls[1], 2); | 1145 | &arizona_adsp2_rate_controls[1], |
1146 | 2); | ||
1148 | if (ret) | 1147 | if (ret) |
1149 | goto err_adsp2_codec_probe; | 1148 | goto err_adsp2_codec_probe; |
1150 | 1149 | ||
@@ -1214,7 +1213,7 @@ static int cs47l24_probe(struct platform_device *pdev) | |||
1214 | BUILD_BUG_ON(ARRAY_SIZE(cs47l24_dai) > ARIZONA_MAX_DAI); | 1213 | BUILD_BUG_ON(ARRAY_SIZE(cs47l24_dai) > ARIZONA_MAX_DAI); |
1215 | 1214 | ||
1216 | cs47l24 = devm_kzalloc(&pdev->dev, sizeof(struct cs47l24_priv), | 1215 | cs47l24 = devm_kzalloc(&pdev->dev, sizeof(struct cs47l24_priv), |
1217 | GFP_KERNEL); | 1216 | GFP_KERNEL); |
1218 | if (!cs47l24) | 1217 | if (!cs47l24) |
1219 | return -ENOMEM; | 1218 | return -ENOMEM; |
1220 | 1219 | ||
@@ -1294,8 +1293,9 @@ static int cs47l24_probe(struct platform_device *pdev) | |||
1294 | goto err_dsp_irq; | 1293 | goto err_dsp_irq; |
1295 | 1294 | ||
1296 | ret = devm_snd_soc_register_component(&pdev->dev, | 1295 | ret = devm_snd_soc_register_component(&pdev->dev, |
1297 | &soc_component_dev_cs47l24, | 1296 | &soc_component_dev_cs47l24, |
1298 | cs47l24_dai, ARRAY_SIZE(cs47l24_dai)); | 1297 | cs47l24_dai, |
1298 | ARRAY_SIZE(cs47l24_dai)); | ||
1299 | if (ret < 0) { | 1299 | if (ret < 0) { |
1300 | dev_err(&pdev->dev, "Failed to register component: %d\n", ret); | 1300 | dev_err(&pdev->dev, "Failed to register component: %d\n", ret); |
1301 | goto err_spk_irqs; | 1301 | goto err_spk_irqs; |
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 24f19cfc98f5..1ac83388d1b8 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c | |||
@@ -620,7 +620,7 @@ static int wm5102_sysclk_ev(struct snd_soc_dapm_widget *w, | |||
620 | } | 620 | } |
621 | 621 | ||
622 | static int wm5102_adsp_power_ev(struct snd_soc_dapm_widget *w, | 622 | static int wm5102_adsp_power_ev(struct snd_soc_dapm_widget *w, |
623 | struct snd_kcontrol *kcontrol, int event) | 623 | struct snd_kcontrol *kcontrol, int event) |
624 | { | 624 | { |
625 | struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); | 625 | struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); |
626 | struct arizona *arizona = dev_get_drvdata(component->dev->parent); | 626 | struct arizona *arizona = dev_get_drvdata(component->dev->parent); |
@@ -717,7 +717,7 @@ static int wm5102_out_comp_switch_put(struct snd_kcontrol *kcontrol, | |||
717 | return 0; | 717 | return 0; |
718 | } | 718 | } |
719 | 719 | ||
720 | static const char *wm5102_osr_text[] = { | 720 | static const char * const wm5102_osr_text[] = { |
721 | "Low power", "Normal", "High performance", | 721 | "Low power", "Normal", "High performance", |
722 | }; | 722 | }; |
723 | 723 | ||
@@ -1062,7 +1062,7 @@ ARIZONA_MIXER_ENUMS(DSP1R, ARIZONA_DSP1RMIX_INPUT_1_SOURCE); | |||
1062 | 1062 | ||
1063 | ARIZONA_DSP_AUX_ENUMS(DSP1, ARIZONA_DSP1AUX1MIX_INPUT_1_SOURCE); | 1063 | ARIZONA_DSP_AUX_ENUMS(DSP1, ARIZONA_DSP1AUX1MIX_INPUT_1_SOURCE); |
1064 | 1064 | ||
1065 | static const char *wm5102_aec_loopback_texts[] = { | 1065 | static const char * const wm5102_aec_loopback_texts[] = { |
1066 | "HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "EPOUT", | 1066 | "HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "EPOUT", |
1067 | "SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R", | 1067 | "SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R", |
1068 | }; | 1068 | }; |
@@ -1317,8 +1317,7 @@ SND_SOC_DAPM_AIF_IN("SLIMRX8", NULL, 0, | |||
1317 | ARIZONA_DSP_WIDGETS(DSP1, "DSP1"), | 1317 | ARIZONA_DSP_WIDGETS(DSP1, "DSP1"), |
1318 | 1318 | ||
1319 | SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, | 1319 | SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, |
1320 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, | 1320 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, &wm5102_aec_loopback_mux), |
1321 | &wm5102_aec_loopback_mux), | ||
1322 | 1321 | ||
1323 | SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM, | 1322 | SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM, |
1324 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, | 1323 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, |
@@ -1736,8 +1735,8 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = { | |||
1736 | { "DRC1 Signal Activity", NULL, "DRC1R" }, | 1735 | { "DRC1 Signal Activity", NULL, "DRC1R" }, |
1737 | }; | 1736 | }; |
1738 | 1737 | ||
1739 | static int wm5102_set_fll(struct snd_soc_component *component, int fll_id, int source, | 1738 | static int wm5102_set_fll(struct snd_soc_component *component, int fll_id, |
1740 | unsigned int Fref, unsigned int Fout) | 1739 | int source, unsigned int Fref, unsigned int Fout) |
1741 | { | 1740 | { |
1742 | struct wm5102_priv *wm5102 = snd_soc_component_get_drvdata(component); | 1741 | struct wm5102_priv *wm5102 = snd_soc_component_get_drvdata(component); |
1743 | 1742 | ||
@@ -1947,7 +1946,7 @@ static int wm5102_component_probe(struct snd_soc_component *component) | |||
1947 | return ret; | 1946 | return ret; |
1948 | 1947 | ||
1949 | ret = snd_soc_add_component_controls(component, | 1948 | ret = snd_soc_add_component_controls(component, |
1950 | arizona_adsp2_rate_controls, 1); | 1949 | arizona_adsp2_rate_controls, 1); |
1951 | if (ret) | 1950 | if (ret) |
1952 | goto err_adsp2_codec_probe; | 1951 | goto err_adsp2_codec_probe; |
1953 | 1952 | ||
@@ -2105,8 +2104,9 @@ static int wm5102_probe(struct platform_device *pdev) | |||
2105 | goto err_dsp_irq; | 2104 | goto err_dsp_irq; |
2106 | 2105 | ||
2107 | ret = devm_snd_soc_register_component(&pdev->dev, | 2106 | ret = devm_snd_soc_register_component(&pdev->dev, |
2108 | &soc_component_dev_wm5102, | 2107 | &soc_component_dev_wm5102, |
2109 | wm5102_dai, ARRAY_SIZE(wm5102_dai)); | 2108 | wm5102_dai, |
2109 | ARRAY_SIZE(wm5102_dai)); | ||
2110 | if (ret < 0) { | 2110 | if (ret < 0) { |
2111 | dev_err(&pdev->dev, "Failed to register component: %d\n", ret); | 2111 | dev_err(&pdev->dev, "Failed to register component: %d\n", ret); |
2112 | goto err_spk_irqs; | 2112 | goto err_spk_irqs; |
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index b33cbd0161d3..fb9835dcd836 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -332,19 +332,25 @@ static int wm5110_hp_pre_disable(struct snd_soc_dapm_widget *w) | |||
332 | switch (w->shift) { | 332 | switch (w->shift) { |
333 | case ARIZONA_OUT1L_ENA_SHIFT: | 333 | case ARIZONA_OUT1L_ENA_SHIFT: |
334 | if (!(val & ARIZONA_DRE1L_ENA_MASK)) { | 334 | if (!(val & ARIZONA_DRE1L_ENA_MASK)) { |
335 | snd_soc_component_update_bits(component, ARIZONA_SPARE_TRIGGERS, | 335 | snd_soc_component_update_bits(component, |
336 | ARIZONA_WS_TRG1, ARIZONA_WS_TRG1); | 336 | ARIZONA_SPARE_TRIGGERS, |
337 | snd_soc_component_update_bits(component, ARIZONA_SPARE_TRIGGERS, | 337 | ARIZONA_WS_TRG1, |
338 | ARIZONA_WS_TRG1, 0); | 338 | ARIZONA_WS_TRG1); |
339 | snd_soc_component_update_bits(component, | ||
340 | ARIZONA_SPARE_TRIGGERS, | ||
341 | ARIZONA_WS_TRG1, 0); | ||
339 | priv->out_down_delay += 27; | 342 | priv->out_down_delay += 27; |
340 | } | 343 | } |
341 | break; | 344 | break; |
342 | case ARIZONA_OUT1R_ENA_SHIFT: | 345 | case ARIZONA_OUT1R_ENA_SHIFT: |
343 | if (!(val & ARIZONA_DRE1R_ENA_MASK)) { | 346 | if (!(val & ARIZONA_DRE1R_ENA_MASK)) { |
344 | snd_soc_component_update_bits(component, ARIZONA_SPARE_TRIGGERS, | 347 | snd_soc_component_update_bits(component, |
345 | ARIZONA_WS_TRG2, ARIZONA_WS_TRG2); | 348 | ARIZONA_SPARE_TRIGGERS, |
346 | snd_soc_component_update_bits(component, ARIZONA_SPARE_TRIGGERS, | 349 | ARIZONA_WS_TRG2, |
347 | ARIZONA_WS_TRG2, 0); | 350 | ARIZONA_WS_TRG2); |
351 | snd_soc_component_update_bits(component, | ||
352 | ARIZONA_SPARE_TRIGGERS, | ||
353 | ARIZONA_WS_TRG2, 0); | ||
348 | priv->out_down_delay += 27; | 354 | priv->out_down_delay += 27; |
349 | } | 355 | } |
350 | break; | 356 | break; |
@@ -539,7 +545,7 @@ static int wm5110_in_analog_ev(struct snd_soc_dapm_widget *w, | |||
539 | break; | 545 | break; |
540 | case SND_SOC_DAPM_POST_PMU: | 546 | case SND_SOC_DAPM_POST_PMU: |
541 | snd_soc_component_update_bits(component, reg, mask, | 547 | snd_soc_component_update_bits(component, reg, mask, |
542 | wm5110->in_pga_cache[w->shift]); | 548 | wm5110->in_pga_cache[w->shift]); |
543 | 549 | ||
544 | wm5110->in_post_pending--; | 550 | wm5110->in_post_pending--; |
545 | if (wm5110->in_post_pending == 0) | 551 | if (wm5110->in_post_pending == 0) |
@@ -863,14 +869,14 @@ SOC_DOUBLE("SPKDAT2 Switch", ARIZONA_PDM_SPK2_CTRL_1, ARIZONA_SPK2L_MUTE_SHIFT, | |||
863 | ARIZONA_SPK2R_MUTE_SHIFT, 1, 1), | 869 | ARIZONA_SPK2R_MUTE_SHIFT, 1, 1), |
864 | 870 | ||
865 | SOC_DOUBLE_EXT("HPOUT1 DRE Switch", ARIZONA_DRE_ENABLE, | 871 | SOC_DOUBLE_EXT("HPOUT1 DRE Switch", ARIZONA_DRE_ENABLE, |
866 | ARIZONA_DRE1L_ENA_SHIFT, ARIZONA_DRE1R_ENA_SHIFT, 1, 0, | 872 | ARIZONA_DRE1L_ENA_SHIFT, ARIZONA_DRE1R_ENA_SHIFT, 1, 0, |
867 | snd_soc_get_volsw, wm5110_put_dre), | 873 | snd_soc_get_volsw, wm5110_put_dre), |
868 | SOC_DOUBLE_EXT("HPOUT2 DRE Switch", ARIZONA_DRE_ENABLE, | 874 | SOC_DOUBLE_EXT("HPOUT2 DRE Switch", ARIZONA_DRE_ENABLE, |
869 | ARIZONA_DRE2L_ENA_SHIFT, ARIZONA_DRE2R_ENA_SHIFT, 1, 0, | 875 | ARIZONA_DRE2L_ENA_SHIFT, ARIZONA_DRE2R_ENA_SHIFT, 1, 0, |
870 | snd_soc_get_volsw, wm5110_put_dre), | 876 | snd_soc_get_volsw, wm5110_put_dre), |
871 | SOC_DOUBLE_EXT("HPOUT3 DRE Switch", ARIZONA_DRE_ENABLE, | 877 | SOC_DOUBLE_EXT("HPOUT3 DRE Switch", ARIZONA_DRE_ENABLE, |
872 | ARIZONA_DRE3L_ENA_SHIFT, ARIZONA_DRE3R_ENA_SHIFT, 1, 0, | 878 | ARIZONA_DRE3L_ENA_SHIFT, ARIZONA_DRE3R_ENA_SHIFT, 1, 0, |
873 | snd_soc_get_volsw, wm5110_put_dre), | 879 | snd_soc_get_volsw, wm5110_put_dre), |
874 | 880 | ||
875 | SOC_ENUM("Output Ramp Up", arizona_out_vi_ramp), | 881 | SOC_ENUM("Output Ramp Up", arizona_out_vi_ramp), |
876 | SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp), | 882 | SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp), |
@@ -1036,7 +1042,7 @@ ARIZONA_MUX_ENUMS(ISRC3DEC2, ARIZONA_ISRC3DEC2MIX_INPUT_1_SOURCE); | |||
1036 | ARIZONA_MUX_ENUMS(ISRC3DEC3, ARIZONA_ISRC3DEC3MIX_INPUT_1_SOURCE); | 1042 | ARIZONA_MUX_ENUMS(ISRC3DEC3, ARIZONA_ISRC3DEC3MIX_INPUT_1_SOURCE); |
1037 | ARIZONA_MUX_ENUMS(ISRC3DEC4, ARIZONA_ISRC3DEC4MIX_INPUT_1_SOURCE); | 1043 | ARIZONA_MUX_ENUMS(ISRC3DEC4, ARIZONA_ISRC3DEC4MIX_INPUT_1_SOURCE); |
1038 | 1044 | ||
1039 | static const char *wm5110_aec_loopback_texts[] = { | 1045 | static const char * const wm5110_aec_loopback_texts[] = { |
1040 | "HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "HPOUT3L", "HPOUT3R", | 1046 | "HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "HPOUT3L", "HPOUT3R", |
1041 | "SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R", "SPKDAT2L", "SPKDAT2R", | 1047 | "SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R", "SPKDAT2L", "SPKDAT2R", |
1042 | }; | 1048 | }; |
@@ -1274,18 +1280,17 @@ SND_SOC_DAPM_PGA("ISRC3DEC4", ARIZONA_ISRC_3_CTRL_3, | |||
1274 | ARIZONA_ISRC3_DEC3_ENA_SHIFT, 0, NULL, 0), | 1280 | ARIZONA_ISRC3_DEC3_ENA_SHIFT, 0, NULL, 0), |
1275 | 1281 | ||
1276 | SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, | 1282 | SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, |
1277 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, | 1283 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, &wm5110_aec_loopback_mux), |
1278 | &wm5110_aec_loopback_mux), | ||
1279 | 1284 | ||
1280 | SND_SOC_DAPM_SUPPLY("RXANC NG External Clock", SND_SOC_NOPM, | 1285 | SND_SOC_DAPM_SUPPLY("RXANC NG External Clock", SND_SOC_NOPM, |
1281 | ARIZONA_EXT_NG_SEL_SET_SHIFT, 0, arizona_anc_ev, | 1286 | ARIZONA_EXT_NG_SEL_SET_SHIFT, 0, arizona_anc_ev, |
1282 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 1287 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
1283 | SND_SOC_DAPM_PGA("RXANCL NG External", SND_SOC_NOPM, 0, 0, NULL, 0), | 1288 | SND_SOC_DAPM_PGA("RXANCL NG External", SND_SOC_NOPM, 0, 0, NULL, 0), |
1284 | SND_SOC_DAPM_PGA("RXANCR NG External", SND_SOC_NOPM, 0, 0, NULL, 0), | 1289 | SND_SOC_DAPM_PGA("RXANCR NG External", SND_SOC_NOPM, 0, 0, NULL, 0), |
1285 | 1290 | ||
1286 | SND_SOC_DAPM_SUPPLY("RXANC NG Clock", SND_SOC_NOPM, | 1291 | SND_SOC_DAPM_SUPPLY("RXANC NG Clock", SND_SOC_NOPM, |
1287 | ARIZONA_CLK_NG_ENA_SET_SHIFT, 0, arizona_anc_ev, | 1292 | ARIZONA_CLK_NG_ENA_SET_SHIFT, 0, arizona_anc_ev, |
1288 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 1293 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
1289 | SND_SOC_DAPM_PGA("RXANCL NG Internal", SND_SOC_NOPM, 0, 0, NULL, 0), | 1294 | SND_SOC_DAPM_PGA("RXANCL NG Internal", SND_SOC_NOPM, 0, 0, NULL, 0), |
1290 | SND_SOC_DAPM_PGA("RXANCR NG Internal", SND_SOC_NOPM, 0, 0, NULL, 0), | 1295 | SND_SOC_DAPM_PGA("RXANCR NG Internal", SND_SOC_NOPM, 0, 0, NULL, 0), |
1291 | 1296 | ||
@@ -2034,8 +2039,8 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = { | |||
2034 | { "DSP3 Voice Trigger", "Switch", "DSP3" }, | 2039 | { "DSP3 Voice Trigger", "Switch", "DSP3" }, |
2035 | }; | 2040 | }; |
2036 | 2041 | ||
2037 | static int wm5110_set_fll(struct snd_soc_component *component, int fll_id, int source, | 2042 | static int wm5110_set_fll(struct snd_soc_component *component, int fll_id, |
2038 | unsigned int Fref, unsigned int Fout) | 2043 | int source, unsigned int Fref, unsigned int Fout) |
2039 | { | 2044 | { |
2040 | struct wm5110_priv *wm5110 = snd_soc_component_get_drvdata(component); | 2045 | struct wm5110_priv *wm5110 = snd_soc_component_get_drvdata(component); |
2041 | 2046 | ||
@@ -2302,8 +2307,8 @@ static int wm5110_component_probe(struct snd_soc_component *component) | |||
2302 | } | 2307 | } |
2303 | 2308 | ||
2304 | ret = snd_soc_add_component_controls(component, | 2309 | ret = snd_soc_add_component_controls(component, |
2305 | arizona_adsp2_rate_controls, | 2310 | arizona_adsp2_rate_controls, |
2306 | WM5110_NUM_ADSP); | 2311 | WM5110_NUM_ADSP); |
2307 | if (ret) | 2312 | if (ret) |
2308 | goto err_adsp2_codec_probe; | 2313 | goto err_adsp2_codec_probe; |
2309 | 2314 | ||
@@ -2460,8 +2465,9 @@ static int wm5110_probe(struct platform_device *pdev) | |||
2460 | goto err_dsp_irq; | 2465 | goto err_dsp_irq; |
2461 | 2466 | ||
2462 | ret = devm_snd_soc_register_component(&pdev->dev, | 2467 | ret = devm_snd_soc_register_component(&pdev->dev, |
2463 | &soc_component_dev_wm5110, | 2468 | &soc_component_dev_wm5110, |
2464 | wm5110_dai, ARRAY_SIZE(wm5110_dai)); | 2469 | wm5110_dai, |
2470 | ARRAY_SIZE(wm5110_dai)); | ||
2465 | if (ret < 0) { | 2471 | if (ret < 0) { |
2466 | dev_err(&pdev->dev, "Failed to register component: %d\n", ret); | 2472 | dev_err(&pdev->dev, "Failed to register component: %d\n", ret); |
2467 | goto err_spk_irqs; | 2473 | goto err_spk_irqs; |
diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c index 45ee1e6bf715..df5b36b8fc5a 100644 --- a/sound/soc/codecs/wm8997.c +++ b/sound/soc/codecs/wm8997.c | |||
@@ -118,7 +118,7 @@ static int wm8997_sysclk_ev(struct snd_soc_dapm_widget *w, | |||
118 | return arizona_dvfs_sysclk_ev(w, kcontrol, event); | 118 | return arizona_dvfs_sysclk_ev(w, kcontrol, event); |
119 | } | 119 | } |
120 | 120 | ||
121 | static const char *wm8997_osr_text[] = { | 121 | static const char * const wm8997_osr_text[] = { |
122 | "Low power", "Normal", "High performance", | 122 | "Low power", "Normal", "High performance", |
123 | }; | 123 | }; |
124 | 124 | ||
@@ -609,8 +609,7 @@ SND_SOC_DAPM_AIF_IN("SLIMRX8", NULL, 0, | |||
609 | ARIZONA_SLIMRX8_ENA_SHIFT, 0), | 609 | ARIZONA_SLIMRX8_ENA_SHIFT, 0), |
610 | 610 | ||
611 | SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, | 611 | SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, |
612 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, | 612 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, &wm8997_aec_loopback_mux), |
613 | &wm8997_aec_loopback_mux), | ||
614 | 613 | ||
615 | SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM, | 614 | SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM, |
616 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, | 615 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, |
@@ -927,8 +926,8 @@ static const struct snd_soc_dapm_route wm8997_dapm_routes[] = { | |||
927 | { "MICSUPP", NULL, "SYSCLK" }, | 926 | { "MICSUPP", NULL, "SYSCLK" }, |
928 | }; | 927 | }; |
929 | 928 | ||
930 | static int wm8997_set_fll(struct snd_soc_component *component, int fll_id, int source, | 929 | static int wm8997_set_fll(struct snd_soc_component *component, int fll_id, |
931 | unsigned int Fref, unsigned int Fout) | 930 | int source, unsigned int Fref, unsigned int Fout) |
932 | { | 931 | { |
933 | struct wm8997_priv *wm8997 = snd_soc_component_get_drvdata(component); | 932 | struct wm8997_priv *wm8997 = snd_soc_component_get_drvdata(component); |
934 | 933 | ||
@@ -1173,8 +1172,9 @@ static int wm8997_probe(struct platform_device *pdev) | |||
1173 | return ret; | 1172 | return ret; |
1174 | 1173 | ||
1175 | ret = devm_snd_soc_register_component(&pdev->dev, | 1174 | ret = devm_snd_soc_register_component(&pdev->dev, |
1176 | &soc_component_dev_wm8997, | 1175 | &soc_component_dev_wm8997, |
1177 | wm8997_dai, ARRAY_SIZE(wm8997_dai)); | 1176 | wm8997_dai, |
1177 | ARRAY_SIZE(wm8997_dai)); | ||
1178 | if (ret < 0) { | 1178 | if (ret < 0) { |
1179 | dev_err(&pdev->dev, "Failed to register component: %d\n", ret); | 1179 | dev_err(&pdev->dev, "Failed to register component: %d\n", ret); |
1180 | goto err_spk_irqs; | 1180 | goto err_spk_irqs; |
diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c index 6f3fdd7b095e..61294c787f27 100644 --- a/sound/soc/codecs/wm8998.c +++ b/sound/soc/codecs/wm8998.c | |||
@@ -137,11 +137,13 @@ static int wm8998_inmux_put(struct snd_kcontrol *kcontrol, | |||
137 | if (inmode & ARIZONA_INMODE_SE) | 137 | if (inmode & ARIZONA_INMODE_SE) |
138 | src_val |= 1 << ARIZONA_IN1L_SRC_SE_SHIFT; | 138 | src_val |= 1 << ARIZONA_IN1L_SRC_SE_SHIFT; |
139 | 139 | ||
140 | snd_soc_component_update_bits(component, mode_reg, ARIZONA_IN1_MODE_MASK, mode_val); | 140 | snd_soc_component_update_bits(component, mode_reg, |
141 | ARIZONA_IN1_MODE_MASK, mode_val); | ||
141 | 142 | ||
142 | snd_soc_component_update_bits(component, e->reg, | 143 | snd_soc_component_update_bits(component, e->reg, |
143 | ARIZONA_IN1L_SRC_MASK | ARIZONA_IN1L_SRC_SE_MASK, | 144 | ARIZONA_IN1L_SRC_MASK | |
144 | src_val); | 145 | ARIZONA_IN1L_SRC_SE_MASK, |
146 | src_val); | ||
145 | 147 | ||
146 | return snd_soc_dapm_mux_update_power(dapm, kcontrol, | 148 | return snd_soc_dapm_mux_update_power(dapm, kcontrol, |
147 | ucontrol->value.enumerated.item[0], | 149 | ucontrol->value.enumerated.item[0], |
@@ -322,7 +324,7 @@ SOC_DOUBLE_R("HPOUT Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_1L, | |||
322 | SOC_DOUBLE_R("LINEOUT Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_2L, | 324 | SOC_DOUBLE_R("LINEOUT Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_2L, |
323 | ARIZONA_DAC_DIGITAL_VOLUME_2R, ARIZONA_OUT2L_MUTE_SHIFT, 1, 1), | 325 | ARIZONA_DAC_DIGITAL_VOLUME_2R, ARIZONA_OUT2L_MUTE_SHIFT, 1, 1), |
324 | SOC_SINGLE("EPOUT Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_3L, | 326 | SOC_SINGLE("EPOUT Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_3L, |
325 | ARIZONA_OUT3L_MUTE_SHIFT, 1, 1), | 327 | ARIZONA_OUT3L_MUTE_SHIFT, 1, 1), |
326 | SOC_DOUBLE_R("Speaker Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_4L, | 328 | SOC_DOUBLE_R("Speaker Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_4L, |
327 | ARIZONA_DAC_DIGITAL_VOLUME_4R, ARIZONA_OUT4L_MUTE_SHIFT, 1, 1), | 329 | ARIZONA_DAC_DIGITAL_VOLUME_4R, ARIZONA_OUT4L_MUTE_SHIFT, 1, 1), |
328 | SOC_DOUBLE_R("SPKDAT Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_5L, | 330 | SOC_DOUBLE_R("SPKDAT Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_5L, |
@@ -335,7 +337,7 @@ SOC_DOUBLE_R_TLV("LINEOUT Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_2L, | |||
335 | ARIZONA_DAC_DIGITAL_VOLUME_2R, ARIZONA_OUT2L_VOL_SHIFT, | 337 | ARIZONA_DAC_DIGITAL_VOLUME_2R, ARIZONA_OUT2L_VOL_SHIFT, |
336 | 0xbf, 0, digital_tlv), | 338 | 0xbf, 0, digital_tlv), |
337 | SOC_SINGLE_TLV("EPOUT Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_3L, | 339 | SOC_SINGLE_TLV("EPOUT Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_3L, |
338 | ARIZONA_OUT3L_VOL_SHIFT, 0xbf, 0, digital_tlv), | 340 | ARIZONA_OUT3L_VOL_SHIFT, 0xbf, 0, digital_tlv), |
339 | SOC_DOUBLE_R_TLV("Speaker Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_4L, | 341 | SOC_DOUBLE_R_TLV("Speaker Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_4L, |
340 | ARIZONA_DAC_DIGITAL_VOLUME_4R, ARIZONA_OUT4L_VOL_SHIFT, | 342 | ARIZONA_DAC_DIGITAL_VOLUME_4R, ARIZONA_OUT4L_VOL_SHIFT, |
341 | 0xbf, 0, digital_tlv), | 343 | 0xbf, 0, digital_tlv), |
@@ -615,12 +617,12 @@ SND_SOC_DAPM_PGA("ISRC2DEC2", ARIZONA_ISRC_2_CTRL_3, | |||
615 | ARIZONA_ISRC2_DEC1_ENA_SHIFT, 0, NULL, 0), | 617 | ARIZONA_ISRC2_DEC1_ENA_SHIFT, 0, NULL, 0), |
616 | 618 | ||
617 | SND_SOC_DAPM_MUX("AEC1 Loopback", ARIZONA_DAC_AEC_CONTROL_1, | 619 | SND_SOC_DAPM_MUX("AEC1 Loopback", ARIZONA_DAC_AEC_CONTROL_1, |
618 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, | 620 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, |
619 | &wm8998_aec_loopback_mux[0]), | 621 | &wm8998_aec_loopback_mux[0]), |
620 | 622 | ||
621 | SND_SOC_DAPM_MUX("AEC2 Loopback", ARIZONA_DAC_AEC_CONTROL_2, | 623 | SND_SOC_DAPM_MUX("AEC2 Loopback", ARIZONA_DAC_AEC_CONTROL_2, |
622 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, | 624 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, |
623 | &wm8998_aec_loopback_mux[1]), | 625 | &wm8998_aec_loopback_mux[1]), |
624 | 626 | ||
625 | SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, | 627 | SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, |
626 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), | 628 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), |
@@ -739,9 +741,9 @@ SND_SOC_DAPM_PGA_E("OUT5R", ARIZONA_OUTPUT_ENABLES_1, | |||
739 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), | 741 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
740 | 742 | ||
741 | SND_SOC_DAPM_PGA("SPD1TX1", ARIZONA_SPD1_TX_CONTROL, | 743 | SND_SOC_DAPM_PGA("SPD1TX1", ARIZONA_SPD1_TX_CONTROL, |
742 | ARIZONA_SPD1_VAL1_SHIFT, 0, NULL, 0), | 744 | ARIZONA_SPD1_VAL1_SHIFT, 0, NULL, 0), |
743 | SND_SOC_DAPM_PGA("SPD1TX2", ARIZONA_SPD1_TX_CONTROL, | 745 | SND_SOC_DAPM_PGA("SPD1TX2", ARIZONA_SPD1_TX_CONTROL, |
744 | ARIZONA_SPD1_VAL2_SHIFT, 0, NULL, 0), | 746 | ARIZONA_SPD1_VAL2_SHIFT, 0, NULL, 0), |
745 | SND_SOC_DAPM_OUT_DRV("SPD1", ARIZONA_SPD1_TX_CONTROL, | 747 | SND_SOC_DAPM_OUT_DRV("SPD1", ARIZONA_SPD1_TX_CONTROL, |
746 | ARIZONA_SPD1_ENA_SHIFT, 0, NULL, 0), | 748 | ARIZONA_SPD1_ENA_SHIFT, 0, NULL, 0), |
747 | 749 | ||
@@ -1249,8 +1251,8 @@ static struct snd_soc_dai_driver wm8998_dai[] = { | |||
1249 | }, | 1251 | }, |
1250 | }; | 1252 | }; |
1251 | 1253 | ||
1252 | static int wm8998_set_fll(struct snd_soc_component *component, int fll_id, int source, | 1254 | static int wm8998_set_fll(struct snd_soc_component *component, int fll_id, |
1253 | unsigned int Fref, unsigned int Fout) | 1255 | int source, unsigned int Fref, unsigned int Fout) |
1254 | { | 1256 | { |
1255 | struct wm8998_priv *wm8998 = snd_soc_component_get_drvdata(component); | 1257 | struct wm8998_priv *wm8998 = snd_soc_component_get_drvdata(component); |
1256 | 1258 | ||
@@ -1379,8 +1381,9 @@ static int wm8998_probe(struct platform_device *pdev) | |||
1379 | return ret; | 1381 | return ret; |
1380 | 1382 | ||
1381 | ret = devm_snd_soc_register_component(&pdev->dev, | 1383 | ret = devm_snd_soc_register_component(&pdev->dev, |
1382 | &soc_component_dev_wm8998, | 1384 | &soc_component_dev_wm8998, |
1383 | wm8998_dai, ARRAY_SIZE(wm8998_dai)); | 1385 | wm8998_dai, |
1386 | ARRAY_SIZE(wm8998_dai)); | ||
1384 | if (ret < 0) { | 1387 | if (ret < 0) { |
1385 | dev_err(&pdev->dev, "Failed to register component: %d\n", ret); | 1388 | dev_err(&pdev->dev, "Failed to register component: %d\n", ret); |
1386 | goto err_spk_irqs; | 1389 | goto err_spk_irqs; |