diff options
author | Mark Brown <broonie@linaro.org> | 2014-08-01 12:30:38 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-01 14:17:05 -0400 |
commit | 019575726e6d93933ed6823475d09b932be2a5fc (patch) | |
tree | 134784ccd06a2e4d4d4e8b640c879548b9b9bf48 | |
parent | ff62b95894b88622dd6373730d57a8a7e126f687 (diff) |
ASoC: rt5670: Fix duplicate const warnings
Since SOC_ENUM_SINGLE_DECL() includes a const as part of the macro adding
an explicit const in the source is duplication and causes sparse to warn.
Remove the extra consts.
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/codecs/rt5670.c | 109 |
1 files changed, 37 insertions, 72 deletions
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c index 31f664fb832f..ba9d9b4d4857 100644 --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c | |||
@@ -424,10 +424,10 @@ static const char * const rt5670_data_select[] = { | |||
424 | "Normal", "Swap", "left copy to right", "right copy to left" | 424 | "Normal", "Swap", "left copy to right", "right copy to left" |
425 | }; | 425 | }; |
426 | 426 | ||
427 | static const SOC_ENUM_SINGLE_DECL(rt5670_if2_dac_enum, RT5670_DIG_INF1_DATA, | 427 | static SOC_ENUM_SINGLE_DECL(rt5670_if2_dac_enum, RT5670_DIG_INF1_DATA, |
428 | RT5670_IF2_DAC_SEL_SFT, rt5670_data_select); | 428 | RT5670_IF2_DAC_SEL_SFT, rt5670_data_select); |
429 | 429 | ||
430 | static const SOC_ENUM_SINGLE_DECL(rt5670_if2_adc_enum, RT5670_DIG_INF1_DATA, | 430 | static SOC_ENUM_SINGLE_DECL(rt5670_if2_adc_enum, RT5670_DIG_INF1_DATA, |
431 | RT5670_IF2_ADC_SEL_SFT, rt5670_data_select); | 431 | RT5670_IF2_ADC_SEL_SFT, rt5670_data_select); |
432 | 432 | ||
433 | static const struct snd_kcontrol_new rt5670_snd_controls[] = { | 433 | static const struct snd_kcontrol_new rt5670_snd_controls[] = { |
@@ -786,15 +786,13 @@ static const char * const rt5670_dac1_src[] = { | |||
786 | "IF1 DAC", "IF2 DAC" | 786 | "IF1 DAC", "IF2 DAC" |
787 | }; | 787 | }; |
788 | 788 | ||
789 | static const SOC_ENUM_SINGLE_DECL( | 789 | static SOC_ENUM_SINGLE_DECL(rt5670_dac1l_enum, RT5670_AD_DA_MIXER, |
790 | rt5670_dac1l_enum, RT5670_AD_DA_MIXER, | ||
791 | RT5670_DAC1_L_SEL_SFT, rt5670_dac1_src); | 790 | RT5670_DAC1_L_SEL_SFT, rt5670_dac1_src); |
792 | 791 | ||
793 | static const struct snd_kcontrol_new rt5670_dac1l_mux = | 792 | static const struct snd_kcontrol_new rt5670_dac1l_mux = |
794 | SOC_DAPM_ENUM("DAC1 L source", rt5670_dac1l_enum); | 793 | SOC_DAPM_ENUM("DAC1 L source", rt5670_dac1l_enum); |
795 | 794 | ||
796 | static const SOC_ENUM_SINGLE_DECL( | 795 | static SOC_ENUM_SINGLE_DECL(rt5670_dac1r_enum, RT5670_AD_DA_MIXER, |
797 | rt5670_dac1r_enum, RT5670_AD_DA_MIXER, | ||
798 | RT5670_DAC1_R_SEL_SFT, rt5670_dac1_src); | 796 | RT5670_DAC1_R_SEL_SFT, rt5670_dac1_src); |
799 | 797 | ||
800 | static const struct snd_kcontrol_new rt5670_dac1r_mux = | 798 | static const struct snd_kcontrol_new rt5670_dac1r_mux = |
@@ -807,8 +805,7 @@ static const char * const rt5670_dac12_src[] = { | |||
807 | "Bass", "VAD_ADC", "IF4 DAC" | 805 | "Bass", "VAD_ADC", "IF4 DAC" |
808 | }; | 806 | }; |
809 | 807 | ||
810 | static const SOC_ENUM_SINGLE_DECL( | 808 | static SOC_ENUM_SINGLE_DECL(rt5670_dac2l_enum, RT5670_DAC_CTRL, |
811 | rt5670_dac2l_enum, RT5670_DAC_CTRL, | ||
812 | RT5670_DAC2_L_SEL_SFT, rt5670_dac12_src); | 809 | RT5670_DAC2_L_SEL_SFT, rt5670_dac12_src); |
813 | 810 | ||
814 | static const struct snd_kcontrol_new rt5670_dac_l2_mux = | 811 | static const struct snd_kcontrol_new rt5670_dac_l2_mux = |
@@ -818,8 +815,7 @@ static const char * const rt5670_dacr2_src[] = { | |||
818 | "IF1 DAC", "IF2 DAC", "IF3 DAC", "TxDC DAC", "TxDP ADC", "IF4 DAC" | 815 | "IF1 DAC", "IF2 DAC", "IF3 DAC", "TxDC DAC", "TxDP ADC", "IF4 DAC" |
819 | }; | 816 | }; |
820 | 817 | ||
821 | static const SOC_ENUM_SINGLE_DECL( | 818 | static SOC_ENUM_SINGLE_DECL(rt5670_dac2r_enum, RT5670_DAC_CTRL, |
822 | rt5670_dac2r_enum, RT5670_DAC_CTRL, | ||
823 | RT5670_DAC2_R_SEL_SFT, rt5670_dacr2_src); | 819 | RT5670_DAC2_R_SEL_SFT, rt5670_dacr2_src); |
824 | 820 | ||
825 | static const struct snd_kcontrol_new rt5670_dac_r2_mux = | 821 | static const struct snd_kcontrol_new rt5670_dac_r2_mux = |
@@ -831,8 +827,7 @@ static const char * const rt5670_rxdp_src[] = { | |||
831 | "Mono ADC Mixer L", "Mono ADC Mixer R", "DAC1" | 827 | "Mono ADC Mixer L", "Mono ADC Mixer R", "DAC1" |
832 | }; | 828 | }; |
833 | 829 | ||
834 | static const SOC_ENUM_SINGLE_DECL( | 830 | static SOC_ENUM_SINGLE_DECL(rt5670_rxdp_enum, RT5670_DSP_PATH1, |
835 | rt5670_rxdp_enum, RT5670_DSP_PATH1, | ||
836 | RT5670_RXDP_SEL_SFT, rt5670_rxdp_src); | 831 | RT5670_RXDP_SEL_SFT, rt5670_rxdp_src); |
837 | 832 | ||
838 | static const struct snd_kcontrol_new rt5670_rxdp_mux = | 833 | static const struct snd_kcontrol_new rt5670_rxdp_mux = |
@@ -843,15 +838,13 @@ static const char * const rt5670_dsp_bypass_src[] = { | |||
843 | "DSP", "Bypass" | 838 | "DSP", "Bypass" |
844 | }; | 839 | }; |
845 | 840 | ||
846 | static const SOC_ENUM_SINGLE_DECL( | 841 | static SOC_ENUM_SINGLE_DECL(rt5670_dsp_ul_enum, RT5670_DSP_PATH1, |
847 | rt5670_dsp_ul_enum, RT5670_DSP_PATH1, | ||
848 | RT5670_DSP_UL_SFT, rt5670_dsp_bypass_src); | 842 | RT5670_DSP_UL_SFT, rt5670_dsp_bypass_src); |
849 | 843 | ||
850 | static const struct snd_kcontrol_new rt5670_dsp_ul_mux = | 844 | static const struct snd_kcontrol_new rt5670_dsp_ul_mux = |
851 | SOC_DAPM_ENUM("DSP UL source", rt5670_dsp_ul_enum); | 845 | SOC_DAPM_ENUM("DSP UL source", rt5670_dsp_ul_enum); |
852 | 846 | ||
853 | static const SOC_ENUM_SINGLE_DECL( | 847 | static SOC_ENUM_SINGLE_DECL(rt5670_dsp_dl_enum, RT5670_DSP_PATH1, |
854 | rt5670_dsp_dl_enum, RT5670_DSP_PATH1, | ||
855 | RT5670_DSP_DL_SFT, rt5670_dsp_bypass_src); | 848 | RT5670_DSP_DL_SFT, rt5670_dsp_bypass_src); |
856 | 849 | ||
857 | static const struct snd_kcontrol_new rt5670_dsp_dl_mux = | 850 | static const struct snd_kcontrol_new rt5670_dsp_dl_mux = |
@@ -863,8 +856,7 @@ static const char * const rt5670_stereo2_adc_lr_src[] = { | |||
863 | "L", "LR" | 856 | "L", "LR" |
864 | }; | 857 | }; |
865 | 858 | ||
866 | static const SOC_ENUM_SINGLE_DECL( | 859 | static SOC_ENUM_SINGLE_DECL(rt5670_stereo2_adc_lr_enum, RT5670_STO2_ADC_MIXER, |
867 | rt5670_stereo2_adc_lr_enum, RT5670_STO2_ADC_MIXER, | ||
868 | RT5670_STO2_ADC_SRC_SFT, rt5670_stereo2_adc_lr_src); | 860 | RT5670_STO2_ADC_SRC_SFT, rt5670_stereo2_adc_lr_src); |
869 | 861 | ||
870 | static const struct snd_kcontrol_new rt5670_sto2_adc_lr_mux = | 862 | static const struct snd_kcontrol_new rt5670_sto2_adc_lr_mux = |
@@ -876,8 +868,7 @@ static const char * const rt5670_stereo_adc1_src[] = { | |||
876 | "DAC MIX", "ADC" | 868 | "DAC MIX", "ADC" |
877 | }; | 869 | }; |
878 | 870 | ||
879 | static const SOC_ENUM_SINGLE_DECL( | 871 | static SOC_ENUM_SINGLE_DECL(rt5670_stereo1_adc1_enum, RT5670_STO1_ADC_MIXER, |
880 | rt5670_stereo1_adc1_enum, RT5670_STO1_ADC_MIXER, | ||
881 | RT5670_ADC_1_SRC_SFT, rt5670_stereo_adc1_src); | 872 | RT5670_ADC_1_SRC_SFT, rt5670_stereo_adc1_src); |
882 | 873 | ||
883 | static const struct snd_kcontrol_new rt5670_sto_adc_l1_mux = | 874 | static const struct snd_kcontrol_new rt5670_sto_adc_l1_mux = |
@@ -886,8 +877,7 @@ static const struct snd_kcontrol_new rt5670_sto_adc_l1_mux = | |||
886 | static const struct snd_kcontrol_new rt5670_sto_adc_r1_mux = | 877 | static const struct snd_kcontrol_new rt5670_sto_adc_r1_mux = |
887 | SOC_DAPM_ENUM("Stereo1 ADC R1 source", rt5670_stereo1_adc1_enum); | 878 | SOC_DAPM_ENUM("Stereo1 ADC R1 source", rt5670_stereo1_adc1_enum); |
888 | 879 | ||
889 | static const SOC_ENUM_SINGLE_DECL( | 880 | static SOC_ENUM_SINGLE_DECL(rt5670_stereo2_adc1_enum, RT5670_STO2_ADC_MIXER, |
890 | rt5670_stereo2_adc1_enum, RT5670_STO2_ADC_MIXER, | ||
891 | RT5670_ADC_1_SRC_SFT, rt5670_stereo_adc1_src); | 881 | RT5670_ADC_1_SRC_SFT, rt5670_stereo_adc1_src); |
892 | 882 | ||
893 | static const struct snd_kcontrol_new rt5670_sto2_adc_l1_mux = | 883 | static const struct snd_kcontrol_new rt5670_sto2_adc_l1_mux = |
@@ -901,8 +891,7 @@ static const char * const rt5670_stereo_adc2_src[] = { | |||
901 | "DAC MIX", "DMIC" | 891 | "DAC MIX", "DMIC" |
902 | }; | 892 | }; |
903 | 893 | ||
904 | static const SOC_ENUM_SINGLE_DECL( | 894 | static SOC_ENUM_SINGLE_DECL(rt5670_stereo1_adc2_enum, RT5670_STO1_ADC_MIXER, |
905 | rt5670_stereo1_adc2_enum, RT5670_STO1_ADC_MIXER, | ||
906 | RT5670_ADC_2_SRC_SFT, rt5670_stereo_adc2_src); | 895 | RT5670_ADC_2_SRC_SFT, rt5670_stereo_adc2_src); |
907 | 896 | ||
908 | static const struct snd_kcontrol_new rt5670_sto_adc_l2_mux = | 897 | static const struct snd_kcontrol_new rt5670_sto_adc_l2_mux = |
@@ -911,8 +900,7 @@ static const struct snd_kcontrol_new rt5670_sto_adc_l2_mux = | |||
911 | static const struct snd_kcontrol_new rt5670_sto_adc_r2_mux = | 900 | static const struct snd_kcontrol_new rt5670_sto_adc_r2_mux = |
912 | SOC_DAPM_ENUM("Stereo1 ADC R2 source", rt5670_stereo1_adc2_enum); | 901 | SOC_DAPM_ENUM("Stereo1 ADC R2 source", rt5670_stereo1_adc2_enum); |
913 | 902 | ||
914 | static const SOC_ENUM_SINGLE_DECL( | 903 | static SOC_ENUM_SINGLE_DECL(rt5670_stereo2_adc2_enum, RT5670_STO2_ADC_MIXER, |
915 | rt5670_stereo2_adc2_enum, RT5670_STO2_ADC_MIXER, | ||
916 | RT5670_ADC_2_SRC_SFT, rt5670_stereo_adc2_src); | 904 | RT5670_ADC_2_SRC_SFT, rt5670_stereo_adc2_src); |
917 | 905 | ||
918 | static const struct snd_kcontrol_new rt5670_sto2_adc_l2_mux = | 906 | static const struct snd_kcontrol_new rt5670_sto2_adc_l2_mux = |
@@ -926,15 +914,13 @@ static const char * const rt5670_stereo_adc_src[] = { | |||
926 | "ADC1L ADC2R", "ADC3" | 914 | "ADC1L ADC2R", "ADC3" |
927 | }; | 915 | }; |
928 | 916 | ||
929 | static const SOC_ENUM_SINGLE_DECL( | 917 | static SOC_ENUM_SINGLE_DECL(rt5670_stereo1_adc_enum, RT5670_STO1_ADC_MIXER, |
930 | rt5670_stereo1_adc_enum, RT5670_STO1_ADC_MIXER, | ||
931 | RT5670_ADC_SRC_SFT, rt5670_stereo_adc_src); | 918 | RT5670_ADC_SRC_SFT, rt5670_stereo_adc_src); |
932 | 919 | ||
933 | static const struct snd_kcontrol_new rt5670_sto_adc_mux = | 920 | static const struct snd_kcontrol_new rt5670_sto_adc_mux = |
934 | SOC_DAPM_ENUM("Stereo1 ADC source", rt5670_stereo1_adc_enum); | 921 | SOC_DAPM_ENUM("Stereo1 ADC source", rt5670_stereo1_adc_enum); |
935 | 922 | ||
936 | static const SOC_ENUM_SINGLE_DECL( | 923 | static SOC_ENUM_SINGLE_DECL(rt5670_stereo2_adc_enum, RT5670_STO2_ADC_MIXER, |
937 | rt5670_stereo2_adc_enum, RT5670_STO2_ADC_MIXER, | ||
938 | RT5670_ADC_SRC_SFT, rt5670_stereo_adc_src); | 924 | RT5670_ADC_SRC_SFT, rt5670_stereo_adc_src); |
939 | 925 | ||
940 | static const struct snd_kcontrol_new rt5670_sto2_adc_mux = | 926 | static const struct snd_kcontrol_new rt5670_sto2_adc_mux = |
@@ -945,15 +931,13 @@ static const char * const rt5670_stereo_dmic_src[] = { | |||
945 | "DMIC1", "DMIC2", "DMIC3" | 931 | "DMIC1", "DMIC2", "DMIC3" |
946 | }; | 932 | }; |
947 | 933 | ||
948 | static const SOC_ENUM_SINGLE_DECL( | 934 | static SOC_ENUM_SINGLE_DECL(rt5670_stereo1_dmic_enum, RT5670_STO1_ADC_MIXER, |
949 | rt5670_stereo1_dmic_enum, RT5670_STO1_ADC_MIXER, | ||
950 | RT5670_DMIC_SRC_SFT, rt5670_stereo_dmic_src); | 935 | RT5670_DMIC_SRC_SFT, rt5670_stereo_dmic_src); |
951 | 936 | ||
952 | static const struct snd_kcontrol_new rt5670_sto1_dmic_mux = | 937 | static const struct snd_kcontrol_new rt5670_sto1_dmic_mux = |
953 | SOC_DAPM_ENUM("Stereo1 DMIC source", rt5670_stereo1_dmic_enum); | 938 | SOC_DAPM_ENUM("Stereo1 DMIC source", rt5670_stereo1_dmic_enum); |
954 | 939 | ||
955 | static const SOC_ENUM_SINGLE_DECL( | 940 | static SOC_ENUM_SINGLE_DECL(rt5670_stereo2_dmic_enum, RT5670_STO2_ADC_MIXER, |
956 | rt5670_stereo2_dmic_enum, RT5670_STO2_ADC_MIXER, | ||
957 | RT5670_DMIC_SRC_SFT, rt5670_stereo_dmic_src); | 941 | RT5670_DMIC_SRC_SFT, rt5670_stereo_dmic_src); |
958 | 942 | ||
959 | static const struct snd_kcontrol_new rt5670_sto2_dmic_mux = | 943 | static const struct snd_kcontrol_new rt5670_sto2_dmic_mux = |
@@ -964,8 +948,7 @@ static const char * const rt5670_stereo_dmic3_src[] = { | |||
964 | "DMIC3", "PDM ADC" | 948 | "DMIC3", "PDM ADC" |
965 | }; | 949 | }; |
966 | 950 | ||
967 | static const SOC_ENUM_SINGLE_DECL( | 951 | static SOC_ENUM_SINGLE_DECL(rt5670_stereo_dmic3_enum, RT5670_STO1_ADC_MIXER, |
968 | rt5670_stereo_dmic3_enum, RT5670_STO1_ADC_MIXER, | ||
969 | RT5670_DMIC3_SRC_SFT, rt5670_stereo_dmic3_src); | 952 | RT5670_DMIC3_SRC_SFT, rt5670_stereo_dmic3_src); |
970 | 953 | ||
971 | static const struct snd_kcontrol_new rt5670_sto_dmic3_mux = | 954 | static const struct snd_kcontrol_new rt5670_sto_dmic3_mux = |
@@ -977,8 +960,7 @@ static const char * const rt5670_mono_adc_l1_src[] = { | |||
977 | "Mono DAC MIXL", "ADC1" | 960 | "Mono DAC MIXL", "ADC1" |
978 | }; | 961 | }; |
979 | 962 | ||
980 | static const SOC_ENUM_SINGLE_DECL( | 963 | static SOC_ENUM_SINGLE_DECL(rt5670_mono_adc_l1_enum, RT5670_MONO_ADC_MIXER, |
981 | rt5670_mono_adc_l1_enum, RT5670_MONO_ADC_MIXER, | ||
982 | RT5670_MONO_ADC_L1_SRC_SFT, rt5670_mono_adc_l1_src); | 964 | RT5670_MONO_ADC_L1_SRC_SFT, rt5670_mono_adc_l1_src); |
983 | 965 | ||
984 | static const struct snd_kcontrol_new rt5670_mono_adc_l1_mux = | 966 | static const struct snd_kcontrol_new rt5670_mono_adc_l1_mux = |
@@ -988,8 +970,7 @@ static const char * const rt5670_mono_adc_l2_src[] = { | |||
988 | "Mono DAC MIXL", "DMIC" | 970 | "Mono DAC MIXL", "DMIC" |
989 | }; | 971 | }; |
990 | 972 | ||
991 | static const SOC_ENUM_SINGLE_DECL( | 973 | static SOC_ENUM_SINGLE_DECL(rt5670_mono_adc_l2_enum, RT5670_MONO_ADC_MIXER, |
992 | rt5670_mono_adc_l2_enum, RT5670_MONO_ADC_MIXER, | ||
993 | RT5670_MONO_ADC_L2_SRC_SFT, rt5670_mono_adc_l2_src); | 974 | RT5670_MONO_ADC_L2_SRC_SFT, rt5670_mono_adc_l2_src); |
994 | 975 | ||
995 | static const struct snd_kcontrol_new rt5670_mono_adc_l2_mux = | 976 | static const struct snd_kcontrol_new rt5670_mono_adc_l2_mux = |
@@ -1000,15 +981,13 @@ static const char * const rt5670_mono_dmic_src[] = { | |||
1000 | "DMIC1", "DMIC2", "DMIC3" | 981 | "DMIC1", "DMIC2", "DMIC3" |
1001 | }; | 982 | }; |
1002 | 983 | ||
1003 | static const SOC_ENUM_SINGLE_DECL( | 984 | static SOC_ENUM_SINGLE_DECL(rt5670_mono_dmic_l_enum, RT5670_MONO_ADC_MIXER, |
1004 | rt5670_mono_dmic_l_enum, RT5670_MONO_ADC_MIXER, | ||
1005 | RT5670_MONO_DMIC_L_SRC_SFT, rt5670_mono_dmic_src); | 985 | RT5670_MONO_DMIC_L_SRC_SFT, rt5670_mono_dmic_src); |
1006 | 986 | ||
1007 | static const struct snd_kcontrol_new rt5670_mono_dmic_l_mux = | 987 | static const struct snd_kcontrol_new rt5670_mono_dmic_l_mux = |
1008 | SOC_DAPM_ENUM("Mono DMIC left source", rt5670_mono_dmic_l_enum); | 988 | SOC_DAPM_ENUM("Mono DMIC left source", rt5670_mono_dmic_l_enum); |
1009 | /* MX-28 [1:0] */ | 989 | /* MX-28 [1:0] */ |
1010 | static const SOC_ENUM_SINGLE_DECL( | 990 | static SOC_ENUM_SINGLE_DECL(rt5670_mono_dmic_r_enum, RT5670_MONO_ADC_MIXER, |
1011 | rt5670_mono_dmic_r_enum, RT5670_MONO_ADC_MIXER, | ||
1012 | RT5670_MONO_DMIC_R_SRC_SFT, rt5670_mono_dmic_src); | 991 | RT5670_MONO_DMIC_R_SRC_SFT, rt5670_mono_dmic_src); |
1013 | 992 | ||
1014 | static const struct snd_kcontrol_new rt5670_mono_dmic_r_mux = | 993 | static const struct snd_kcontrol_new rt5670_mono_dmic_r_mux = |
@@ -1018,8 +997,7 @@ static const char * const rt5670_mono_adc_r1_src[] = { | |||
1018 | "Mono DAC MIXR", "ADC2" | 997 | "Mono DAC MIXR", "ADC2" |
1019 | }; | 998 | }; |
1020 | 999 | ||
1021 | static const SOC_ENUM_SINGLE_DECL( | 1000 | static SOC_ENUM_SINGLE_DECL(rt5670_mono_adc_r1_enum, RT5670_MONO_ADC_MIXER, |
1022 | rt5670_mono_adc_r1_enum, RT5670_MONO_ADC_MIXER, | ||
1023 | RT5670_MONO_ADC_R1_SRC_SFT, rt5670_mono_adc_r1_src); | 1001 | RT5670_MONO_ADC_R1_SRC_SFT, rt5670_mono_adc_r1_src); |
1024 | 1002 | ||
1025 | static const struct snd_kcontrol_new rt5670_mono_adc_r1_mux = | 1003 | static const struct snd_kcontrol_new rt5670_mono_adc_r1_mux = |
@@ -1029,8 +1007,7 @@ static const char * const rt5670_mono_adc_r2_src[] = { | |||
1029 | "Mono DAC MIXR", "DMIC" | 1007 | "Mono DAC MIXR", "DMIC" |
1030 | }; | 1008 | }; |
1031 | 1009 | ||
1032 | static const SOC_ENUM_SINGLE_DECL( | 1010 | static SOC_ENUM_SINGLE_DECL(rt5670_mono_adc_r2_enum, RT5670_MONO_ADC_MIXER, |
1033 | rt5670_mono_adc_r2_enum, RT5670_MONO_ADC_MIXER, | ||
1034 | RT5670_MONO_ADC_R2_SRC_SFT, rt5670_mono_adc_r2_src); | 1011 | RT5670_MONO_ADC_R2_SRC_SFT, rt5670_mono_adc_r2_src); |
1035 | 1012 | ||
1036 | static const struct snd_kcontrol_new rt5670_mono_adc_r2_mux = | 1013 | static const struct snd_kcontrol_new rt5670_mono_adc_r2_mux = |
@@ -1041,8 +1018,7 @@ static const char * const rt5670_txdp_slot_src[] = { | |||
1041 | "Slot 0-1", "Slot 2-3", "Slot 4-5", "Slot 6-7" | 1018 | "Slot 0-1", "Slot 2-3", "Slot 4-5", "Slot 6-7" |
1042 | }; | 1019 | }; |
1043 | 1020 | ||
1044 | static const SOC_ENUM_SINGLE_DECL( | 1021 | static SOC_ENUM_SINGLE_DECL(rt5670_txdp_slot_enum, RT5670_DSP_PATH1, |
1045 | rt5670_txdp_slot_enum, RT5670_DSP_PATH1, | ||
1046 | RT5670_TXDP_SLOT_SEL_SFT, rt5670_txdp_slot_src); | 1022 | RT5670_TXDP_SLOT_SEL_SFT, rt5670_txdp_slot_src); |
1047 | 1023 | ||
1048 | static const struct snd_kcontrol_new rt5670_txdp_slot_mux = | 1024 | static const struct snd_kcontrol_new rt5670_txdp_slot_mux = |
@@ -1053,8 +1029,7 @@ static const char * const rt5670_if1_adc2_in_src[] = { | |||
1053 | "IF_ADC2", "VAD_ADC" | 1029 | "IF_ADC2", "VAD_ADC" |
1054 | }; | 1030 | }; |
1055 | 1031 | ||
1056 | static const SOC_ENUM_SINGLE_DECL( | 1032 | static SOC_ENUM_SINGLE_DECL(rt5670_if1_adc2_in_enum, RT5670_DIG_INF1_DATA, |
1057 | rt5670_if1_adc2_in_enum, RT5670_DIG_INF1_DATA, | ||
1058 | RT5670_IF1_ADC2_IN_SFT, rt5670_if1_adc2_in_src); | 1033 | RT5670_IF1_ADC2_IN_SFT, rt5670_if1_adc2_in_src); |
1059 | 1034 | ||
1060 | static const struct snd_kcontrol_new rt5670_if1_adc2_in_mux = | 1035 | static const struct snd_kcontrol_new rt5670_if1_adc2_in_mux = |
@@ -1065,8 +1040,7 @@ static const char * const rt5670_if2_adc_in_src[] = { | |||
1065 | "IF_ADC1", "IF_ADC2", "IF_ADC3", "TxDC_DAC", "TxDP_ADC", "VAD_ADC" | 1040 | "IF_ADC1", "IF_ADC2", "IF_ADC3", "TxDC_DAC", "TxDP_ADC", "VAD_ADC" |
1066 | }; | 1041 | }; |
1067 | 1042 | ||
1068 | static const SOC_ENUM_SINGLE_DECL( | 1043 | static SOC_ENUM_SINGLE_DECL(rt5670_if2_adc_in_enum, RT5670_DIG_INF1_DATA, |
1069 | rt5670_if2_adc_in_enum, RT5670_DIG_INF1_DATA, | ||
1070 | RT5670_IF2_ADC_IN_SFT, rt5670_if2_adc_in_src); | 1044 | RT5670_IF2_ADC_IN_SFT, rt5670_if2_adc_in_src); |
1071 | 1045 | ||
1072 | static const struct snd_kcontrol_new rt5670_if2_adc_in_mux = | 1046 | static const struct snd_kcontrol_new rt5670_if2_adc_in_mux = |
@@ -1077,8 +1051,7 @@ static const char * const rt5670_if4_adc_in_src[] = { | |||
1077 | "IF_ADC1", "IF_ADC2", "IF_ADC3" | 1051 | "IF_ADC1", "IF_ADC2", "IF_ADC3" |
1078 | }; | 1052 | }; |
1079 | 1053 | ||
1080 | static const SOC_ENUM_SINGLE_DECL( | 1054 | static SOC_ENUM_SINGLE_DECL(rt5670_if4_adc_in_enum, RT5670_DIG_INF2_DATA, |
1081 | rt5670_if4_adc_in_enum, RT5670_DIG_INF2_DATA, | ||
1082 | RT5670_IF4_ADC_IN_SFT, rt5670_if4_adc_in_src); | 1055 | RT5670_IF4_ADC_IN_SFT, rt5670_if4_adc_in_src); |
1083 | 1056 | ||
1084 | static const struct snd_kcontrol_new rt5670_if4_adc_in_mux = | 1057 | static const struct snd_kcontrol_new rt5670_if4_adc_in_mux = |
@@ -1089,29 +1062,25 @@ static const char * const rt5670_pdm_src[] = { | |||
1089 | "Mono DAC", "Stereo DAC" | 1062 | "Mono DAC", "Stereo DAC" |
1090 | }; | 1063 | }; |
1091 | 1064 | ||
1092 | static const SOC_ENUM_SINGLE_DECL( | 1065 | static SOC_ENUM_SINGLE_DECL(rt5670_pdm1_l_enum, RT5670_PDM_OUT_CTRL, |
1093 | rt5670_pdm1_l_enum, RT5670_PDM_OUT_CTRL, | ||
1094 | RT5670_PDM1_L_SFT, rt5670_pdm_src); | 1066 | RT5670_PDM1_L_SFT, rt5670_pdm_src); |
1095 | 1067 | ||
1096 | static const struct snd_kcontrol_new rt5670_pdm1_l_mux = | 1068 | static const struct snd_kcontrol_new rt5670_pdm1_l_mux = |
1097 | SOC_DAPM_ENUM("PDM1 L source", rt5670_pdm1_l_enum); | 1069 | SOC_DAPM_ENUM("PDM1 L source", rt5670_pdm1_l_enum); |
1098 | 1070 | ||
1099 | static const SOC_ENUM_SINGLE_DECL( | 1071 | static SOC_ENUM_SINGLE_DECL(rt5670_pdm1_r_enum, RT5670_PDM_OUT_CTRL, |
1100 | rt5670_pdm1_r_enum, RT5670_PDM_OUT_CTRL, | ||
1101 | RT5670_PDM1_R_SFT, rt5670_pdm_src); | 1072 | RT5670_PDM1_R_SFT, rt5670_pdm_src); |
1102 | 1073 | ||
1103 | static const struct snd_kcontrol_new rt5670_pdm1_r_mux = | 1074 | static const struct snd_kcontrol_new rt5670_pdm1_r_mux = |
1104 | SOC_DAPM_ENUM("PDM1 R source", rt5670_pdm1_r_enum); | 1075 | SOC_DAPM_ENUM("PDM1 R source", rt5670_pdm1_r_enum); |
1105 | 1076 | ||
1106 | static const SOC_ENUM_SINGLE_DECL( | 1077 | static SOC_ENUM_SINGLE_DECL(rt5670_pdm2_l_enum, RT5670_PDM_OUT_CTRL, |
1107 | rt5670_pdm2_l_enum, RT5670_PDM_OUT_CTRL, | ||
1108 | RT5670_PDM2_L_SFT, rt5670_pdm_src); | 1078 | RT5670_PDM2_L_SFT, rt5670_pdm_src); |
1109 | 1079 | ||
1110 | static const struct snd_kcontrol_new rt5670_pdm2_l_mux = | 1080 | static const struct snd_kcontrol_new rt5670_pdm2_l_mux = |
1111 | SOC_DAPM_ENUM("PDM2 L source", rt5670_pdm2_l_enum); | 1081 | SOC_DAPM_ENUM("PDM2 L source", rt5670_pdm2_l_enum); |
1112 | 1082 | ||
1113 | static const SOC_ENUM_SINGLE_DECL( | 1083 | static SOC_ENUM_SINGLE_DECL(rt5670_pdm2_r_enum, RT5670_PDM_OUT_CTRL, |
1114 | rt5670_pdm2_r_enum, RT5670_PDM_OUT_CTRL, | ||
1115 | RT5670_PDM2_R_SFT, rt5670_pdm_src); | 1084 | RT5670_PDM2_R_SFT, rt5670_pdm_src); |
1116 | 1085 | ||
1117 | static const struct snd_kcontrol_new rt5670_pdm2_r_mux = | 1086 | static const struct snd_kcontrol_new rt5670_pdm2_r_mux = |
@@ -1122,8 +1091,7 @@ static const char * const rt5670_if1_adc1_in1_src[] = { | |||
1122 | "IF_ADC1", "IF1_ADC3" | 1091 | "IF_ADC1", "IF1_ADC3" |
1123 | }; | 1092 | }; |
1124 | 1093 | ||
1125 | static const SOC_ENUM_SINGLE_DECL( | 1094 | static SOC_ENUM_SINGLE_DECL(rt5670_if1_adc1_in1_enum, RT5670_DIG_MISC, |
1126 | rt5670_if1_adc1_in1_enum, RT5670_DIG_MISC, | ||
1127 | RT5670_IF1_ADC1_IN1_SFT, rt5670_if1_adc1_in1_src); | 1095 | RT5670_IF1_ADC1_IN1_SFT, rt5670_if1_adc1_in1_src); |
1128 | 1096 | ||
1129 | static const struct snd_kcontrol_new rt5670_if1_adc1_in1_mux = | 1097 | static const struct snd_kcontrol_new rt5670_if1_adc1_in1_mux = |
@@ -1134,8 +1102,7 @@ static const char * const rt5670_if1_adc1_in2_src[] = { | |||
1134 | "IF1_ADC1_IN1", "IF1_ADC4" | 1102 | "IF1_ADC1_IN1", "IF1_ADC4" |
1135 | }; | 1103 | }; |
1136 | 1104 | ||
1137 | static const SOC_ENUM_SINGLE_DECL( | 1105 | static SOC_ENUM_SINGLE_DECL(rt5670_if1_adc1_in2_enum, RT5670_DIG_MISC, |
1138 | rt5670_if1_adc1_in2_enum, RT5670_DIG_MISC, | ||
1139 | RT5670_IF1_ADC1_IN2_SFT, rt5670_if1_adc1_in2_src); | 1106 | RT5670_IF1_ADC1_IN2_SFT, rt5670_if1_adc1_in2_src); |
1140 | 1107 | ||
1141 | static const struct snd_kcontrol_new rt5670_if1_adc1_in2_mux = | 1108 | static const struct snd_kcontrol_new rt5670_if1_adc1_in2_mux = |
@@ -1146,8 +1113,7 @@ static const char * const rt5670_if1_adc2_in1_src[] = { | |||
1146 | "IF1_ADC2_IN", "IF1_ADC4" | 1113 | "IF1_ADC2_IN", "IF1_ADC4" |
1147 | }; | 1114 | }; |
1148 | 1115 | ||
1149 | static const SOC_ENUM_SINGLE_DECL( | 1116 | static SOC_ENUM_SINGLE_DECL(rt5670_if1_adc2_in1_enum, RT5670_DIG_MISC, |
1150 | rt5670_if1_adc2_in1_enum, RT5670_DIG_MISC, | ||
1151 | RT5670_IF1_ADC2_IN1_SFT, rt5670_if1_adc2_in1_src); | 1117 | RT5670_IF1_ADC2_IN1_SFT, rt5670_if1_adc2_in1_src); |
1152 | 1118 | ||
1153 | static const struct snd_kcontrol_new rt5670_if1_adc2_in1_mux = | 1119 | static const struct snd_kcontrol_new rt5670_if1_adc2_in1_mux = |
@@ -1158,8 +1124,7 @@ static const char * const rt5670_vad_adc_src[] = { | |||
1158 | "Sto1 ADC L", "Mono ADC L", "Mono ADC R", "Sto2 ADC L" | 1124 | "Sto1 ADC L", "Mono ADC L", "Mono ADC R", "Sto2 ADC L" |
1159 | }; | 1125 | }; |
1160 | 1126 | ||
1161 | static const SOC_ENUM_SINGLE_DECL( | 1127 | static SOC_ENUM_SINGLE_DECL(rt5670_vad_adc_enum, RT5670_VAD_CTRL4, |
1162 | rt5670_vad_adc_enum, RT5670_VAD_CTRL4, | ||
1163 | RT5670_VAD_SEL_SFT, rt5670_vad_adc_src); | 1128 | RT5670_VAD_SEL_SFT, rt5670_vad_adc_src); |
1164 | 1129 | ||
1165 | static const struct snd_kcontrol_new rt5670_vad_adc_mux = | 1130 | static const struct snd_kcontrol_new rt5670_vad_adc_mux = |