[alsa-devel] Regression post-ALSA 1.0.22 for Lenovo G555 Internal mic

Takashi Iwai tiwai at suse.de
Tue May 24 11:38:40 CEST 2011


At Mon, 23 May 2011 23:24:48 +0100,
Roo - Andrew Baines wrote:
> 
> With the latest snapshot, the mic does not work still.

Hrm OK, could you give alsa-info.sh output again?

> What has also changed from the previous snapshot provided is that when the
> headphones are plugged in, no sound comes through the headphones, but still
> through the speakers - before it came through both.

Weird, there is no change regarding this since the last time.
It looks like something is unstable with jack-sensing.

> I have attached a verbose pulse log of about 15 seconds when i plugged in
> and unplugged my headphones - I couldnt work out how to do an ALSA one.

Don't use PulseAudio for the primary testing.  Use alsa-native, e.g.
"arecord -Dplughw -vv foo.wav".  You can avoid PA by wrapping with
pasuspender.

	% pasuspender arecord -Dplughw -vv foo.wav

Also, try the patch below on alsa-driver/alsa-kernel directory with
patch -p2 option.  This will give a few debug prints.  See "XXX ..."
kernel messages at initialization and upon plugging/unplugging HP/mic
jacks.


thanks,

Takashi

---
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index e8dc736..1095bbb 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3484,11 +3484,16 @@ static void cx_auto_update_speakers(struct hda_codec *codec)
 	struct auto_pin_cfg *cfg = &spec->autocfg;
 	int on;
 
+	printk("XXX cx_auto_update_speakers: auto_mute=%d, hp_present=%d, line_present=%d\n", spec->auto_mute, spec->hp_present, spec->line_present);
 	if (!spec->auto_mute)
-		on = 0;
+		on = 1;
 	else
-		on = spec->hp_present | spec->line_present;
+		on = spec->hp_present;
 	cx_auto_turn_eapd(codec, cfg->hp_outs, cfg->hp_pins, on);
+	if (!spec->auto_mute)
+		on = 0;
+	else
+		on |= spec->detect_line && spec->line_present;
 	do_automute(codec, cfg->speaker_outs, cfg->speaker_pins, !on);
 
 	/* toggle line-out mutes if needed, too */
@@ -3508,6 +3513,7 @@ static void cx_auto_hp_automute(struct hda_codec *codec)
 	struct conexant_spec *spec = codec->spec;
 	struct auto_pin_cfg *cfg = &spec->autocfg;
 
+	printk("XXX cx_auto_hp_automute\n");
 	if (!spec->auto_mute)
 		return;
 	spec->hp_present = detect_jacks(codec, cfg->hp_outs, cfg->hp_pins);
@@ -3519,6 +3525,7 @@ static void cx_auto_line_automute(struct hda_codec *codec)
 	struct conexant_spec *spec = codec->spec;
 	struct auto_pin_cfg *cfg = &spec->autocfg;
 
+	printk("XXX cx_auto_line_automute\n");
 	if (!spec->auto_mute || !spec->detect_line)
 		return;
 	spec->line_present = detect_jacks(codec, cfg->line_outs,
@@ -3703,6 +3710,8 @@ static int cx_auto_mux_enum_update(struct hda_codec *codec,
 		return 0;
 	if (idx >= imux->num_items)
 		idx = imux->num_items - 1;
+	printk("XXX cx_auto_mux_enum_update idx=%d, adc=%x, pin=%x\n",
+	       idx, spec->imux_info[idx].adc, spec->imux_info[idx].pin);
 	if (spec->cur_mux[0] == idx)
 		changed = 0;
 	adc = spec->imux_info[idx].adc;
@@ -3757,6 +3766,7 @@ static void cx_auto_automic(struct hda_codec *codec)
 {
 	struct conexant_spec *spec = codec->spec;
 
+	printk("XXX cx_auto_automic\n");
 	if (!spec->auto_mic)
 		return;
 	if (!select_automic(codec, spec->auto_mic_ext, true))


More information about the Alsa-devel mailing list