Merge remote-tracking branches 'asoc/fix/rt5677', 'asoc/fix/simple', 'asoc/fix/ts3a227e', 'asoc/fix/wm8904' and 'asoc/fix/wm8960' into asoc-linus
This commit is contained in:
commit
88343ee38d
5 changed files with 39 additions and 17 deletions
|
@ -2083,10 +2083,14 @@ static int rt5677_set_pll1_event(struct snd_soc_dapm_widget *w,
|
|||
struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
switch (event) {
|
||||
case SND_SOC_DAPM_POST_PMU:
|
||||
case SND_SOC_DAPM_PRE_PMU:
|
||||
regmap_update_bits(rt5677->regmap, RT5677_PLL1_CTRL2, 0x2, 0x2);
|
||||
break;
|
||||
|
||||
case SND_SOC_DAPM_POST_PMU:
|
||||
regmap_update_bits(rt5677->regmap, RT5677_PLL1_CTRL2, 0x2, 0x0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -2101,10 +2105,14 @@ static int rt5677_set_pll2_event(struct snd_soc_dapm_widget *w,
|
|||
struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
switch (event) {
|
||||
case SND_SOC_DAPM_POST_PMU:
|
||||
case SND_SOC_DAPM_PRE_PMU:
|
||||
regmap_update_bits(rt5677->regmap, RT5677_PLL2_CTRL2, 0x2, 0x2);
|
||||
break;
|
||||
|
||||
case SND_SOC_DAPM_POST_PMU:
|
||||
regmap_update_bits(rt5677->regmap, RT5677_PLL2_CTRL2, 0x2, 0x0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -2212,9 +2220,11 @@ static int rt5677_vref_event(struct snd_soc_dapm_widget *w,
|
|||
|
||||
static const struct snd_soc_dapm_widget rt5677_dapm_widgets[] = {
|
||||
SND_SOC_DAPM_SUPPLY("PLL1", RT5677_PWR_ANLG2, RT5677_PWR_PLL1_BIT,
|
||||
0, rt5677_set_pll1_event, SND_SOC_DAPM_POST_PMU),
|
||||
0, rt5677_set_pll1_event, SND_SOC_DAPM_PRE_PMU |
|
||||
SND_SOC_DAPM_POST_PMU),
|
||||
SND_SOC_DAPM_SUPPLY("PLL2", RT5677_PWR_ANLG2, RT5677_PWR_PLL2_BIT,
|
||||
0, rt5677_set_pll2_event, SND_SOC_DAPM_POST_PMU),
|
||||
0, rt5677_set_pll2_event, SND_SOC_DAPM_PRE_PMU |
|
||||
SND_SOC_DAPM_POST_PMU),
|
||||
|
||||
/* Input Side */
|
||||
/* micbias */
|
||||
|
|
|
@ -254,6 +254,7 @@ static int ts3a227e_i2c_probe(struct i2c_client *i2c,
|
|||
struct ts3a227e *ts3a227e;
|
||||
struct device *dev = &i2c->dev;
|
||||
int ret;
|
||||
unsigned int acc_reg;
|
||||
|
||||
ts3a227e = devm_kzalloc(&i2c->dev, sizeof(*ts3a227e), GFP_KERNEL);
|
||||
if (ts3a227e == NULL)
|
||||
|
@ -283,6 +284,11 @@ static int ts3a227e_i2c_probe(struct i2c_client *i2c,
|
|||
INTB_DISABLE | ADC_COMPLETE_INT_DISABLE,
|
||||
ADC_COMPLETE_INT_DISABLE);
|
||||
|
||||
/* Read jack status because chip might not trigger interrupt at boot. */
|
||||
regmap_read(ts3a227e->regmap, TS3A227E_REG_ACCESSORY_STATUS, &acc_reg);
|
||||
ts3a227e_new_jack_state(ts3a227e, acc_reg);
|
||||
ts3a227e_jack_report(ts3a227e);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1076,10 +1076,13 @@ static const struct snd_soc_dapm_route adc_intercon[] = {
|
|||
{ "Right Capture PGA", NULL, "Right Capture Mux" },
|
||||
{ "Right Capture PGA", NULL, "Right Capture Inverting Mux" },
|
||||
|
||||
{ "AIFOUTL", "Left", "ADCL" },
|
||||
{ "AIFOUTL", "Right", "ADCR" },
|
||||
{ "AIFOUTR", "Left", "ADCL" },
|
||||
{ "AIFOUTR", "Right", "ADCR" },
|
||||
{ "AIFOUTL Mux", "Left", "ADCL" },
|
||||
{ "AIFOUTL Mux", "Right", "ADCR" },
|
||||
{ "AIFOUTR Mux", "Left", "ADCL" },
|
||||
{ "AIFOUTR Mux", "Right", "ADCR" },
|
||||
|
||||
{ "AIFOUTL", NULL, "AIFOUTL Mux" },
|
||||
{ "AIFOUTR", NULL, "AIFOUTR Mux" },
|
||||
|
||||
{ "ADCL", NULL, "CLK_DSP" },
|
||||
{ "ADCL", NULL, "Left Capture PGA" },
|
||||
|
@ -1089,12 +1092,16 @@ static const struct snd_soc_dapm_route adc_intercon[] = {
|
|||
};
|
||||
|
||||
static const struct snd_soc_dapm_route dac_intercon[] = {
|
||||
{ "DACL", "Right", "AIFINR" },
|
||||
{ "DACL", "Left", "AIFINL" },
|
||||
{ "DACL Mux", "Left", "AIFINL" },
|
||||
{ "DACL Mux", "Right", "AIFINR" },
|
||||
|
||||
{ "DACR Mux", "Left", "AIFINL" },
|
||||
{ "DACR Mux", "Right", "AIFINR" },
|
||||
|
||||
{ "DACL", NULL, "DACL Mux" },
|
||||
{ "DACL", NULL, "CLK_DSP" },
|
||||
|
||||
{ "DACR", "Right", "AIFINR" },
|
||||
{ "DACR", "Left", "AIFINL" },
|
||||
{ "DACR", NULL, "DACR Mux" },
|
||||
{ "DACR", NULL, "CLK_DSP" },
|
||||
|
||||
{ "Charge pump", NULL, "SYSCLK" },
|
||||
|
|
|
@ -556,7 +556,7 @@ static struct {
|
|||
{ 22050, 2 },
|
||||
{ 24000, 2 },
|
||||
{ 16000, 3 },
|
||||
{ 11250, 4 },
|
||||
{ 11025, 4 },
|
||||
{ 12000, 4 },
|
||||
{ 8000, 5 },
|
||||
};
|
||||
|
|
|
@ -452,9 +452,8 @@ static int asoc_simple_card_parse_of(struct device_node *node,
|
|||
}
|
||||
|
||||
/* Decrease the reference count of the device nodes */
|
||||
static int asoc_simple_card_unref(struct platform_device *pdev)
|
||||
static int asoc_simple_card_unref(struct snd_soc_card *card)
|
||||
{
|
||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
||||
struct snd_soc_dai_link *dai_link;
|
||||
int num_links;
|
||||
|
||||
|
@ -556,7 +555,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
|
||||
err:
|
||||
asoc_simple_card_unref(pdev);
|
||||
asoc_simple_card_unref(&priv->snd_card);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -572,7 +571,7 @@ static int asoc_simple_card_remove(struct platform_device *pdev)
|
|||
snd_soc_jack_free_gpios(&simple_card_mic_jack, 1,
|
||||
&simple_card_mic_jack_gpio);
|
||||
|
||||
return asoc_simple_card_unref(pdev);
|
||||
return asoc_simple_card_unref(card);
|
||||
}
|
||||
|
||||
static const struct of_device_id asoc_simple_of_match[] = {
|
||||
|
|
Loading…
Reference in a new issue