diff options
| -rw-r--r-- | sound/soc/codecs/wm8996.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index 1a7655b0aa22..92bb02185c46 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c | |||
| @@ -311,28 +311,28 @@ static const char *sidetone_hpf_text[] = { | |||
| 311 | "2.9kHz", "1.5kHz", "735Hz", "403Hz", "196Hz", "98Hz", "49Hz" | 311 | "2.9kHz", "1.5kHz", "735Hz", "403Hz", "196Hz", "98Hz", "49Hz" |
| 312 | }; | 312 | }; |
| 313 | 313 | ||
| 314 | static const struct soc_enum sidetone_hpf = | 314 | static SOC_ENUM_SINGLE_DECL(sidetone_hpf, |
| 315 | SOC_ENUM_SINGLE(WM8996_SIDETONE, 7, 7, sidetone_hpf_text); | 315 | WM8996_SIDETONE, 7, sidetone_hpf_text); |
| 316 | 316 | ||
| 317 | static const char *hpf_mode_text[] = { | 317 | static const char *hpf_mode_text[] = { |
| 318 | "HiFi", "Custom", "Voice" | 318 | "HiFi", "Custom", "Voice" |
| 319 | }; | 319 | }; |
| 320 | 320 | ||
| 321 | static const struct soc_enum dsp1tx_hpf_mode = | 321 | static SOC_ENUM_SINGLE_DECL(dsp1tx_hpf_mode, |
| 322 | SOC_ENUM_SINGLE(WM8996_DSP1_TX_FILTERS, 3, 3, hpf_mode_text); | 322 | WM8996_DSP1_TX_FILTERS, 3, hpf_mode_text); |
| 323 | 323 | ||
| 324 | static const struct soc_enum dsp2tx_hpf_mode = | 324 | static SOC_ENUM_SINGLE_DECL(dsp2tx_hpf_mode, |
| 325 | SOC_ENUM_SINGLE(WM8996_DSP2_TX_FILTERS, 3, 3, hpf_mode_text); | 325 | WM8996_DSP2_TX_FILTERS, 3, hpf_mode_text); |
| 326 | 326 | ||
| 327 | static const char *hpf_cutoff_text[] = { | 327 | static const char *hpf_cutoff_text[] = { |
| 328 | "50Hz", "75Hz", "100Hz", "150Hz", "200Hz", "300Hz", "400Hz" | 328 | "50Hz", "75Hz", "100Hz", "150Hz", "200Hz", "300Hz", "400Hz" |
| 329 | }; | 329 | }; |
| 330 | 330 | ||
| 331 | static const struct soc_enum dsp1tx_hpf_cutoff = | 331 | static SOC_ENUM_SINGLE_DECL(dsp1tx_hpf_cutoff, |
| 332 | SOC_ENUM_SINGLE(WM8996_DSP1_TX_FILTERS, 0, 7, hpf_cutoff_text); | 332 | WM8996_DSP1_TX_FILTERS, 0, hpf_cutoff_text); |
| 333 | 333 | ||
| 334 | static const struct soc_enum dsp2tx_hpf_cutoff = | 334 | static SOC_ENUM_SINGLE_DECL(dsp2tx_hpf_cutoff, |
| 335 | SOC_ENUM_SINGLE(WM8996_DSP2_TX_FILTERS, 0, 7, hpf_cutoff_text); | 335 | WM8996_DSP2_TX_FILTERS, 0, hpf_cutoff_text); |
| 336 | 336 | ||
| 337 | static void wm8996_set_retune_mobile(struct snd_soc_codec *codec, int block) | 337 | static void wm8996_set_retune_mobile(struct snd_soc_codec *codec, int block) |
| 338 | { | 338 | { |
| @@ -780,14 +780,14 @@ static const char *sidetone_text[] = { | |||
| 780 | "IN1", "IN2", | 780 | "IN1", "IN2", |
| 781 | }; | 781 | }; |
| 782 | 782 | ||
| 783 | static const struct soc_enum left_sidetone_enum = | 783 | static SOC_ENUM_SINGLE_DECL(left_sidetone_enum, |
| 784 | SOC_ENUM_SINGLE(WM8996_SIDETONE, 0, 2, sidetone_text); | 784 | WM8996_SIDETONE, 0, sidetone_text); |
| 785 | 785 | ||
| 786 | static const struct snd_kcontrol_new left_sidetone = | 786 | static const struct snd_kcontrol_new left_sidetone = |
| 787 | SOC_DAPM_ENUM("Left Sidetone", left_sidetone_enum); | 787 | SOC_DAPM_ENUM("Left Sidetone", left_sidetone_enum); |
| 788 | 788 | ||
| 789 | static const struct soc_enum right_sidetone_enum = | 789 | static SOC_ENUM_SINGLE_DECL(right_sidetone_enum, |
| 790 | SOC_ENUM_SINGLE(WM8996_SIDETONE, 1, 2, sidetone_text); | 790 | WM8996_SIDETONE, 1, sidetone_text); |
| 791 | 791 | ||
| 792 | static const struct snd_kcontrol_new right_sidetone = | 792 | static const struct snd_kcontrol_new right_sidetone = |
| 793 | SOC_DAPM_ENUM("Right Sidetone", right_sidetone_enum); | 793 | SOC_DAPM_ENUM("Right Sidetone", right_sidetone_enum); |
| @@ -796,14 +796,14 @@ static const char *spk_text[] = { | |||
| 796 | "DAC1L", "DAC1R", "DAC2L", "DAC2R" | 796 | "DAC1L", "DAC1R", "DAC2L", "DAC2R" |
| 797 | }; | 797 | }; |
| 798 | 798 | ||
| 799 | static const struct soc_enum spkl_enum = | 799 | static SOC_ENUM_SINGLE_DECL(spkl_enum, |
| 800 | SOC_ENUM_SINGLE(WM8996_LEFT_PDM_SPEAKER, 0, 4, spk_text); | 800 | WM8996_LEFT_PDM_SPEAKER, 0, spk_text); |
| 801 | 801 | ||
| 802 | static const struct snd_kcontrol_new spkl_mux = | 802 | static const struct snd_kcontrol_new spkl_mux = |
| 803 | SOC_DAPM_ENUM("SPKL", spkl_enum); | 803 | SOC_DAPM_ENUM("SPKL", spkl_enum); |
| 804 | 804 | ||
| 805 | static const struct soc_enum spkr_enum = | 805 | static SOC_ENUM_SINGLE_DECL(spkr_enum, |
| 806 | SOC_ENUM_SINGLE(WM8996_RIGHT_PDM_SPEAKER, 0, 4, spk_text); | 806 | WM8996_RIGHT_PDM_SPEAKER, 0, spk_text); |
| 807 | 807 | ||
| 808 | static const struct snd_kcontrol_new spkr_mux = | 808 | static const struct snd_kcontrol_new spkr_mux = |
| 809 | SOC_DAPM_ENUM("SPKR", spkr_enum); | 809 | SOC_DAPM_ENUM("SPKR", spkr_enum); |
| @@ -812,8 +812,8 @@ static const char *dsp1rx_text[] = { | |||
| 812 | "AIF1", "AIF2" | 812 | "AIF1", "AIF2" |
| 813 | }; | 813 | }; |
| 814 | 814 | ||
| 815 | static const struct soc_enum dsp1rx_enum = | 815 | static SOC_ENUM_SINGLE_DECL(dsp1rx_enum, |
| 816 | SOC_ENUM_SINGLE(WM8996_POWER_MANAGEMENT_8, 0, 2, dsp1rx_text); | 816 | WM8996_POWER_MANAGEMENT_8, 0, dsp1rx_text); |
| 817 | 817 | ||
| 818 | static const struct snd_kcontrol_new dsp1rx = | 818 | static const struct snd_kcontrol_new dsp1rx = |
| 819 | SOC_DAPM_ENUM("DSP1RX", dsp1rx_enum); | 819 | SOC_DAPM_ENUM("DSP1RX", dsp1rx_enum); |
| @@ -822,8 +822,8 @@ static const char *dsp2rx_text[] = { | |||
| 822 | "AIF2", "AIF1" | 822 | "AIF2", "AIF1" |
| 823 | }; | 823 | }; |
| 824 | 824 | ||
| 825 | static const struct soc_enum dsp2rx_enum = | 825 | static SOC_ENUM_SINGLE_DECL(dsp2rx_enum, |
| 826 | SOC_ENUM_SINGLE(WM8996_POWER_MANAGEMENT_8, 4, 2, dsp2rx_text); | 826 | WM8996_POWER_MANAGEMENT_8, 4, dsp2rx_text); |
| 827 | 827 | ||
| 828 | static const struct snd_kcontrol_new dsp2rx = | 828 | static const struct snd_kcontrol_new dsp2rx = |
| 829 | SOC_DAPM_ENUM("DSP2RX", dsp2rx_enum); | 829 | SOC_DAPM_ENUM("DSP2RX", dsp2rx_enum); |
| @@ -832,8 +832,8 @@ static const char *aif2tx_text[] = { | |||
| 832 | "DSP2", "DSP1", "AIF1" | 832 | "DSP2", "DSP1", "AIF1" |
| 833 | }; | 833 | }; |
| 834 | 834 | ||
| 835 | static const struct soc_enum aif2tx_enum = | 835 | static SOC_ENUM_SINGLE_DECL(aif2tx_enum, |
| 836 | SOC_ENUM_SINGLE(WM8996_POWER_MANAGEMENT_8, 6, 3, aif2tx_text); | 836 | WM8996_POWER_MANAGEMENT_8, 6, aif2tx_text); |
| 837 | 837 | ||
| 838 | static const struct snd_kcontrol_new aif2tx = | 838 | static const struct snd_kcontrol_new aif2tx = |
| 839 | SOC_DAPM_ENUM("AIF2TX", aif2tx_enum); | 839 | SOC_DAPM_ENUM("AIF2TX", aif2tx_enum); |
| @@ -842,14 +842,14 @@ static const char *inmux_text[] = { | |||
| 842 | "ADC", "DMIC1", "DMIC2" | 842 | "ADC", "DMIC1", "DMIC2" |
| 843 | }; | 843 | }; |
| 844 | 844 | ||
| 845 | static const struct soc_enum in1_enum = | 845 | static SOC_ENUM_SINGLE_DECL(in1_enum, |
| 846 | SOC_ENUM_SINGLE(WM8996_POWER_MANAGEMENT_7, 0, 3, inmux_text); | 846 | WM8996_POWER_MANAGEMENT_7, 0, inmux_text); |
| 847 | 847 | ||
| 848 | static const struct snd_kcontrol_new in1_mux = | 848 | static const struct snd_kcontrol_new in1_mux = |
| 849 | SOC_DAPM_ENUM("IN1 Mux", in1_enum); | 849 | SOC_DAPM_ENUM("IN1 Mux", in1_enum); |
| 850 | 850 | ||
| 851 | static const struct soc_enum in2_enum = | 851 | static SOC_ENUM_SINGLE_DECL(in2_enum, |
| 852 | SOC_ENUM_SINGLE(WM8996_POWER_MANAGEMENT_7, 4, 3, inmux_text); | 852 | WM8996_POWER_MANAGEMENT_7, 4, inmux_text); |
| 853 | 853 | ||
| 854 | static const struct snd_kcontrol_new in2_mux = | 854 | static const struct snd_kcontrol_new in2_mux = |
| 855 | SOC_DAPM_ENUM("IN2 Mux", in2_enum); | 855 | SOC_DAPM_ENUM("IN2 Mux", in2_enum); |
