diff options
author | Ke Qinghua <qinghua.ke@freescale.com> | 2014-02-24 12:01:36 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-21 22:35:39 -0500 |
commit | dd7e1d1454fb2f8cb520be29cf43271ef5a116ee (patch) | |
tree | 9c44f3727143d2790f965d006a66b39c37c785c2 /sound | |
parent | a480b1442153d87eb6ae27cf250b9d61a0f15b8b (diff) |
ENGR00300008-1 Update touch screen, backlight video,sound driver for android linux kernel 3.10
Update sound driver for android linux 3.10 kernel
Signed-off-by: Ke Qinghua <qinghua.ke@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/fsl/imx-wm8962.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c index 66cb2df64032..9a143b538154 100644 --- a/sound/soc/fsl/imx-wm8962.c +++ b/sound/soc/fsl/imx-wm8962.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 Freescale Semiconductor, Inc. + * Copyright (C) 2013-2014 Freescale Semiconductor, Inc. * * Based on imx-sgtl5000.c * Copyright (C) 2012 Freescale Semiconductor, Inc. @@ -20,6 +20,7 @@ #include <linux/slab.h> #include <linux/gpio.h> #include <linux/clk.h> +#include <linux/switch.h> #include <sound/soc.h> #include <sound/jack.h> #include <sound/control.h> @@ -104,11 +105,13 @@ static int hpjack_status_check(void) if (hp_status != priv->hp_active_low) { snprintf(buf, 32, "STATE=%d", 2); + switch_set_state(&priv->sdev, 2); snd_soc_dapm_disable_pin(&priv->codec->dapm, "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); + switch_set_state(&priv->sdev, 0); snd_soc_dapm_enable_pin(&priv->codec->dapm, "Ext Spk"); ret = 0; snd_kctl_jack_report(priv->snd_card, priv->headphone_kctl, 0); @@ -517,6 +520,13 @@ audmux_bypass: platform_set_drvdata(pdev, &data->card); snd_soc_card_set_drvdata(&data->card, data); + priv->sdev.name = "h2w"; + ret = switch_dev_register(&priv->sdev); + if (ret < 0) { + ret = -EINVAL; + goto fail; + } + ret = snd_soc_register_card(&data->card); if (ret) { dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); @@ -565,11 +575,13 @@ fail: static int imx_wm8962_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); + struct imx_priv *priv = &card_priv; driver_remove_file(pdev->dev.driver, &driver_attr_microphone); driver_remove_file(pdev->dev.driver, &driver_attr_headphone); snd_soc_unregister_card(card); + switch_dev_unregister(&priv->sdev); return 0; } |