diff options
author | Ravindra Lokhande <rlokhande@nvidia.com> | 2011-08-19 15:57:23 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2011-08-24 23:24:35 -0700 |
commit | ab74fe58d10435a6f0f6dcd6e86513dd611a5474 (patch) | |
tree | 1bd2d7100b9f205ef81bbaa79ae3608bc4176381 /sound/soc | |
parent | a1bba371b5d021ca64360d1a8ef7842adb49d6e1 (diff) |
asoc: tegra: add earpiece support
fixes bug 861141
Change-Id: I3b2d68c3a1d999edce0b228b99c3b633addaedab
Reviewed-on: http://git-master/r/48125
Tested-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/tegra/tegra_soc_max98088.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/soc/tegra/tegra_soc_max98088.c b/sound/soc/tegra/tegra_soc_max98088.c index a64ccdef3965..4c74a5300514 100644 --- a/sound/soc/tegra/tegra_soc_max98088.c +++ b/sound/soc/tegra/tegra_soc_max98088.c @@ -274,7 +274,12 @@ void tegra_ext_control(struct snd_soc_codec *codec, int new_con) else snd_soc_dapm_disable_pin(codec, "Headphone"); - if (new_con & (TEGRA_SPK | TEGRA_EAR_SPK)) + if (new_con & TEGRA_EAR_SPK) + snd_soc_dapm_enable_pin(codec, "Earpiece"); + else + snd_soc_dapm_disable_pin(codec, "Earpiece"); + + if (new_con & TEGRA_SPK) snd_soc_dapm_enable_pin(codec, "Int Spk"); else snd_soc_dapm_disable_pin(codec, "Int Spk"); @@ -305,6 +310,7 @@ void tegra_ext_control(struct snd_soc_codec *codec, int new_con) static const struct snd_soc_dapm_widget tegra_dapm_widgets[] = { SND_SOC_DAPM_HP("Headphone", NULL), SND_SOC_DAPM_HP("Headset Out", NULL), + SND_SOC_DAPM_HP("Earpiece", NULL), SND_SOC_DAPM_MIC("Headset In", NULL), SND_SOC_DAPM_SPK("Int Spk", NULL), SND_SOC_DAPM_MIC("Int Mic", NULL), @@ -328,10 +334,9 @@ static const struct snd_soc_dapm_route audio_map[] = { {"MIC1", NULL, "Int Mic"}, {"MIC1", NULL, "Int Mic"}, - /* - * To be complete, add remained in/out devices such as built-in mic - * and headset mic. - */ + /* Earpiece connected to RECL and RECR */ + {"Earpiece", NULL, "RECL"}, + {"Earpiece", NULL, "RECR"}, }; static int tegra_codec_init(struct snd_soc_codec *codec) |