* [PATCH] ASoC: Declare Headset as Mic and Headphone widgets for SDP3430
@ 2009-03-19 6:07 Lopez Cruz, Misael
2009-03-19 12:01 ` [alsa-devel] " Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Lopez Cruz, Misael @ 2009-03-19 6:07 UTC (permalink / raw)
To: alsa-devel; +Cc: linux-omap, Mark Brown
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 <x0052729@ti.com>
---
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");
--
1.5.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [alsa-devel] [PATCH] ASoC: Declare Headset as Mic and Headphone widgets for SDP3430
2009-03-19 6:07 [PATCH] ASoC: Declare Headset as Mic and Headphone widgets for SDP3430 Lopez Cruz, Misael
@ 2009-03-19 12:01 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2009-03-19 12:01 UTC (permalink / raw)
To: Lopez Cruz, Misael; +Cc: alsa-devel, linux-omap
On Thu, Mar 19, 2009 at 01:07:34AM -0500, Lopez Cruz, Misael wrote:
> 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.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-19 12:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-19 6:07 [PATCH] ASoC: Declare Headset as Mic and Headphone widgets for SDP3430 Lopez Cruz, Misael
2009-03-19 12:01 ` [alsa-devel] " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).