asoc: tegra: cs42l73: Add earpiece DAPM support
Rahul Mittal [Wed, 12 Dec 2012 14:27:03 +0000 (19:27 +0530)]
Add DAPM widget and audio map for earpiece
Bug 1179527

Change-Id: I27b588e21bb9beb0bf58966195ba94615c907f3e
Signed-off-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-on: http://git-master/r/170511
(cherry picked from commit 6a83f7effeebb9f43aa1deef10f79911ee36ca1c)
Reviewed-on: http://git-master/r/172829
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

sound/soc/tegra/tegra_cs42l73.c

index e8d9a62..efd7174 100644 (file)
@@ -1012,6 +1012,7 @@ static int tegra_cs42l73_event_ext_mic(struct snd_soc_dapm_widget *w,
 static const struct snd_soc_dapm_widget tegra_cs42l73_dapm_widgets[] = {
        SND_SOC_DAPM_SPK("Int Spk", tegra_cs42l73_event_int_spk),
        SND_SOC_DAPM_HP("Headphone", NULL),
+       SND_SOC_DAPM_HP("Earpiece", NULL),
        SND_SOC_DAPM_MIC("Headset Mic", tegra_cs42l73_event_ext_mic),
        SND_SOC_DAPM_MIC("Int D-Mic", tegra_cs42l73_event_int_mic),
 };
@@ -1021,6 +1022,7 @@ static const struct snd_soc_dapm_route tegra_cs42l73_audio_map[] = {
        {"Int Spk", NULL, "SPKOUT"},
        {"Int Spk", NULL, "SPKLINEOUT"},
        {"Int Spk", NULL, "EAROUT"},
+       {"Earpiece", NULL, "EAROUT"},
        {"MIC2", NULL, "Headset Mic"},
        {"ADC Left", NULL, "Headset Mic"},
        {"ADC Right", NULL, "Headset Mic"},
@@ -1036,6 +1038,7 @@ static const struct snd_kcontrol_new tegra_cs42l73_controls[] = {
        SOC_DAPM_PIN_SWITCH("Int Spk"),
        SOC_DAPM_PIN_SWITCH("Int D-Mic"),
        SOC_DAPM_PIN_SWITCH("Headset Mic"),
+       SOC_DAPM_PIN_SWITCH("Earpiece"),
 };
 
 static int tegra_cs42l73_init(struct snd_soc_pcm_runtime *rtd)