From patchwork Thu Mar 19 06:07:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lopez Cruz, Misael" X-Patchwork-Id: 13015 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2J68B1u018941 for ; Thu, 19 Mar 2009 06:08:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751012AbZCSGIL (ORCPT ); Thu, 19 Mar 2009 02:08:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752484AbZCSGIK (ORCPT ); Thu, 19 Mar 2009 02:08:10 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:43712 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751012AbZCSGIJ convert rfc822-to-8bit (ORCPT ); Thu, 19 Mar 2009 02:08:09 -0400 Received: from dlep95.itg.ti.com ([157.170.170.107]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id n2J67qSm002092; Thu, 19 Mar 2009 01:07:57 -0500 Received: from dlee75.ent.ti.com (localhost [127.0.0.1]) by dlep95.itg.ti.com (8.13.8/8.13.8) with ESMTP id n2J67qF2020693; Thu, 19 Mar 2009 01:07:52 -0500 (CDT) Received: from dlee07.ent.ti.com ([157.170.170.80]) by dlee75.ent.ti.com ([157.170.170.72]) with mapi; Thu, 19 Mar 2009 01:07:52 -0500 From: "Lopez Cruz, Misael" To: "alsa-devel@alsa-project.org" CC: "linux-omap@vger.kernel.org" , Mark Brown Date: Thu, 19 Mar 2009 01:07:34 -0500 Subject: [PATCH] ASoC: Declare Headset as Mic and Headphone widgets for SDP3430 Thread-Topic: [PATCH] ASoC: Declare Headset as Mic and Headphone widgets for SDP3430 Thread-Index: AcmoWP7kCL4oBVpZQOaXXq13A8Feog== Message-ID: <2C7D3DF36ADFFC479B44490D912B616705ECF95F43@dlee07.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Headset was declared previously as a Headphone widget connecting HSMIC and HSOL/HSOR pins of TWL4030 codec in SDP430 machine driver. The capture path becomes invalid as the Headphone widget is not a valid input endpoint. Instead of that, the Headset is declared as separate Microphone and Headphone widgets. Current patch modifies audio map: - Headset Mic: HSMIC with bias - Headset Stereophone: HSOL, HSOR Signed-off-by: Misael Lopez Cruz --- sound/soc/omap/sdp3430.c | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index 0a41de6..10f1c86 100644 --- a/sound/soc/omap/sdp3430.c +++ b/sound/soc/omap/sdp3430.c @@ -90,8 +90,12 @@ static struct snd_soc_jack hs_jack; /* Headset jack detection DAPM pins */ static struct snd_soc_jack_pin hs_jack_pins[] = { { - .pin = "Headset Jack", - .mask = SND_JACK_HEADSET, + .pin = "Headset Mic", + .mask = SND_JACK_MICROPHONE, + }, + { + .pin = "Headset Stereophone", + .mask = SND_JACK_HEADPHONE, }, }; @@ -109,7 +113,8 @@ static struct snd_soc_jack_gpio hs_jack_gpios[] = { static const struct snd_soc_dapm_widget sdp3430_twl4030_dapm_widgets[] = { SND_SOC_DAPM_MIC("Ext Mic", NULL), SND_SOC_DAPM_SPK("Ext Spk", NULL), - SND_SOC_DAPM_HP("Headset Jack", NULL), + SND_SOC_DAPM_MIC("Headset Mic", NULL), + SND_SOC_DAPM_HP("Headset Stereophone", NULL), }; static const struct snd_soc_dapm_route audio_map[] = { @@ -123,11 +128,13 @@ static const struct snd_soc_dapm_route audio_map[] = { {"Ext Spk", NULL, "HFL"}, {"Ext Spk", NULL, "HFR"}, - /* Headset: HSMIC (with bias), HSOL, HSOR */ - {"Headset Jack", NULL, "HSOL"}, - {"Headset Jack", NULL, "HSOR"}, + /* Headset Mic: HSMIC with bias */ {"HSMIC", NULL, "Headset Mic Bias"}, - {"Headset Mic Bias", NULL, "Headset Jack"}, + {"Headset Mic Bias", NULL, "Headset Mic"}, + + /* Headset Stereophone (Headphone): HSOL, HSOR */ + {"Headset Stereophone", NULL, "HSOL"}, + {"Headset Stereophone", NULL, "HSOR"}, }; static int sdp3430_twl4030_init(struct snd_soc_codec *codec) @@ -146,7 +153,8 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec) /* SDP3430 connected pins */ snd_soc_dapm_enable_pin(codec, "Ext Mic"); snd_soc_dapm_enable_pin(codec, "Ext Spk"); - snd_soc_dapm_disable_pin(codec, "Headset Jack"); + snd_soc_dapm_disable_pin(codec, "Headset Mic"); + snd_soc_dapm_disable_pin(codec, "Headset Stereophone"); /* TWL4030 not connected pins */ snd_soc_dapm_nc_pin(codec, "AUXL");