mirror of https://gitee.com/openkylin/linux.git
Merge remote-tracking branches 'asoc/fix/cs42l51', 'asoc/fix/cs42l52', 'asoc/fix/cs42l73', 'asoc/fix/rcar', 'asoc/fix/spear' and 'asoc/fix/tegra' into asoc-linus
This commit is contained in:
commit
a23af4ab6b
|
@ -988,14 +988,12 @@ static struct asoc_simple_card_info fsi_wm8978_info = {
|
||||||
.card = "FSI2A-WM8978",
|
.card = "FSI2A-WM8978",
|
||||||
.codec = "wm8978.0-001a",
|
.codec = "wm8978.0-001a",
|
||||||
.platform = "sh_fsi2",
|
.platform = "sh_fsi2",
|
||||||
.daifmt = SND_SOC_DAIFMT_I2S,
|
.daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "fsia-dai",
|
.name = "fsia-dai",
|
||||||
.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "wm8978-hifi",
|
.name = "wm8978-hifi",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
|
|
||||||
.sysclk = 12288000,
|
.sysclk = 12288000,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -429,14 +429,12 @@ static struct asoc_simple_card_info rsnd_card_info[] = {
|
||||||
.card = "SSI56-AK4643",
|
.card = "SSI56-AK4643",
|
||||||
.codec = "ak4642-codec.0-0012",
|
.codec = "ak4642-codec.0-0012",
|
||||||
.platform = "rcar_sound",
|
.platform = "rcar_sound",
|
||||||
.daifmt = SND_SOC_DAIFMT_LEFT_J,
|
.daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "rsnd-dai.0",
|
.name = "rsnd-dai.0",
|
||||||
.fmt = SND_SOC_DAIFMT_CBS_CFS,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "ak4642-hifi",
|
.name = "ak4642-hifi",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM,
|
|
||||||
.sysclk = 11289600,
|
.sysclk = 11289600,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -446,10 +444,9 @@ static struct asoc_simple_card_info rsnd_card_info[] = {
|
||||||
.card = "SSI3-AK4554(playback)",
|
.card = "SSI3-AK4554(playback)",
|
||||||
.codec = "ak4554-adc-dac.0",
|
.codec = "ak4554-adc-dac.0",
|
||||||
.platform = "rcar_sound",
|
.platform = "rcar_sound",
|
||||||
|
.daifmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_RIGHT_J,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "rsnd-dai.1",
|
.name = "rsnd-dai.1",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM |
|
|
||||||
SND_SOC_DAIFMT_RIGHT_J,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "ak4554-hifi",
|
.name = "ak4554-hifi",
|
||||||
|
@ -461,10 +458,9 @@ static struct asoc_simple_card_info rsnd_card_info[] = {
|
||||||
.card = "SSI4-AK4554(capture)",
|
.card = "SSI4-AK4554(capture)",
|
||||||
.codec = "ak4554-adc-dac.0",
|
.codec = "ak4554-adc-dac.0",
|
||||||
.platform = "rcar_sound",
|
.platform = "rcar_sound",
|
||||||
|
.daifmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_LEFT_J,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "rsnd-dai.2",
|
.name = "rsnd-dai.2",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM |
|
|
||||||
SND_SOC_DAIFMT_LEFT_J,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "ak4554-hifi",
|
.name = "ak4554-hifi",
|
||||||
|
@ -476,10 +472,9 @@ static struct asoc_simple_card_info rsnd_card_info[] = {
|
||||||
.card = "SSI7-AK4554(playback)",
|
.card = "SSI7-AK4554(playback)",
|
||||||
.codec = "ak4554-adc-dac.1",
|
.codec = "ak4554-adc-dac.1",
|
||||||
.platform = "rcar_sound",
|
.platform = "rcar_sound",
|
||||||
|
.daifmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_RIGHT_J,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "rsnd-dai.3",
|
.name = "rsnd-dai.3",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM |
|
|
||||||
SND_SOC_DAIFMT_RIGHT_J,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "ak4554-hifi",
|
.name = "ak4554-hifi",
|
||||||
|
@ -491,10 +486,9 @@ static struct asoc_simple_card_info rsnd_card_info[] = {
|
||||||
.card = "SSI8-AK4554(capture)",
|
.card = "SSI8-AK4554(capture)",
|
||||||
.codec = "ak4554-adc-dac.1",
|
.codec = "ak4554-adc-dac.1",
|
||||||
.platform = "rcar_sound",
|
.platform = "rcar_sound",
|
||||||
|
.daifmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_LEFT_J,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "rsnd-dai.4",
|
.name = "rsnd-dai.4",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM |
|
|
||||||
SND_SOC_DAIFMT_LEFT_J,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "ak4554-hifi",
|
.name = "ak4554-hifi",
|
||||||
|
|
|
@ -589,14 +589,12 @@ static struct asoc_simple_card_info fsi2_ak4648_info = {
|
||||||
.card = "FSI2A-AK4648",
|
.card = "FSI2A-AK4648",
|
||||||
.codec = "ak4642-codec.0-0012",
|
.codec = "ak4642-codec.0-0012",
|
||||||
.platform = "sh_fsi2",
|
.platform = "sh_fsi2",
|
||||||
.daifmt = SND_SOC_DAIFMT_LEFT_J,
|
.daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "fsia-dai",
|
.name = "fsia-dai",
|
||||||
.fmt = SND_SOC_DAIFMT_CBS_CFS,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "ak4642-hifi",
|
.name = "ak4642-hifi",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM,
|
|
||||||
.sysclk = 11289600,
|
.sysclk = 11289600,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -509,9 +509,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
|
||||||
.card = "FSI2B-HDMI",
|
.card = "FSI2B-HDMI",
|
||||||
.codec = "sh-mobile-hdmi",
|
.codec = "sh-mobile-hdmi",
|
||||||
.platform = "sh_fsi2",
|
.platform = "sh_fsi2",
|
||||||
|
.daifmt = SND_SOC_DAIFMT_CBS_CFS,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "fsib-dai",
|
.name = "fsib-dai",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "sh_mobile_hdmi-hifi",
|
.name = "sh_mobile_hdmi-hifi",
|
||||||
|
@ -905,14 +905,12 @@ static struct asoc_simple_card_info fsi2_ak4643_info = {
|
||||||
.card = "FSI2A-AK4643",
|
.card = "FSI2A-AK4643",
|
||||||
.codec = "ak4642-codec.0-0013",
|
.codec = "ak4642-codec.0-0013",
|
||||||
.platform = "sh_fsi2",
|
.platform = "sh_fsi2",
|
||||||
.daifmt = SND_SOC_DAIFMT_LEFT_J,
|
.daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "fsia-dai",
|
.name = "fsia-dai",
|
||||||
.fmt = SND_SOC_DAIFMT_CBS_CFS,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "ak4642-hifi",
|
.name = "ak4642-hifi",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM,
|
|
||||||
.sysclk = 11289600,
|
.sysclk = 11289600,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -861,14 +861,12 @@ static struct asoc_simple_card_info fsi_da7210_info = {
|
||||||
.card = "FSIB-DA7210",
|
.card = "FSIB-DA7210",
|
||||||
.codec = "da7210.0-001a",
|
.codec = "da7210.0-001a",
|
||||||
.platform = "sh_fsi.0",
|
.platform = "sh_fsi.0",
|
||||||
.daifmt = SND_SOC_DAIFMT_I2S,
|
.daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "fsib-dai",
|
.name = "fsib-dai",
|
||||||
.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "da7210-hifi",
|
.name = "da7210-hifi",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -304,14 +304,12 @@ static struct asoc_simple_card_info fsi_ak4642_info = {
|
||||||
.card = "FSIA-AK4642",
|
.card = "FSIA-AK4642",
|
||||||
.codec = "ak4642-codec.0-0012",
|
.codec = "ak4642-codec.0-0012",
|
||||||
.platform = "sh_fsi.0",
|
.platform = "sh_fsi.0",
|
||||||
.daifmt = SND_SOC_DAIFMT_LEFT_J,
|
.daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
|
||||||
.cpu_dai = {
|
.cpu_dai = {
|
||||||
.name = "fsia-dai",
|
.name = "fsia-dai",
|
||||||
.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
|
|
||||||
},
|
},
|
||||||
.codec_dai = {
|
.codec_dai = {
|
||||||
.name = "ak4642-hifi",
|
.name = "ak4642-hifi",
|
||||||
.fmt = SND_SOC_DAIFMT_CBM_CFM,
|
|
||||||
.sysclk = 11289600,
|
.sysclk = 11289600,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -124,9 +124,8 @@ static int cs42l51_set_chan_mix(struct snd_kcontrol *kcontrol,
|
||||||
|
|
||||||
static const DECLARE_TLV_DB_SCALE(adc_pcm_tlv, -5150, 50, 0);
|
static const DECLARE_TLV_DB_SCALE(adc_pcm_tlv, -5150, 50, 0);
|
||||||
static const DECLARE_TLV_DB_SCALE(tone_tlv, -1050, 150, 0);
|
static const DECLARE_TLV_DB_SCALE(tone_tlv, -1050, 150, 0);
|
||||||
/* This is a lie. after -102 db, it stays at -102 */
|
|
||||||
/* maybe a range would be better */
|
static const DECLARE_TLV_DB_SCALE(aout_tlv, -10200, 50, 0);
|
||||||
static const DECLARE_TLV_DB_SCALE(aout_tlv, -11550, 50, 0);
|
|
||||||
|
|
||||||
static const DECLARE_TLV_DB_SCALE(boost_tlv, 1600, 1600, 0);
|
static const DECLARE_TLV_DB_SCALE(boost_tlv, 1600, 1600, 0);
|
||||||
static const char *chan_mix[] = {
|
static const char *chan_mix[] = {
|
||||||
|
@ -141,7 +140,7 @@ static const struct soc_enum cs42l51_chan_mix =
|
||||||
static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
|
static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
|
||||||
SOC_DOUBLE_R_SX_TLV("PCM Playback Volume",
|
SOC_DOUBLE_R_SX_TLV("PCM Playback Volume",
|
||||||
CS42L51_PCMA_VOL, CS42L51_PCMB_VOL,
|
CS42L51_PCMA_VOL, CS42L51_PCMB_VOL,
|
||||||
6, 0x19, 0x7F, adc_pcm_tlv),
|
0, 0x19, 0x7F, adc_pcm_tlv),
|
||||||
SOC_DOUBLE_R("PCM Playback Switch",
|
SOC_DOUBLE_R("PCM Playback Switch",
|
||||||
CS42L51_PCMA_VOL, CS42L51_PCMB_VOL, 7, 1, 1),
|
CS42L51_PCMA_VOL, CS42L51_PCMB_VOL, 7, 1, 1),
|
||||||
SOC_DOUBLE_R_SX_TLV("Analog Playback Volume",
|
SOC_DOUBLE_R_SX_TLV("Analog Playback Volume",
|
||||||
|
@ -149,7 +148,7 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
|
||||||
0, 0x34, 0xE4, aout_tlv),
|
0, 0x34, 0xE4, aout_tlv),
|
||||||
SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume",
|
SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume",
|
||||||
CS42L51_ADCA_VOL, CS42L51_ADCB_VOL,
|
CS42L51_ADCA_VOL, CS42L51_ADCB_VOL,
|
||||||
6, 0x19, 0x7F, adc_pcm_tlv),
|
0, 0x19, 0x7F, adc_pcm_tlv),
|
||||||
SOC_DOUBLE_R("ADC Mixer Switch",
|
SOC_DOUBLE_R("ADC Mixer Switch",
|
||||||
CS42L51_ADCA_VOL, CS42L51_ADCB_VOL, 7, 1, 1),
|
CS42L51_ADCA_VOL, CS42L51_ADCB_VOL, 7, 1, 1),
|
||||||
SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0),
|
SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0),
|
||||||
|
|
|
@ -347,7 +347,7 @@ static const char * const right_swap_text[] = {
|
||||||
static const unsigned int swap_values[] = { 0, 1, 3 };
|
static const unsigned int swap_values[] = { 0, 1, 3 };
|
||||||
|
|
||||||
static const struct soc_enum adca_swap_enum =
|
static const struct soc_enum adca_swap_enum =
|
||||||
SOC_VALUE_ENUM_SINGLE(CS42L52_ADC_PCM_MIXER, 2, 1,
|
SOC_VALUE_ENUM_SINGLE(CS42L52_ADC_PCM_MIXER, 2, 3,
|
||||||
ARRAY_SIZE(left_swap_text),
|
ARRAY_SIZE(left_swap_text),
|
||||||
left_swap_text,
|
left_swap_text,
|
||||||
swap_values);
|
swap_values);
|
||||||
|
@ -356,7 +356,7 @@ static const struct snd_kcontrol_new adca_mixer =
|
||||||
SOC_DAPM_ENUM("Route", adca_swap_enum);
|
SOC_DAPM_ENUM("Route", adca_swap_enum);
|
||||||
|
|
||||||
static const struct soc_enum pcma_swap_enum =
|
static const struct soc_enum pcma_swap_enum =
|
||||||
SOC_VALUE_ENUM_SINGLE(CS42L52_ADC_PCM_MIXER, 6, 1,
|
SOC_VALUE_ENUM_SINGLE(CS42L52_ADC_PCM_MIXER, 6, 3,
|
||||||
ARRAY_SIZE(left_swap_text),
|
ARRAY_SIZE(left_swap_text),
|
||||||
left_swap_text,
|
left_swap_text,
|
||||||
swap_values);
|
swap_values);
|
||||||
|
@ -365,7 +365,7 @@ static const struct snd_kcontrol_new pcma_mixer =
|
||||||
SOC_DAPM_ENUM("Route", pcma_swap_enum);
|
SOC_DAPM_ENUM("Route", pcma_swap_enum);
|
||||||
|
|
||||||
static const struct soc_enum adcb_swap_enum =
|
static const struct soc_enum adcb_swap_enum =
|
||||||
SOC_VALUE_ENUM_SINGLE(CS42L52_ADC_PCM_MIXER, 0, 1,
|
SOC_VALUE_ENUM_SINGLE(CS42L52_ADC_PCM_MIXER, 0, 3,
|
||||||
ARRAY_SIZE(right_swap_text),
|
ARRAY_SIZE(right_swap_text),
|
||||||
right_swap_text,
|
right_swap_text,
|
||||||
swap_values);
|
swap_values);
|
||||||
|
@ -374,7 +374,7 @@ static const struct snd_kcontrol_new adcb_mixer =
|
||||||
SOC_DAPM_ENUM("Route", adcb_swap_enum);
|
SOC_DAPM_ENUM("Route", adcb_swap_enum);
|
||||||
|
|
||||||
static const struct soc_enum pcmb_swap_enum =
|
static const struct soc_enum pcmb_swap_enum =
|
||||||
SOC_VALUE_ENUM_SINGLE(CS42L52_ADC_PCM_MIXER, 4, 1,
|
SOC_VALUE_ENUM_SINGLE(CS42L52_ADC_PCM_MIXER, 4, 3,
|
||||||
ARRAY_SIZE(right_swap_text),
|
ARRAY_SIZE(right_swap_text),
|
||||||
right_swap_text,
|
right_swap_text,
|
||||||
swap_values);
|
swap_values);
|
||||||
|
|
|
@ -319,7 +319,7 @@ static const char * const cs42l73_mono_mix_texts[] = {
|
||||||
static const unsigned int cs42l73_mono_mix_values[] = { 0, 1, 2 };
|
static const unsigned int cs42l73_mono_mix_values[] = { 0, 1, 2 };
|
||||||
|
|
||||||
static const struct soc_enum spk_asp_enum =
|
static const struct soc_enum spk_asp_enum =
|
||||||
SOC_VALUE_ENUM_SINGLE(CS42L73_MMIXCTL, 6, 1,
|
SOC_VALUE_ENUM_SINGLE(CS42L73_MMIXCTL, 6, 3,
|
||||||
ARRAY_SIZE(cs42l73_mono_mix_texts),
|
ARRAY_SIZE(cs42l73_mono_mix_texts),
|
||||||
cs42l73_mono_mix_texts,
|
cs42l73_mono_mix_texts,
|
||||||
cs42l73_mono_mix_values);
|
cs42l73_mono_mix_values);
|
||||||
|
@ -337,7 +337,7 @@ static const struct snd_kcontrol_new spk_xsp_mixer =
|
||||||
SOC_DAPM_ENUM("Route", spk_xsp_enum);
|
SOC_DAPM_ENUM("Route", spk_xsp_enum);
|
||||||
|
|
||||||
static const struct soc_enum esl_asp_enum =
|
static const struct soc_enum esl_asp_enum =
|
||||||
SOC_VALUE_ENUM_SINGLE(CS42L73_MMIXCTL, 2, 5,
|
SOC_VALUE_ENUM_SINGLE(CS42L73_MMIXCTL, 2, 3,
|
||||||
ARRAY_SIZE(cs42l73_mono_mix_texts),
|
ARRAY_SIZE(cs42l73_mono_mix_texts),
|
||||||
cs42l73_mono_mix_texts,
|
cs42l73_mono_mix_texts,
|
||||||
cs42l73_mono_mix_values);
|
cs42l73_mono_mix_values);
|
||||||
|
@ -346,7 +346,7 @@ static const struct snd_kcontrol_new esl_asp_mixer =
|
||||||
SOC_DAPM_ENUM("Route", esl_asp_enum);
|
SOC_DAPM_ENUM("Route", esl_asp_enum);
|
||||||
|
|
||||||
static const struct soc_enum esl_xsp_enum =
|
static const struct soc_enum esl_xsp_enum =
|
||||||
SOC_VALUE_ENUM_SINGLE(CS42L73_MMIXCTL, 0, 7,
|
SOC_VALUE_ENUM_SINGLE(CS42L73_MMIXCTL, 0, 3,
|
||||||
ARRAY_SIZE(cs42l73_mono_mix_texts),
|
ARRAY_SIZE(cs42l73_mono_mix_texts),
|
||||||
cs42l73_mono_mix_texts,
|
cs42l73_mono_mix_texts,
|
||||||
cs42l73_mono_mix_values);
|
cs42l73_mono_mix_values);
|
||||||
|
|
|
@ -1711,9 +1711,9 @@ static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||||
/* set master/slave audio interface */
|
/* set master/slave audio interface */
|
||||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||||
case SND_SOC_DAIFMT_CBM_CFM:
|
case SND_SOC_DAIFMT_CBM_CFM:
|
||||||
fsi->clk_master = 1;
|
|
||||||
break;
|
break;
|
||||||
case SND_SOC_DAIFMT_CBS_CFS:
|
case SND_SOC_DAIFMT_CBS_CFS:
|
||||||
|
fsi->clk_master = 1; /* codec is slave, cpu is master */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -486,10 +486,10 @@ static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||||
/* set master/slave audio interface */
|
/* set master/slave audio interface */
|
||||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||||
case SND_SOC_DAIFMT_CBM_CFM:
|
case SND_SOC_DAIFMT_CBM_CFM:
|
||||||
rdai->clk_master = 1;
|
rdai->clk_master = 0;
|
||||||
break;
|
break;
|
||||||
case SND_SOC_DAIFMT_CBS_CFS:
|
case SND_SOC_DAIFMT_CBS_CFS:
|
||||||
rdai->clk_master = 0;
|
rdai->clk_master = 1; /* codec is slave, cpu is master */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -213,10 +213,7 @@ static int spdif_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||||
static int spdif_mute_get(struct snd_kcontrol *kcontrol,
|
static int spdif_mute_get(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_ctl_elem_value *ucontrol)
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
{
|
{
|
||||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol);
|
||||||
struct snd_soc_card *card = codec->card;
|
|
||||||
struct snd_soc_pcm_runtime *rtd = card->rtd;
|
|
||||||
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
|
||||||
struct spdif_out_dev *host = snd_soc_dai_get_drvdata(cpu_dai);
|
struct spdif_out_dev *host = snd_soc_dai_get_drvdata(cpu_dai);
|
||||||
|
|
||||||
ucontrol->value.integer.value[0] = host->saved_params.mute;
|
ucontrol->value.integer.value[0] = host->saved_params.mute;
|
||||||
|
@ -226,10 +223,7 @@ static int spdif_mute_get(struct snd_kcontrol *kcontrol,
|
||||||
static int spdif_mute_put(struct snd_kcontrol *kcontrol,
|
static int spdif_mute_put(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_ctl_elem_value *ucontrol)
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
{
|
{
|
||||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol);
|
||||||
struct snd_soc_card *card = codec->card;
|
|
||||||
struct snd_soc_pcm_runtime *rtd = card->rtd;
|
|
||||||
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
|
||||||
struct spdif_out_dev *host = snd_soc_dai_get_drvdata(cpu_dai);
|
struct spdif_out_dev *host = snd_soc_dai_get_drvdata(cpu_dai);
|
||||||
|
|
||||||
if (host->saved_params.mute == ucontrol->value.integer.value[0])
|
if (host->saved_params.mute == ucontrol->value.integer.value[0])
|
||||||
|
|
|
@ -306,7 +306,7 @@ static const struct regmap_config tegra20_ac97_regmap_config = {
|
||||||
.readable_reg = tegra20_ac97_wr_rd_reg,
|
.readable_reg = tegra20_ac97_wr_rd_reg,
|
||||||
.volatile_reg = tegra20_ac97_volatile_reg,
|
.volatile_reg = tegra20_ac97_volatile_reg,
|
||||||
.precious_reg = tegra20_ac97_precious_reg,
|
.precious_reg = tegra20_ac97_precious_reg,
|
||||||
.cache_type = REGCACHE_RBTREE,
|
.cache_type = REGCACHE_FLAT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int tegra20_ac97_platform_probe(struct platform_device *pdev)
|
static int tegra20_ac97_platform_probe(struct platform_device *pdev)
|
||||||
|
|
|
@ -128,7 +128,7 @@ static const struct regmap_config tegra20_das_regmap_config = {
|
||||||
.max_register = LAST_REG(DAC_INPUT_DATA_CLK_SEL),
|
.max_register = LAST_REG(DAC_INPUT_DATA_CLK_SEL),
|
||||||
.writeable_reg = tegra20_das_wr_rd_reg,
|
.writeable_reg = tegra20_das_wr_rd_reg,
|
||||||
.readable_reg = tegra20_das_wr_rd_reg,
|
.readable_reg = tegra20_das_wr_rd_reg,
|
||||||
.cache_type = REGCACHE_RBTREE,
|
.cache_type = REGCACHE_FLAT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int tegra20_das_probe(struct platform_device *pdev)
|
static int tegra20_das_probe(struct platform_device *pdev)
|
||||||
|
|
|
@ -333,7 +333,7 @@ static const struct regmap_config tegra20_i2s_regmap_config = {
|
||||||
.readable_reg = tegra20_i2s_wr_rd_reg,
|
.readable_reg = tegra20_i2s_wr_rd_reg,
|
||||||
.volatile_reg = tegra20_i2s_volatile_reg,
|
.volatile_reg = tegra20_i2s_volatile_reg,
|
||||||
.precious_reg = tegra20_i2s_precious_reg,
|
.precious_reg = tegra20_i2s_precious_reg,
|
||||||
.cache_type = REGCACHE_RBTREE,
|
.cache_type = REGCACHE_FLAT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int tegra20_i2s_platform_probe(struct platform_device *pdev)
|
static int tegra20_i2s_platform_probe(struct platform_device *pdev)
|
||||||
|
|
|
@ -259,7 +259,7 @@ static const struct regmap_config tegra20_spdif_regmap_config = {
|
||||||
.readable_reg = tegra20_spdif_wr_rd_reg,
|
.readable_reg = tegra20_spdif_wr_rd_reg,
|
||||||
.volatile_reg = tegra20_spdif_volatile_reg,
|
.volatile_reg = tegra20_spdif_volatile_reg,
|
||||||
.precious_reg = tegra20_spdif_precious_reg,
|
.precious_reg = tegra20_spdif_precious_reg,
|
||||||
.cache_type = REGCACHE_RBTREE,
|
.cache_type = REGCACHE_FLAT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int tegra20_spdif_platform_probe(struct platform_device *pdev)
|
static int tegra20_spdif_platform_probe(struct platform_device *pdev)
|
||||||
|
|
|
@ -471,7 +471,7 @@ static const struct regmap_config tegra30_ahub_apbif_regmap_config = {
|
||||||
.readable_reg = tegra30_ahub_apbif_wr_rd_reg,
|
.readable_reg = tegra30_ahub_apbif_wr_rd_reg,
|
||||||
.volatile_reg = tegra30_ahub_apbif_volatile_reg,
|
.volatile_reg = tegra30_ahub_apbif_volatile_reg,
|
||||||
.precious_reg = tegra30_ahub_apbif_precious_reg,
|
.precious_reg = tegra30_ahub_apbif_precious_reg,
|
||||||
.cache_type = REGCACHE_RBTREE,
|
.cache_type = REGCACHE_FLAT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool tegra30_ahub_ahub_wr_rd_reg(struct device *dev, unsigned int reg)
|
static bool tegra30_ahub_ahub_wr_rd_reg(struct device *dev, unsigned int reg)
|
||||||
|
@ -490,7 +490,7 @@ static const struct regmap_config tegra30_ahub_ahub_regmap_config = {
|
||||||
.max_register = LAST_REG(AUDIO_RX),
|
.max_register = LAST_REG(AUDIO_RX),
|
||||||
.writeable_reg = tegra30_ahub_ahub_wr_rd_reg,
|
.writeable_reg = tegra30_ahub_ahub_wr_rd_reg,
|
||||||
.readable_reg = tegra30_ahub_ahub_wr_rd_reg,
|
.readable_reg = tegra30_ahub_ahub_wr_rd_reg,
|
||||||
.cache_type = REGCACHE_RBTREE,
|
.cache_type = REGCACHE_FLAT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct tegra30_ahub_soc_data soc_data_tegra30 = {
|
static struct tegra30_ahub_soc_data soc_data_tegra30 = {
|
||||||
|
|
|
@ -357,7 +357,7 @@ static const struct regmap_config tegra30_i2s_regmap_config = {
|
||||||
.writeable_reg = tegra30_i2s_wr_rd_reg,
|
.writeable_reg = tegra30_i2s_wr_rd_reg,
|
||||||
.readable_reg = tegra30_i2s_wr_rd_reg,
|
.readable_reg = tegra30_i2s_wr_rd_reg,
|
||||||
.volatile_reg = tegra30_i2s_volatile_reg,
|
.volatile_reg = tegra30_i2s_volatile_reg,
|
||||||
.cache_type = REGCACHE_RBTREE,
|
.cache_type = REGCACHE_FLAT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct tegra30_i2s_soc_data tegra30_i2s_config = {
|
static const struct tegra30_i2s_soc_data tegra30_i2s_config = {
|
||||||
|
|
Loading…
Reference in New Issue