diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2018-09-27 11:53:36 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:50:43 +0800 |
commit | b554454f67c64cd483897559d67ceaad5cb09a13 (patch) | |
tree | 7d1f84e769fcb6b881e423f82f7980b801b0d06e /sound/soc/fsl/imx-wm8958.c | |
parent | 6f0dea3aa0608b8b4f3ff3deea7e5e9b35c34c49 (diff) |
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 f63e8581e277 ("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>
Diffstat (limited to 'sound/soc/fsl/imx-wm8958.c')
-rw-r--r-- | sound/soc/fsl/imx-wm8958.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/sound/soc/fsl/imx-wm8958.c b/sound/soc/fsl/imx-wm8958.c index a8343d1cbc21..210f6662eb09 100644 --- a/sound/soc/fsl/imx-wm8958.c +++ b/sound/soc/fsl/imx-wm8958.c @@ -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)) { |