++ #include <linux/mfd/arizona/registers.h>
++
++ #include "arizona.h"
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #include "wm_adsp.h"
+ #include "wm5110.h"
+
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #define WM5110_NUM_ADSP 4
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ struct wm5110_priv {
+ struct arizona_priv core;
+ struct arizona_fll fll[2];
++ };
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ static const struct wm_adsp_region wm5110_dsp1_regions[] = {
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_PM, .base = 0x100000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_ZM, .base = 0x180000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_XM, .base = 0x190000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_YM, .base = 0x1a8000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ };
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ static const struct wm_adsp_region wm5110_dsp2_regions[] = {
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_PM, .base = 0x200000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_ZM, .base = 0x280000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_XM, .base = 0x290000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_YM, .base = 0x2a8000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ };
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ static const struct wm_adsp_region wm5110_dsp3_regions[] = {
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_PM, .base = 0x300000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_ZM, .base = 0x380000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_XM, .base = 0x390000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_YM, .base = 0x3a8000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ };
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ static const struct wm_adsp_region wm5110_dsp4_regions[] = {
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_PM, .base = 0x400000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_ZM, .base = 0x480000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_XM, .base = 0x490000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { .type = WMFW_ADSP2_YM, .base = 0x4a8000 },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ };
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ static const struct wm_adsp_region *wm5110_dsp_regions[] = {
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110_dsp1_regions,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110_dsp2_regions,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110_dsp3_regions,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110_dsp4_regions,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ };
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ + static const struct reg_default wm5110_sysclk_revd_patch[] = {
+ + { 0x3093, 0x1001 },
+ + { 0x30E3, 0x1301 },
++ + case SND_SOC_DAPM_POST_PMU:
++ + if (patch)
++ + for (i = 0; i < patch_size; i++)
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ regmap_write_async(regmap, patch[i].reg,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ patch[i].def);
+ + break;
+ +
+ + default:
++ SOC_SINGLE_RANGE_TLV("IN3R Volume", ARIZONA_IN3R_CONTROL,
++ ARIZONA_IN3R_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv),
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_ENUM("IN HPF Cutoff Frequency", arizona_in_hpf_cut_enum),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_SINGLE("IN1L HPF Switch", ARIZONA_IN1L_CONTROL,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_IN1L_HPF_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_SINGLE("IN1R HPF Switch", ARIZONA_IN1R_CONTROL,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_IN1R_HPF_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_SINGLE("IN2L HPF Switch", ARIZONA_IN2L_CONTROL,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_IN2L_HPF_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_SINGLE("IN2R HPF Switch", ARIZONA_IN2R_CONTROL,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_IN2R_HPF_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_SINGLE("IN3L HPF Switch", ARIZONA_IN3L_CONTROL,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_IN3L_HPF_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_SINGLE("IN3R HPF Switch", ARIZONA_IN3R_CONTROL,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_IN3R_HPF_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_SINGLE("IN4L HPF Switch", ARIZONA_IN4L_CONTROL,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_IN4L_HPF_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_SINGLE("IN4R HPF Switch", ARIZONA_IN4R_CONTROL,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_IN4R_HPF_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ SOC_SINGLE_TLV("IN1L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_1L,
+ ARIZONA_IN1L_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv),
+ SOC_SINGLE_TLV("IN1R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_1R,
++ SOC_ENUM("LHPF3 Mode", arizona_lhpf3_mode),
++ SOC_ENUM("LHPF4 Mode", arizona_lhpf4_mode),
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_VALUE_ENUM("ISRC1 FSL", arizona_isrc_fsl[0]),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_VALUE_ENUM("ISRC2 FSL", arizona_isrc_fsl[1]),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_VALUE_ENUM("ISRC3 FSL", arizona_isrc_fsl[2]),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_VALUE_ENUM("ISRC1 FSH", arizona_isrc_fsh[0]),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_VALUE_ENUM("ISRC2 FSH", arizona_isrc_fsh[1]),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_VALUE_ENUM("ISRC3 FSH", arizona_isrc_fsh[2]),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_VALUE_ENUM("ASRC RATE 1", arizona_asrc_rate1),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ARIZONA_MIXER_CONTROLS("DSP1L", ARIZONA_DSP1LMIX_INPUT_1_SOURCE),
+ ARIZONA_MIXER_CONTROLS("DSP1R", ARIZONA_DSP1RMIX_INPUT_1_SOURCE),
+ ARIZONA_MIXER_CONTROLS("DSP2L", ARIZONA_DSP2LMIX_INPUT_1_SOURCE),
++ SOC_DOUBLE("SPKDAT2 Switch", ARIZONA_PDM_SPK2_CTRL_1, ARIZONA_SPK2L_MUTE_SHIFT,
++ ARIZONA_SPK2R_MUTE_SHIFT, 1, 1),
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_DOUBLE("HPOUT1 DRE Switch", ARIZONA_DRE_ENABLE,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DRE1L_ENA_SHIFT, ARIZONA_DRE1R_ENA_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_DOUBLE("HPOUT2 DRE Switch", ARIZONA_DRE_ENABLE,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DRE2L_ENA_SHIFT, ARIZONA_DRE2R_ENA_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SOC_DOUBLE("HPOUT3 DRE Switch", ARIZONA_DRE_ENABLE,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DRE3L_ENA_SHIFT, ARIZONA_DRE3R_ENA_SHIFT, 1, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ SOC_ENUM("Output Ramp Up", arizona_out_vi_ramp),
+ SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp),
+
++
++ ARIZONA_MIXER_CONTROLS("AIF2TX1", ARIZONA_AIF2TX1MIX_INPUT_1_SOURCE),
++ ARIZONA_MIXER_CONTROLS("AIF2TX2", ARIZONA_AIF2TX2MIX_INPUT_1_SOURCE),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_CONTROLS("AIF2TX3", ARIZONA_AIF2TX3MIX_INPUT_1_SOURCE),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_CONTROLS("AIF2TX4", ARIZONA_AIF2TX4MIX_INPUT_1_SOURCE),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_CONTROLS("AIF2TX5", ARIZONA_AIF2TX5MIX_INPUT_1_SOURCE),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_CONTROLS("AIF2TX6", ARIZONA_AIF2TX6MIX_INPUT_1_SOURCE),
+
+ ARIZONA_MIXER_CONTROLS("AIF3TX1", ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE),
+ ARIZONA_MIXER_CONTROLS("AIF3TX2", ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE),
++ ARIZONA_MIXER_ENUMS(LHPF3, ARIZONA_HPLP3MIX_INPUT_1_SOURCE);
++ ARIZONA_MIXER_ENUMS(LHPF4, ARIZONA_HPLP4MIX_INPUT_1_SOURCE);
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(DSP1L, ARIZONA_DSP1LMIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(DSP1R, ARIZONA_DSP1RMIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_AUX_ENUMS(DSP1, ARIZONA_DSP1AUX1MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(DSP2L, ARIZONA_DSP2LMIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(DSP2R, ARIZONA_DSP2RMIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_AUX_ENUMS(DSP2, ARIZONA_DSP2AUX1MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(DSP3L, ARIZONA_DSP3LMIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(DSP3R, ARIZONA_DSP3RMIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_AUX_ENUMS(DSP3, ARIZONA_DSP3AUX1MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(DSP4L, ARIZONA_DSP4LMIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(DSP4R, ARIZONA_DSP4RMIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_AUX_ENUMS(DSP4, ARIZONA_DSP4AUX1MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ARIZONA_MIXER_ENUMS(Mic, ARIZONA_MICMIX_INPUT_1_SOURCE);
+ ARIZONA_MIXER_ENUMS(Noise, ARIZONA_NOISEMIX_INPUT_1_SOURCE);
+
++
++ ARIZONA_MIXER_ENUMS(AIF2TX1, ARIZONA_AIF2TX1MIX_INPUT_1_SOURCE);
++ ARIZONA_MIXER_ENUMS(AIF2TX2, ARIZONA_AIF2TX2MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(AIF2TX3, ARIZONA_AIF2TX3MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(AIF2TX4, ARIZONA_AIF2TX4MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(AIF2TX5, ARIZONA_AIF2TX5MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ENUMS(AIF2TX6, ARIZONA_AIF2TX6MIX_INPUT_1_SOURCE);
+
+ ARIZONA_MIXER_ENUMS(AIF3TX1, ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE);
+ ARIZONA_MIXER_ENUMS(AIF3TX2, ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE);
++ ARIZONA_MUX_ENUMS(ASRC2L, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE);
++ ARIZONA_MUX_ENUMS(ASRC2R, ARIZONA_ASRC2RMIX_INPUT_1_SOURCE);
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC1INT1, ARIZONA_ISRC1INT1MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC1INT2, ARIZONA_ISRC1INT2MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC1INT3, ARIZONA_ISRC1INT3MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC1INT4, ARIZONA_ISRC1INT4MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC1DEC1, ARIZONA_ISRC1DEC1MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC1DEC2, ARIZONA_ISRC1DEC2MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC1DEC3, ARIZONA_ISRC1DEC3MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC1DEC4, ARIZONA_ISRC1DEC4MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC2INT1, ARIZONA_ISRC2INT1MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC2INT2, ARIZONA_ISRC2INT2MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC2INT3, ARIZONA_ISRC2INT3MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC2INT4, ARIZONA_ISRC2INT4MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC2DEC1, ARIZONA_ISRC2DEC1MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC2DEC2, ARIZONA_ISRC2DEC2MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC2DEC3, ARIZONA_ISRC2DEC3MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC2DEC4, ARIZONA_ISRC2DEC4MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC3INT1, ARIZONA_ISRC3INT1MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC3INT2, ARIZONA_ISRC3INT2MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC3INT3, ARIZONA_ISRC3INT3MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC3INT4, ARIZONA_ISRC3INT4MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC3DEC1, ARIZONA_ISRC3DEC1MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC3DEC2, ARIZONA_ISRC3DEC2MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC3DEC3, ARIZONA_ISRC3DEC3MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ENUMS(ISRC3DEC4, ARIZONA_ISRC3DEC4MIX_INPUT_1_SOURCE);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ static const char *wm5110_aec_loopback_texts[] = {
+ "HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "HPOUT3L", "HPOUT3R",
+ "SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R", "SPKDAT2L", "SPKDAT2R",
++ SND_SOC_DAPM_PGA("ASRC2R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2R_ENA_SHIFT, 0,
++ NULL, 0),
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WM_ADSP2("DSP1", 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WM_ADSP2("DSP2", 1),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WM_ADSP2("DSP3", 2),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WM_ADSP2("DSP4", 3),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC1INT1", ARIZONA_ISRC_1_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC1_INT0_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC1INT2", ARIZONA_ISRC_1_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC1_INT1_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC1INT3", ARIZONA_ISRC_1_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC1_INT2_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC1INT4", ARIZONA_ISRC_1_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC1_INT3_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC1DEC1", ARIZONA_ISRC_1_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC1_DEC0_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC1DEC2", ARIZONA_ISRC_1_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC1_DEC1_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC1DEC3", ARIZONA_ISRC_1_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC1_DEC2_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC1DEC4", ARIZONA_ISRC_1_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC1_DEC3_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC2INT1", ARIZONA_ISRC_2_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC2_INT0_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC2INT2", ARIZONA_ISRC_2_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC2_INT1_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC2INT3", ARIZONA_ISRC_2_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC2_INT2_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC2INT4", ARIZONA_ISRC_2_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC2_INT3_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC2DEC1", ARIZONA_ISRC_2_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC2_DEC0_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC2DEC2", ARIZONA_ISRC_2_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC2_DEC1_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC2DEC3", ARIZONA_ISRC_2_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC2_DEC2_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC2DEC4", ARIZONA_ISRC_2_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC2_DEC3_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC3INT1", ARIZONA_ISRC_3_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC3_INT0_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC3INT2", ARIZONA_ISRC_3_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC3_INT1_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC3INT3", ARIZONA_ISRC_3_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC3_INT2_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC3INT4", ARIZONA_ISRC_3_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC3_INT3_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC3DEC1", ARIZONA_ISRC_3_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC3_DEC0_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC3DEC2", ARIZONA_ISRC_3_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC3_DEC1_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC3DEC3", ARIZONA_ISRC_3_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC3_DEC2_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_PGA("ISRC3DEC4", ARIZONA_ISRC_3_CTRL_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_ISRC3_DEC3_ENA_SHIFT, 0, NULL, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ SND_SOC_DAPM_VALUE_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1,
+ ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0,
+ &wm5110_aec_loopback_mux),
++ ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX1_ENA_SHIFT, 0),
++ SND_SOC_DAPM_AIF_OUT("AIF2TX2", NULL, 0,
++ ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX2_ENA_SHIFT, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_AIF_OUT("AIF2TX3", NULL, 0,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX3_ENA_SHIFT, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_AIF_OUT("AIF2TX4", NULL, 0,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX4_ENA_SHIFT, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_AIF_OUT("AIF2TX5", NULL, 0,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX5_ENA_SHIFT, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_AIF_OUT("AIF2TX6", NULL, 0,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX6_ENA_SHIFT, 0),
+
+ SND_SOC_DAPM_AIF_IN("AIF2RX1", NULL, 0,
+ ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX1_ENA_SHIFT, 0),
++ SND_SOC_DAPM_AIF_IN("AIF2RX2", NULL, 0,
++ ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX2_ENA_SHIFT, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_AIF_IN("AIF2RX3", NULL, 0,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX3_ENA_SHIFT, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_AIF_IN("AIF2RX4", NULL, 0,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX4_ENA_SHIFT, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_AIF_IN("AIF2RX5", NULL, 0,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX5_ENA_SHIFT, 0),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SND_SOC_DAPM_AIF_IN("AIF2RX6", NULL, 0,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX6_ENA_SHIFT, 0),
+
+ SND_SOC_DAPM_AIF_IN("SLIMRX1", NULL, 0,
+ ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE,
++
++ ARIZONA_MIXER_WIDGETS(AIF2TX1, "AIF2TX1"),
++ ARIZONA_MIXER_WIDGETS(AIF2TX2, "AIF2TX2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_WIDGETS(AIF2TX3, "AIF2TX3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_WIDGETS(AIF2TX4, "AIF2TX4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_WIDGETS(AIF2TX5, "AIF2TX5"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_WIDGETS(AIF2TX6, "AIF2TX6"),
+
+ ARIZONA_MIXER_WIDGETS(AIF3TX1, "AIF3TX1"),
+ ARIZONA_MIXER_WIDGETS(AIF3TX2, "AIF3TX2"),
++ ARIZONA_MUX_WIDGETS(ASRC2L, "ASRC2L"),
++ ARIZONA_MUX_WIDGETS(ASRC2R, "ASRC2R"),
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_WIDGETS(DSP1, "DSP1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_WIDGETS(DSP2, "DSP2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_WIDGETS(DSP3, "DSP3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_WIDGETS(DSP4, "DSP4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC1DEC1, "ISRC1DEC1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC1DEC2, "ISRC1DEC2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC1DEC3, "ISRC1DEC3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC1DEC4, "ISRC1DEC4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC1INT1, "ISRC1INT1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC1INT2, "ISRC1INT2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC1INT3, "ISRC1INT3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC1INT4, "ISRC1INT4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC2DEC1, "ISRC2DEC1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC2DEC2, "ISRC2DEC2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC2DEC3, "ISRC2DEC3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC2DEC4, "ISRC2DEC4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC2INT1, "ISRC2INT1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC2INT2, "ISRC2INT2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC2INT3, "ISRC2INT3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC2INT4, "ISRC2INT4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC3DEC1, "ISRC3DEC1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC3DEC2, "ISRC3DEC2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC3DEC3, "ISRC3DEC3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC3DEC4, "ISRC3DEC4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC3INT1, "ISRC3INT1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC3INT2, "ISRC3INT2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC3INT3, "ISRC3INT3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_WIDGETS(ISRC3INT4, "ISRC3INT4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ SND_SOC_DAPM_OUTPUT("HPOUT1L"),
+ SND_SOC_DAPM_OUTPUT("HPOUT1R"),
+ SND_SOC_DAPM_OUTPUT("HPOUT2L"),
++ { name, "AIF1RX8", "AIF1RX8" }, \
++ { name, "AIF2RX1", "AIF2RX1" }, \
++ { name, "AIF2RX2", "AIF2RX2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "AIF2RX3", "AIF2RX3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "AIF2RX4", "AIF2RX4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "AIF2RX5", "AIF2RX5" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "AIF2RX6", "AIF2RX6" }, \
+ { name, "AIF3RX1", "AIF3RX1" }, \
+ { name, "AIF3RX2", "AIF3RX2" }, \
+ { name, "SLIMRX1", "SLIMRX1" }, \
++ { name, "ASRC1L", "ASRC1L" }, \
++ { name, "ASRC1R", "ASRC1R" }, \
++ { name, "ASRC2L", "ASRC2L" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ASRC2R", "ASRC2R" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC1DEC1", "ISRC1DEC1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC1DEC2", "ISRC1DEC2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC1DEC3", "ISRC1DEC3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC1DEC4", "ISRC1DEC4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC1INT1", "ISRC1INT1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC1INT2", "ISRC1INT2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC1INT3", "ISRC1INT3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC1INT4", "ISRC1INT4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC2DEC1", "ISRC2DEC1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC2DEC2", "ISRC2DEC2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC2DEC3", "ISRC2DEC3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC2DEC4", "ISRC2DEC4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC2INT1", "ISRC2INT1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC2INT2", "ISRC2INT2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC2INT3", "ISRC2INT3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC2INT4", "ISRC2INT4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC3DEC1", "ISRC3DEC1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC3DEC2", "ISRC3DEC2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC3DEC3", "ISRC3DEC3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC3DEC4", "ISRC3DEC4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC3INT1", "ISRC3INT1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC3INT2", "ISRC3INT2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC3INT3", "ISRC3INT3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "ISRC3INT4", "ISRC3INT4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP1.1", "DSP1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP1.2", "DSP1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP1.3", "DSP1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP1.4", "DSP1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP1.5", "DSP1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP1.6", "DSP1" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP2.1", "DSP2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP2.2", "DSP2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP2.3", "DSP2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP2.4", "DSP2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP2.5", "DSP2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP2.6", "DSP2" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP3.1", "DSP3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP3.2", "DSP3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP3.3", "DSP3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP3.4", "DSP3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP3.5", "DSP3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP3.6", "DSP3" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP4.1", "DSP4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP4.2", "DSP4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP4.3", "DSP4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP4.4", "DSP4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP4.5", "DSP4" }, \
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { name, "DSP4.6", "DSP4" }
+
+ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
+ { "AIF2 Capture", NULL, "DBVDD2" },
++
++ { "AIF2 Capture", NULL, "AIF2TX1" },
++ { "AIF2 Capture", NULL, "AIF2TX2" },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { "AIF2 Capture", NULL, "AIF2TX3" },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { "AIF2 Capture", NULL, "AIF2TX4" },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { "AIF2 Capture", NULL, "AIF2TX5" },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { "AIF2 Capture", NULL, "AIF2TX6" },
+
+ { "AIF2RX1", NULL, "AIF2 Playback" },
+ { "AIF2RX2", NULL, "AIF2 Playback" },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { "AIF2RX3", NULL, "AIF2 Playback" },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { "AIF2RX4", NULL, "AIF2 Playback" },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { "AIF2RX5", NULL, "AIF2 Playback" },
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { "AIF2RX6", NULL, "AIF2 Playback" },
+
+ { "AIF3 Capture", NULL, "AIF3TX1" },
+ { "AIF3 Capture", NULL, "AIF3TX2" },
++
++ ARIZONA_MIXER_ROUTES("AIF2TX1", "AIF2TX1"),
++ ARIZONA_MIXER_ROUTES("AIF2TX2", "AIF2TX2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ROUTES("AIF2TX3", "AIF2TX3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ROUTES("AIF2TX4", "AIF2TX4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ROUTES("AIF2TX5", "AIF2TX5"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MIXER_ROUTES("AIF2TX6", "AIF2TX6"),
+
+ ARIZONA_MIXER_ROUTES("AIF3TX1", "AIF3TX1"),
+ ARIZONA_MIXER_ROUTES("AIF3TX2", "AIF3TX2"),
++ ARIZONA_MUX_ROUTES("ASRC2L", "ASRC2L"),
++ ARIZONA_MUX_ROUTES("ASRC2R", "ASRC2R"),
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_ROUTES("DSP1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_ROUTES("DSP2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_ROUTES("DSP3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_DSP_ROUTES("DSP4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC1INT1", "ISRC1INT1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC1INT2", "ISRC1INT2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC1INT3", "ISRC1INT3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC1INT4", "ISRC1INT4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC1DEC1", "ISRC1DEC1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC1DEC2", "ISRC1DEC2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC1DEC3", "ISRC1DEC3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC1DEC4", "ISRC1DEC4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC2INT1", "ISRC2INT1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC2INT2", "ISRC2INT2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC2INT3", "ISRC2INT3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC2INT4", "ISRC2INT4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC2DEC1", "ISRC2DEC1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC2DEC2", "ISRC2DEC2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC2DEC3", "ISRC2DEC3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC2DEC4", "ISRC2DEC4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC3INT1", "ISRC3INT1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC3INT2", "ISRC3INT2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC3INT3", "ISRC3INT3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC3INT4", "ISRC3INT4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC3DEC1", "ISRC3DEC1"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC3DEC2", "ISRC3DEC2"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC3DEC3", "ISRC3DEC3"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_MUX_ROUTES("ISRC3DEC4", "ISRC3DEC4"),
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ + { "AEC Loopback", "HPOUT1L", "OUT1L" },
+ + { "AEC Loopback", "HPOUT1R", "OUT1R" },
+ { "HPOUT1L", NULL, "OUT1L" },
++ + { "AEC Loopback", "HPOUT3L", "OUT3L" },
++ + { "AEC Loopback", "HPOUT3R", "OUT3R" },
++ { "HPOUT3L", NULL, "OUT3L" },
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { "HPOUT3R", NULL, "OUT3R" },
+
+ + { "AEC Loopback", "SPKOUTL", "OUT4L" },
+ { "SPKOUTLN", NULL, "OUT4L" },
++ .playback = {
++ .stream_name = "AIF2 Playback",
++ .channels_min = 1,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .channels_max = 6,
+ .rates = WM5110_RATES,
+ .formats = WM5110_FORMATS,
+ },
++ .capture = {
++ .stream_name = "AIF2 Capture",
++ .channels_min = 1,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .channels_max = 6,
+ .rates = WM5110_RATES,
+ .formats = WM5110_FORMATS,
+ },
++ arizona_init_spk(codec);
++ arizona_init_gpio(codec);
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ret = snd_soc_add_codec_controls(codec, wm_adsp2_fw_controls, 8);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ if (ret != 0)
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ return ret;
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS");
+
+ priv->core.arizona->dapm = &codec->dapm;
++ {
++ struct arizona *arizona = dev_get_drvdata(pdev->dev.parent);
++ struct wm5110_priv *wm5110;
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ int i, ret;
+
+ wm5110 = devm_kzalloc(&pdev->dev, sizeof(struct wm5110_priv),
+ GFP_KERNEL);
++ wm5110->core.arizona = arizona;
++ wm5110->core.num_inputs = 8;
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ for (i = 0; i < WM5110_NUM_ADSP; i++) {
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110->core.adsp[i].part = "wm5110";
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110->core.adsp[i].num = i + 1;
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110->core.adsp[i].type = WMFW_ADSP2;
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110->core.adsp[i].dev = arizona->dev;
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110->core.adsp[i].regmap = arizona->regmap;
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110->core.adsp[i].base = ARIZONA_DSP1_CONTROL_1
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + (0x100 * i);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110->core.adsp[i].mem = wm5110_dsp_regions[i];
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wm5110->core.adsp[i].num_mems
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ = ARRAY_SIZE(wm5110_dsp1_regions);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ret = wm_adsp2_init(&wm5110->core.adsp[i], false);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ if (ret != 0)
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ return ret;
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ }
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ for (i = 0; i < ARRAY_SIZE(wm5110->fll); i++)
+ wm5110->fll[i].vco_mult = 3;
+
++ ARIZONA_IRQ_FLL2_LOCK, ARIZONA_IRQ_FLL2_CLOCK_OK,
++ &wm5110->fll[1]);
++
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /* SR2 fixed at 8kHz, SR3 fixed at 16kHz */
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ regmap_update_bits(arizona->regmap, ARIZONA_SAMPLE_RATE_2,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_SAMPLE_RATE_2_MASK, 0x11);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ regmap_update_bits(arizona->regmap, ARIZONA_SAMPLE_RATE_3,
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ARIZONA_SAMPLE_RATE_3_MASK, 0x12);
+++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ for (i = 0; i < ARRAY_SIZE(wm5110_dai); i++)
+ arizona_init_dai(&wm5110->core, i);
+
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ #include <linux/clk.h>
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ #include <linux/of.h>
+ #include <linux/platform_device.h>
+ #include <linux/module.h>
+ #include <sound/simple_card.h>
++
++ daifmt |= set->fmt;
++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (daifmt)
+ ret = snd_soc_dai_set_fmt(dai, daifmt);
+
+ if (ret == -ENOTSUPP) {
++ return 0;
++ }
++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ static int
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ asoc_simple_card_sub_parse_of(struct device_node *np,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct asoc_simple_dai *dai,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct device_node **node)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct clk *clk;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ int ret;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ /*
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ * get node via "sound-dai = <&phandle port>"
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ * it will be used as xxx_of_node on soc_bind_dai_link()
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ *node = of_parse_phandle(np, "sound-dai", 0);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (!*node)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ return -ENODEV;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ /* get dai->name */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ret = snd_soc_of_get_dai_name(np, &dai->name);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (ret < 0)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ goto parse_error;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ /*
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ * bitclock-inversion, frame-inversion
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ * bitclock-master, frame-master
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ * and specific "format" if it has
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ dai->fmt = snd_soc_of_parse_daifmt(np, NULL);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ /*
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ * dai->sysclk come from
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ * "clocks = <&xxx>" (if system has common clock)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ * or "system-clock-frequency = <xxx>"
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ * or device's module clock.
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (of_property_read_bool(np, "clocks")) {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ clk = of_clk_get(np, 0);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (IS_ERR(clk)) {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ret = PTR_ERR(clk);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ goto parse_error;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ dai->sysclk = clk_get_rate(clk);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ } else if (of_property_read_bool(np, "system-clock-frequency")) {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ of_property_read_u32(np,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ "system-clock-frequency",
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ &dai->sysclk);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ } else {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ clk = of_clk_get(*node, 0);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (IS_ERR(clk)) {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ret = PTR_ERR(clk);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ goto parse_error;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ dai->sysclk = clk_get_rate(clk);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ret = 0;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ parse_error:
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ of_node_put(*node);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ return ret;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ static int asoc_simple_card_parse_of(struct device_node *node,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct asoc_simple_card_info *info,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct device *dev,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct device_node **of_cpu,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct device_node **of_codec,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct device_node **of_platform)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct device_node *np;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ char *name;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ int ret;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ /* get CPU/CODEC common format via simple-audio-card,format */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ info->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ (SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ /* DAPM routes */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ret = snd_soc_of_parse_audio_routing(&info->snd_card,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ "simple-audio-routing");
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (ret)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ return ret;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ /* CPU sub-node */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ret = -EINVAL;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ np = of_get_child_by_name(node, "simple-audio-card,cpu");
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (np)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ret = asoc_simple_card_sub_parse_of(np,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ &info->cpu_dai,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ of_cpu);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (ret < 0)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ return ret;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ /* CODEC sub-node */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ret = -EINVAL;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ np = of_get_child_by_name(node, "simple-audio-card,codec");
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (np)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ret = asoc_simple_card_sub_parse_of(np,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ &info->codec_dai,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ of_codec);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (ret < 0)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ return ret;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ if (!info->cpu_dai.name || !info->codec_dai.name)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ return -EINVAL;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ /* card name is created from CPU/CODEC dai name */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ name = devm_kzalloc(dev,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ strlen(info->cpu_dai.name) +
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ strlen(info->codec_dai.name) + 2,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ GFP_KERNEL);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ sprintf(name, "%s-%s", info->cpu_dai.name, info->codec_dai.name);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ info->name = info->card = name;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ /* simple-card assumes platform == cpu */
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ *of_platform = *of_cpu;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ dev_dbg(dev, "card-name : %s\n", info->card);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ dev_dbg(dev, "platform : %04x\n", info->daifmt);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ dev_dbg(dev, "cpu : %s / %04x / %d\n",
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ info->cpu_dai.name,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ info->cpu_dai.fmt,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ info->cpu_dai.sysclk);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ dev_dbg(dev, "codec : %s / %04x / %d\n",
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ info->codec_dai.name,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ info->codec_dai.fmt,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ info->codec_dai.sysclk);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ return 0;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
+ static int asoc_simple_card_probe(struct platform_device *pdev)
+ {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct asoc_simple_card_info *cinfo;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct device_node *np = pdev->dev.of_node;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ struct device_node *of_cpu, *of_codec, *of_platform;
+ struct device *dev = &pdev->dev;
+
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ cinfo = NULL;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ of_cpu = NULL;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ of_codec = NULL;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ of_platform = NULL;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (np && of_device_is_available(np)) {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ cinfo = devm_kzalloc(dev, sizeof(*cinfo), GFP_KERNEL);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (cinfo) {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ int ret;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ cinfo->snd_card.dev = &pdev->dev;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ret = asoc_simple_card_parse_of(np, cinfo, dev,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ &of_cpu,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ &of_codec,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ &of_platform);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (ret < 0) {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ if (ret != -EPROBE_DEFER)
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ dev_err(dev, "parse error %d\n", ret);
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ return ret;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ } else {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ cinfo->snd_card.dev = &pdev->dev;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ cinfo = pdev->dev.platform_data;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
+ if (!cinfo) {
+ dev_err(dev, "no info for asoc-simple-card\n");
+ return -EINVAL;
++
++ if (!cinfo->name ||
++ !cinfo->card ||
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ !cinfo->codec_dai.name ||
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ !(cinfo->codec || of_codec) ||
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ !(cinfo->platform || of_platform) ||
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ !(cinfo->cpu_dai.name || of_cpu)) {
+ dev_err(dev, "insufficient asoc_simple_card_info settings\n");
+ return -EINVAL;
+ }
++ cinfo->snd_link.platform_name = cinfo->platform;
++ cinfo->snd_link.codec_name = cinfo->codec;
++ cinfo->snd_link.codec_dai_name = cinfo->codec_dai.name;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ cinfo->snd_link.cpu_of_node = of_cpu;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ cinfo->snd_link.codec_of_node = of_codec;
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ cinfo->snd_link.platform_of_node = of_platform;
+ cinfo->snd_link.init = asoc_simple_card_dai_init;
+
+ /*
-------------------- --------------------------------------------- cinfo->snd_card.dev = &pdev->dev;
- -
- - return snd_soc_register_card(&cinfo->snd_card);
- - }
- -
- - static int asoc_simple_card_remove(struct platform_device *pdev)
- - {
- - struct asoc_simple_card_info *cinfo = pdev->dev.platform_data;
++ cinfo->snd_card.owner = THIS_MODULE;
++ cinfo->snd_card.dai_link = &cinfo->snd_link;
++ cinfo->snd_card.num_links = 1;
-------------------- --------------------------------------------- .remove = asoc_simple_card_remove,
+
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ return devm_snd_soc_register_card(&pdev->dev, &cinfo->snd_card);
+ }
+
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ static const struct of_device_id asoc_simple_of_match[] = {
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ { .compatible = "simple-audio-card", },
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ {},
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ };
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ MODULE_DEVICE_TABLE(of, asoc_simple_of_match);
+
+ static struct platform_driver asoc_simple_card = {
+ .driver = {
++ .name = "asoc-simple-card",
++ .owner = THIS_MODULE,
++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ .of_match_table = asoc_simple_of_match,
+ },
+ .probe = asoc_simple_card_probe,
+ };
+
+ module_platform_driver(asoc_simple_card);
++ struct rsnd_scu {
++ struct rsnd_scu_platform_info *info; /* rcar_snd.h */
++ struct rsnd_mod mod;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct clk *clk;
+ };
+
+ #define rsnd_scu_mode_flags(p) ((p)->info->flags)
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ #define rsnd_scu_convert_rate(p) ((p)->info->convert_rate)
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ #define RSND_SCU_NAME_SIZE 16
+
+ /*
+ * ADINR
++ #define OTBL_18 (6 << 16)
++ #define OTBL_16 (8 << 16)
++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /*
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * image of SRC (Sampling Rate Converter)
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ *
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * 96kHz <-> +-----+ 48kHz +-----+ 48kHz +-------+
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * 48kHz <-> | SRC | <------> | SSI | <-----> | codec |
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * 44.1kHz <-> +-----+ +-----+ +-------+
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * ...
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ *
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ */
+
+ #define rsnd_mod_to_scu(_mod) \
+ container_of((_mod), struct rsnd_scu, mod)
++ ((pos) = (struct rsnd_scu *)(priv)->scu + i); \
++ i++)
++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* Gen1 only */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ static int rsnd_src_set_route_if_gen1(struct rsnd_priv *priv,
+ struct rsnd_mod *mod,
+ struct rsnd_dai *rdai,
+ struct rsnd_dai_stream *io)
++ { 0x3, 28, }, /* 7 */
++ { 0x3, 30, }, /* 8 */
++ };
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
+ u32 mask;
+ u32 val;
+ int shift;
++ */
++ shift = (id % 4) * 8;
++ mask = 0x1F << shift;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /*
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * ADG is used as source clock if SRC was used,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * then, SSI WS is used as destination clock.
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * SSI WS is used as source clock if SRC is not used
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * (when playback, source/destination become reverse when capture)
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (rsnd_scu_convert_rate(scu)) /* use ADG */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ val = 0;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ else if (8 == id) /* use SSI WS, but SRU8 is special */
+ val = id << shift;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ else /* use SSI WS */
+ val = (id + 1) << shift;
+
+ switch (id / 4) {
++ return 0;
++ }
++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_mod *ssi_mod,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct snd_pcm_runtime *runtime)
+ {
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_scu *scu;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ unsigned int rate;
+
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* this function is assuming SSI id = SCU id here */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ scu = rsnd_mod_to_scu(rsnd_scu_mod_get(priv, rsnd_mod_id(ssi_mod)));
+
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /*
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * return convert rate if SRC is used,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ * otherwise, return runtime->rate as usual
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rate = rsnd_scu_convert_rate(scu);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (!rate)
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rate = runtime->rate;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ return rate;
+ }
+
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ static int rsnd_scu_convert_rate_ctrl(struct rsnd_priv *priv,
+ struct rsnd_mod *mod,
+ struct rsnd_dai *rdai,
+ struct rsnd_dai_stream *io)
++ {
++ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ u32 convert_rate = rsnd_scu_convert_rate(scu);
+ u32 adinr = runtime->channels;
+
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* set/clear soft reset */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_SWRSR, 0);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_SWRSR, 1);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* Initialize the operation of the SRC internal circuits */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_SRCIR, 1);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* Set channel number and output bit length */
+ switch (runtime->sample_bits) {
+ case 16:
+ adinr |= OTBL_16;
++ default:
++ return -EIO;
++ }
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_ADINR, adinr);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (convert_rate) {
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ u32 fsrate = 0x0400000 / convert_rate * runtime->rate;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ int ret;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* Enable the initial value of IFS */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_IFSCR, 1);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* Set initial value of IFS */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_IFSVR, fsrate);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* Select SRC mode (fixed value) */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_SRCCR, 0x00010110);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* Set the restriction value of the FS ratio (98%) */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_MNFSR, fsrate / 100 * 98);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (rsnd_is_gen1(priv)) {
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* no SRC_BFSSR settings, since SRC_SRCCR::BUFMD is 0 */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ }
+
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* set convert clock */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ ret = rsnd_adg_set_convert_clk(priv, mod,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ runtime->rate,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ convert_rate);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (ret < 0)
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ return ret;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* Cancel the initialization and operate the SRC function */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_SRCIR, 0);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ /* use DMA transfer */
+ rsnd_mod_write(mod, BUSIF_MODE, 1);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ return 0;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ static int rsnd_scu_transfer_start(struct rsnd_priv *priv,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_mod *mod,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_dai *rdai,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_dai_stream *io)
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ {
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ int id = rsnd_mod_id(mod);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ u32 val;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (rsnd_is_gen1(priv)) {
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ val = (1 << id);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_bset(mod, SRC_ROUTE_CTRL, val, val);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (rsnd_scu_convert_rate(scu))
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ return 0;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ static int rsnd_scu_transfer_stop(struct rsnd_priv *priv,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_mod *mod,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_dai *rdai,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_dai_stream *io)
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ {
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ int id = rsnd_mod_id(mod);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ u32 mask;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (rsnd_is_gen1(priv)) {
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ mask = (1 << id);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_bset(mod, SRC_ROUTE_CTRL, mask, 0);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (rsnd_scu_convert_rate(scu))
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0);
+
+ return 0;
+ }
++ struct rsnd_dai_stream *io)
++ {
++ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
+ struct device *dev = rsnd_priv_to_dev(priv);
+ int ret;
+
++ return 0;
++ }
++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ clk_enable(scu->clk);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
+ /* it use DMA transter */
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ ret = rsnd_src_set_route_if_gen1(priv, mod, rdai, io);
+ if (ret < 0)
+ return ret;
+
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ ret = rsnd_scu_convert_rate_ctrl(priv, mod, rdai, io);
+ if (ret < 0)
+ return ret;
+
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ ret = rsnd_scu_transfer_start(priv, mod, rdai, io);
+ if (ret < 0)
+ return ret;
+
++ return 0;
++ }
++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ static int rsnd_scu_stop(struct rsnd_mod *mod,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_dai *rdai,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_dai_stream *io)
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ {
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (!rsnd_scu_hpbif_is_enable(mod))
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ return 0;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ rsnd_scu_transfer_stop(priv, mod, rdai, io);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ clk_disable(scu->clk);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ return 0;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ }
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
+ static struct rsnd_mod_ops rsnd_scu_ops = {
+ .name = "scu",
+ .start = rsnd_scu_start,
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ .stop = rsnd_scu_stop,
+ };
+
+ struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id)
++ {
++ struct device *dev = rsnd_priv_to_dev(priv);
++ struct rsnd_scu *scu;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ struct clk *clk;
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ char name[RSND_SCU_NAME_SIZE];
+ int i, nr;
+
+ /*
++ priv->scu = scu;
++
++ for_each_rsnd_scu(scu, priv, i) {
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ snprintf(name, RSND_SCU_NAME_SIZE, "scu.%d", i);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ clk = devm_clk_get(dev, name);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ if (IS_ERR(clk))
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ return PTR_ERR(clk);
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++
+ rsnd_mod_init(priv, &scu->mod,
+ &rsnd_scu_ops, i);
+ scu->info = &info->scu_info[i];
++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ scu->clk = clk;
+
+ dev_dbg(dev, "SCU%d probed\n", i);
+ }