aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-08-01 12:30:38 -0400
committerMark Brown <broonie@linaro.org>2014-08-01 14:17:05 -0400
commit019575726e6d93933ed6823475d09b932be2a5fc (patch)
tree134784ccd06a2e4d4d4e8b640c879548b9b9bf48
parentff62b95894b88622dd6373730d57a8a7e126f687 (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.c109
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
427static const SOC_ENUM_SINGLE_DECL(rt5670_if2_dac_enum, RT5670_DIG_INF1_DATA, 427static 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
430static const SOC_ENUM_SINGLE_DECL(rt5670_if2_adc_enum, RT5670_DIG_INF1_DATA, 430static 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
433static const struct snd_kcontrol_new rt5670_snd_controls[] = { 433static 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
789static const SOC_ENUM_SINGLE_DECL( 789static 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
793static const struct snd_kcontrol_new rt5670_dac1l_mux = 792static 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
796static const SOC_ENUM_SINGLE_DECL( 795static 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
800static const struct snd_kcontrol_new rt5670_dac1r_mux = 798static 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
810static const SOC_ENUM_SINGLE_DECL( 808static 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
814static const struct snd_kcontrol_new rt5670_dac_l2_mux = 811static 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
821static const SOC_ENUM_SINGLE_DECL( 818static 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
825static const struct snd_kcontrol_new rt5670_dac_r2_mux = 821static 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
834static const SOC_ENUM_SINGLE_DECL( 830static 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
838static const struct snd_kcontrol_new rt5670_rxdp_mux = 833static 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
846static const SOC_ENUM_SINGLE_DECL( 841static 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
850static const struct snd_kcontrol_new rt5670_dsp_ul_mux = 844static 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
853static const SOC_ENUM_SINGLE_DECL( 847static 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
857static const struct snd_kcontrol_new rt5670_dsp_dl_mux = 850static 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
866static const SOC_ENUM_SINGLE_DECL( 859static 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
870static const struct snd_kcontrol_new rt5670_sto2_adc_lr_mux = 862static 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
879static const SOC_ENUM_SINGLE_DECL( 871static 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
883static const struct snd_kcontrol_new rt5670_sto_adc_l1_mux = 874static 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 =
886static const struct snd_kcontrol_new rt5670_sto_adc_r1_mux = 877static 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
889static const SOC_ENUM_SINGLE_DECL( 880static 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
893static const struct snd_kcontrol_new rt5670_sto2_adc_l1_mux = 883static 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
904static const SOC_ENUM_SINGLE_DECL( 894static 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
908static const struct snd_kcontrol_new rt5670_sto_adc_l2_mux = 897static 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 =
911static const struct snd_kcontrol_new rt5670_sto_adc_r2_mux = 900static 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
914static const SOC_ENUM_SINGLE_DECL( 903static 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
918static const struct snd_kcontrol_new rt5670_sto2_adc_l2_mux = 906static 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
929static const SOC_ENUM_SINGLE_DECL( 917static 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
933static const struct snd_kcontrol_new rt5670_sto_adc_mux = 920static 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
936static const SOC_ENUM_SINGLE_DECL( 923static 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
940static const struct snd_kcontrol_new rt5670_sto2_adc_mux = 926static 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
948static const SOC_ENUM_SINGLE_DECL( 934static 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
952static const struct snd_kcontrol_new rt5670_sto1_dmic_mux = 937static 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
955static const SOC_ENUM_SINGLE_DECL( 940static 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
959static const struct snd_kcontrol_new rt5670_sto2_dmic_mux = 943static 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
967static const SOC_ENUM_SINGLE_DECL( 951static 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
971static const struct snd_kcontrol_new rt5670_sto_dmic3_mux = 954static 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
980static const SOC_ENUM_SINGLE_DECL( 963static 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
984static const struct snd_kcontrol_new rt5670_mono_adc_l1_mux = 966static 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
991static const SOC_ENUM_SINGLE_DECL( 973static 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
995static const struct snd_kcontrol_new rt5670_mono_adc_l2_mux = 976static 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
1003static const SOC_ENUM_SINGLE_DECL( 984static 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
1007static const struct snd_kcontrol_new rt5670_mono_dmic_l_mux = 987static 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] */
1010static const SOC_ENUM_SINGLE_DECL( 990static 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
1014static const struct snd_kcontrol_new rt5670_mono_dmic_r_mux = 993static 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
1021static const SOC_ENUM_SINGLE_DECL( 1000static 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
1025static const struct snd_kcontrol_new rt5670_mono_adc_r1_mux = 1003static 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
1032static const SOC_ENUM_SINGLE_DECL( 1010static 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
1036static const struct snd_kcontrol_new rt5670_mono_adc_r2_mux = 1013static 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
1044static const SOC_ENUM_SINGLE_DECL( 1021static 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
1048static const struct snd_kcontrol_new rt5670_txdp_slot_mux = 1024static 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
1056static const SOC_ENUM_SINGLE_DECL( 1032static 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
1060static const struct snd_kcontrol_new rt5670_if1_adc2_in_mux = 1035static 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
1068static const SOC_ENUM_SINGLE_DECL( 1043static 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
1072static const struct snd_kcontrol_new rt5670_if2_adc_in_mux = 1046static 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
1080static const SOC_ENUM_SINGLE_DECL( 1054static 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
1084static const struct snd_kcontrol_new rt5670_if4_adc_in_mux = 1057static 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
1092static const SOC_ENUM_SINGLE_DECL( 1065static 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
1096static const struct snd_kcontrol_new rt5670_pdm1_l_mux = 1068static 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
1099static const SOC_ENUM_SINGLE_DECL( 1071static 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
1103static const struct snd_kcontrol_new rt5670_pdm1_r_mux = 1074static 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
1106static const SOC_ENUM_SINGLE_DECL( 1077static 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
1110static const struct snd_kcontrol_new rt5670_pdm2_l_mux = 1080static 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
1113static const SOC_ENUM_SINGLE_DECL( 1083static 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
1117static const struct snd_kcontrol_new rt5670_pdm2_r_mux = 1086static 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
1125static const SOC_ENUM_SINGLE_DECL( 1094static 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
1129static const struct snd_kcontrol_new rt5670_if1_adc1_in1_mux = 1097static 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
1137static const SOC_ENUM_SINGLE_DECL( 1105static 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
1141static const struct snd_kcontrol_new rt5670_if1_adc1_in2_mux = 1108static 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
1149static const SOC_ENUM_SINGLE_DECL( 1116static 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
1153static const struct snd_kcontrol_new rt5670_if1_adc2_in1_mux = 1119static 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
1161static const SOC_ENUM_SINGLE_DECL( 1127static 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
1165static const struct snd_kcontrol_new rt5670_vad_adc_mux = 1130static const struct snd_kcontrol_new rt5670_vad_adc_mux =