1
0
Fork 0

MLK-19733-3: ASoC: imx-wm8958: Remove duplicate jack kcontrol

We first add the jack kcontrol in commit c2c7959e3af3 ("MLK-11479-09
pulseaudio5.0 mute Headphone volume when Headphone plugged")

After that there is change in kernel by commit f63e8581e2 ("ASoC: jack:
create kctls according to jack pins info"), the jack kcontrol will be
created with snd_soc_jack_add_pins.

So our change for jack kcontrol in machine driver is not need now, for
driver already call imx_wm8958_gpio_init -> snd_soc_card_jack_new ->
snd_soc_jack_add_pins. otherwise the jack kcontrol will be created twice.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
pull/10/head
Shengjiu Wang 2018-09-27 11:53:36 +08:00 committed by Jason Liu
parent b34a7d269a
commit 3e0cf4ff75
1 changed files with 0 additions and 11 deletions

View File

@ -46,8 +46,6 @@ struct imx_priv {
int hp_active_low;
struct snd_soc_codec *codec;
struct platform_device *pdev;
struct snd_kcontrol *headphone_kctl;
struct snd_card *snd_card;
};
static struct imx_priv card_priv;
@ -89,12 +87,10 @@ static int hpjack_status_check(void *data)
snprintf(buf, 32, "STATE=%d", 2);
snd_soc_dapm_disable_pin(snd_soc_codec_get_dapm(priv->codec), "Ext Spk");
ret = imx_hp_jack_gpio.report;
snd_kctl_jack_report(priv->snd_card, priv->headphone_kctl, 1);
} else {
snprintf(buf, 32, "STATE=%d", 0);
snd_soc_dapm_enable_pin(snd_soc_codec_get_dapm(priv->codec), "Ext Spk");
ret = 0;
snd_kctl_jack_report(priv->snd_card, priv->headphone_kctl, 0);
}
envp[0] = "NAME=headphone";
@ -529,13 +525,6 @@ static int imx_wm8958_probe(struct platform_device *pdev)
goto fail;
}
priv->snd_card = data->card.snd_card;
priv->headphone_kctl = snd_kctl_jack_new("Headphone", NULL);
ret = snd_ctl_add(data->card.snd_card, priv->headphone_kctl);
if (ret)
goto fail;
ret = imx_wm8958_gpio_init(&data->card);
if (gpio_is_valid(priv->hp_gpio)) {