diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2018-09-27 11:52:58 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:50:42 +0800 |
commit | 6f0dea3aa0608b8b4f3ff3deea7e5e9b35c34c49 (patch) | |
tree | 548793d2450f0595ded846cc3267c10e693ec8c4 /sound/soc/fsl/imx-wm8962.c | |
parent | 56474acf4b52797ee044fc753540824fe6aaf7ba (diff) |
MLK-19733-2: ASoC: imx-wm8962: 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_wm8962_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-wm8962.c')
-rw-r--r-- | sound/soc/fsl/imx-wm8962.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c index e32a4934e0ae..3bdac06f5563 100644 --- a/sound/soc/fsl/imx-wm8962.c +++ b/sound/soc/fsl/imx-wm8962.c @@ -54,8 +54,6 @@ struct imx_priv { struct platform_device *pdev; struct snd_pcm_substream *first_stream; struct snd_pcm_substream *second_stream; - struct snd_kcontrol *headphone_kctl; - struct snd_card *snd_card; struct platform_device *asrc_pdev; u32 asrc_rate; u32 asrc_format; @@ -117,12 +115,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"; @@ -777,12 +773,6 @@ audmux_bypass: 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; - imx_wm8962_gpio_init(&data->card); if (gpio_is_valid(priv->hp_gpio)) { |