Signed-off-by: Lu Guanqun guanqun.lu@intel.com --- sound/soc/mid-x86/mrst_machine.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/sound/soc/mid-x86/mrst_machine.c b/sound/soc/mid-x86/mrst_machine.c index b4d542e..d70b26e 100644 --- a/sound/soc/mid-x86/mrst_machine.c +++ b/sound/soc/mid-x86/mrst_machine.c @@ -39,6 +39,9 @@ static const struct snd_kcontrol_new mrst_snd_controls[] = { SOC_DAPM_PIN_SWITCH("Headphone"), SOC_DAPM_PIN_SWITCH("Speaker"), + + SOC_DAPM_PIN_SWITCH("Headset MIC"), + SOC_DAPM_PIN_SWITCH("Internal MIC"), };
/* @@ -59,6 +62,9 @@ static int mrst_speaker_event(struct snd_soc_dapm_widget *widget, static const struct snd_soc_dapm_widget mrst_audio_widgets[] = { SND_SOC_DAPM_HP("Headphone", NULL), SND_SOC_DAPM_SPK("Speaker", mrst_speaker_event), + + SND_SOC_DAPM_MIC("Headset MIC", NULL), + SND_SOC_DAPM_MIC("Internal MIC", NULL), };
static const struct snd_soc_dapm_route mrst_audio_map[] = { @@ -70,6 +76,9 @@ static const struct snd_soc_dapm_route mrst_audio_map[] = {
{"Speaker", NULL, "PREOUTL"}, {"Speaker", NULL, "PREOUTR"}, + + {"MIC2", NULL, "Headset MIC"}, + {"DMICDAT", NULL, "Internal MIC"}, };
static int mrst_audio_init(struct snd_soc_pcm_runtime *runtime) @@ -104,6 +113,9 @@ static int mrst_audio_init(struct snd_soc_pcm_runtime *runtime) snd_soc_dapm_disable_pin(dapm, "Headphone"); snd_soc_dapm_enable_pin(dapm, "Speaker");
+ snd_soc_dapm_disable_pin(dapm, "Headset MIC"); + snd_soc_dapm_enable_pin(dapm, "Internal MIC"); + snd_soc_dapm_sync(dapm);
return 0;