* [PATCH 2/6] ASoC: Intel: byt-max98090: Fix mic detect GPIO polarity
2014-06-23 13:29 [PATCH 1/6] ASoC: Intel: byt-max98090: Move MICBIAS widget to supply of Headset Mic Jarkko Nikula
@ 2014-06-23 13:29 ` Jarkko Nikula
2014-06-23 13:29 ` [PATCH 3/6] ASoC: Intel: byt-max98090: Do not report SND_JACK_LINEIN Jarkko Nikula
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jarkko Nikula @ 2014-06-23 13:29 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Jarkko Nikula, Liam Girdwood, Kevin Strasser
Mic detect GPIO is active low when headset microphone is detected. Found
both by debugging and checking the schematics.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
sound/soc/intel/byt-max98090.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/intel/byt-max98090.c b/sound/soc/intel/byt-max98090.c
index a3c5f02a60fc..3d06440278ec 100644
--- a/sound/soc/intel/byt-max98090.c
+++ b/sound/soc/intel/byt-max98090.c
@@ -83,6 +83,7 @@ static struct snd_soc_jack_gpio hs_jack_gpios[] = {
{
.name = "mic-gpio",
.idx = 1,
+ .invert = 1,
.report = SND_JACK_MICROPHONE | SND_JACK_LINEIN,
.debounce_time = 200,
},
--
2.0.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 3/6] ASoC: Intel: byt-max98090: Do not report SND_JACK_LINEIN
2014-06-23 13:29 [PATCH 1/6] ASoC: Intel: byt-max98090: Move MICBIAS widget to supply of Headset Mic Jarkko Nikula
2014-06-23 13:29 ` [PATCH 2/6] ASoC: Intel: byt-max98090: Fix mic detect GPIO polarity Jarkko Nikula
@ 2014-06-23 13:29 ` Jarkko Nikula
2014-06-23 13:29 ` [PATCH 4/6] ASoC: Intel: byt-max98090: Fix jack type in order to report correctly Jarkko Nikula
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jarkko Nikula @ 2014-06-23 13:29 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Jarkko Nikula, Liam Girdwood, Kevin Strasser
Headset jack has only mono microphone input.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
sound/soc/intel/byt-max98090.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/byt-max98090.c b/sound/soc/intel/byt-max98090.c
index 3d06440278ec..165ab6d6c4a3 100644
--- a/sound/soc/intel/byt-max98090.c
+++ b/sound/soc/intel/byt-max98090.c
@@ -84,7 +84,7 @@ static struct snd_soc_jack_gpio hs_jack_gpios[] = {
.name = "mic-gpio",
.idx = 1,
.invert = 1,
- .report = SND_JACK_MICROPHONE | SND_JACK_LINEIN,
+ .report = SND_JACK_MICROPHONE,
.debounce_time = 200,
},
};
--
2.0.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 4/6] ASoC: Intel: byt-max98090: Fix jack type in order to report correctly
2014-06-23 13:29 [PATCH 1/6] ASoC: Intel: byt-max98090: Move MICBIAS widget to supply of Headset Mic Jarkko Nikula
2014-06-23 13:29 ` [PATCH 2/6] ASoC: Intel: byt-max98090: Fix mic detect GPIO polarity Jarkko Nikula
2014-06-23 13:29 ` [PATCH 3/6] ASoC: Intel: byt-max98090: Do not report SND_JACK_LINEIN Jarkko Nikula
@ 2014-06-23 13:29 ` Jarkko Nikula
2014-06-23 13:29 ` [PATCH 5/6] ASoC: Intel: byt-max98090: Do not change speaker and DMIC with jack state Jarkko Nikula
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jarkko Nikula @ 2014-06-23 13:29 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Jarkko Nikula, Liam Girdwood, Kevin Strasser
Pass actual jack type bitmask to snd_soc_jack_new() in order to report
also microphone detections and not only headphone. While at it change also
jack name and pass also SND_JACK_LINEOUT type.
Reported-by: Jin Yao <yao.jin@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
sound/soc/intel/byt-max98090.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/byt-max98090.c b/sound/soc/intel/byt-max98090.c
index 165ab6d6c4a3..3e2e7152ae66 100644
--- a/sound/soc/intel/byt-max98090.c
+++ b/sound/soc/intel/byt-max98090.c
@@ -108,7 +108,8 @@ static int byt_max98090_init(struct snd_soc_pcm_runtime *runtime)
}
/* Enable jack detection */
- ret = snd_soc_jack_new(codec, "Headphone", SND_JACK_HEADPHONE, jack);
+ ret = snd_soc_jack_new(codec, "Headset",
+ SND_JACK_LINEOUT | SND_JACK_HEADSET, jack);
if (ret)
return ret;
--
2.0.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 5/6] ASoC: Intel: byt-max98090: Do not change speaker and DMIC with jack state
2014-06-23 13:29 [PATCH 1/6] ASoC: Intel: byt-max98090: Move MICBIAS widget to supply of Headset Mic Jarkko Nikula
` (2 preceding siblings ...)
2014-06-23 13:29 ` [PATCH 4/6] ASoC: Intel: byt-max98090: Fix jack type in order to report correctly Jarkko Nikula
@ 2014-06-23 13:29 ` Jarkko Nikula
2014-06-23 13:29 ` [PATCH 6/6] ASoC: Intel: byt-max98090: Do not enable MAX98090 microphone detection Jarkko Nikula
2014-06-24 15:21 ` [PATCH 1/6] ASoC: Intel: byt-max98090: Move MICBIAS widget to supply of Headset Mic Mark Brown
5 siblings, 0 replies; 7+ messages in thread
From: Jarkko Nikula @ 2014-06-23 13:29 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Jarkko Nikula, Liam Girdwood, Kevin Strasser
Kernel should not enable/disable speakers and digital microphone whenever
jack is inserted/removed. This is more use-case than kernel specific
decision. For instance one may want to play VoIP ring tones using both
speakers and headphone but play music only from one of them.
Because of above reason remove "Ext Spk" and "Int Mic" update when jack
state is changed. Also this update was illogical anyway: "Ext Spk" was
enabled when jack was inserted and disabled when jack was removed.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
sound/soc/intel/byt-max98090.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/sound/soc/intel/byt-max98090.c b/sound/soc/intel/byt-max98090.c
index 3e2e7152ae66..deb1db9a9a97 100644
--- a/sound/soc/intel/byt-max98090.c
+++ b/sound/soc/intel/byt-max98090.c
@@ -63,14 +63,6 @@ static struct snd_soc_jack_pin hs_jack_pins[] = {
.pin = "Headset Mic",
.mask = SND_JACK_MICROPHONE,
},
- {
- .pin = "Ext Spk",
- .mask = SND_JACK_LINEOUT,
- },
- {
- .pin = "Int Mic",
- .mask = SND_JACK_LINEIN,
- },
};
static struct snd_soc_jack_gpio hs_jack_gpios[] = {
--
2.0.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 6/6] ASoC: Intel: byt-max98090: Do not enable MAX98090 microphone detection
2014-06-23 13:29 [PATCH 1/6] ASoC: Intel: byt-max98090: Move MICBIAS widget to supply of Headset Mic Jarkko Nikula
` (3 preceding siblings ...)
2014-06-23 13:29 ` [PATCH 5/6] ASoC: Intel: byt-max98090: Do not change speaker and DMIC with jack state Jarkko Nikula
@ 2014-06-23 13:29 ` Jarkko Nikula
2014-06-24 15:21 ` [PATCH 1/6] ASoC: Intel: byt-max98090: Move MICBIAS widget to supply of Headset Mic Mark Brown
5 siblings, 0 replies; 7+ messages in thread
From: Jarkko Nikula @ 2014-06-23 13:29 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Jarkko Nikula, Liam Girdwood, Kevin Strasser
It turned out there is no need to enable microphone detection in MAX98090
codec. Headset microphone is anyway detected by a GPIO signal from another
chip and headset button presses cannot be detected either because a signal
needed for it is not connected.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
sound/soc/intel/byt-max98090.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/sound/soc/intel/byt-max98090.c b/sound/soc/intel/byt-max98090.c
index deb1db9a9a97..b8b8af571ef1 100644
--- a/sound/soc/intel/byt-max98090.c
+++ b/sound/soc/intel/byt-max98090.c
@@ -110,13 +110,9 @@ static int byt_max98090_init(struct snd_soc_pcm_runtime *runtime)
if (ret)
return ret;
- ret = snd_soc_jack_add_gpiods(card->dev->parent, jack,
- ARRAY_SIZE(hs_jack_gpios),
- hs_jack_gpios);
- if (ret)
- return ret;
-
- return max98090_mic_detect(codec, jack);
+ return snd_soc_jack_add_gpiods(card->dev->parent, jack,
+ ARRAY_SIZE(hs_jack_gpios),
+ hs_jack_gpios);
}
static struct snd_soc_dai_link byt_max98090_dais[] = {
--
2.0.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/6] ASoC: Intel: byt-max98090: Move MICBIAS widget to supply of Headset Mic
2014-06-23 13:29 [PATCH 1/6] ASoC: Intel: byt-max98090: Move MICBIAS widget to supply of Headset Mic Jarkko Nikula
` (4 preceding siblings ...)
2014-06-23 13:29 ` [PATCH 6/6] ASoC: Intel: byt-max98090: Do not enable MAX98090 microphone detection Jarkko Nikula
@ 2014-06-24 15:21 ` Mark Brown
5 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2014-06-24 15:21 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel, Liam Girdwood, Kevin Strasser
[-- Attachment #1.1: Type: text/plain, Size: 206 bytes --]
On Mon, Jun 23, 2014 at 04:29:37PM +0300, Jarkko Nikula wrote:
> Move "MICBIAS" as a supply widget to "Headset Mic" instead of keeping it
> between input pin "IN34" and "Headset Mic".
Applied all, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread