Skip to contentSkip to conversation

ALSA: HDA: Realtek: Fixup jack detection to input subsystem

PATCH In review David Henningsson 2 participants 2 messages Feb 28, 2011 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: HDA: Realtek: Fixup jack detection to input subsystem

Signature · 3 lines
-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
Quoted 1 line

From 70f1b37d58c9c6322bb84368c9da299bfe2b0c57 Mon Sep 17 00:00:00 2001

From: David Henningsson <[email protected]>
Date: Mon, 28 Feb 2011 15:58:07 +0100
Subject: [PATCH] ALSA: HDA: Realtek: Fixup jack detection to input subsystem

This patch fixes an error in the jack detection reporting, causing the jack detection sometimes not to be reported correctly to the input subsystem. It should apply to several Realtek codecs.

---
 sound/pci/hda/patch_realtek.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
sound/pci/hda/patch_realtek.c +2 -5
index 3328a25..c052fc5 100644
@@ -1133,11 +1133,8 @@ static void alc_automute_speaker(struct hda_codec *codec, int pinctl)
 		nid = spec->autocfg.hp_pins[i];
 		if (!nid)
 			break;
-		if (snd_hda_jack_detect(codec, nid)) {
-			spec->jack_present = 1;
-			break;
-		}
-		alc_report_jack(codec, spec->autocfg.hp_pins[i]);
+		alc_report_jack(codec, nid);
+		spec->jack_present |= snd_hda_jack_detect(codec, nid);
 	}
 
 	mute = spec->jack_present ? HDA_AMP_MUTE : 0;
Signature · 1 line
1.7.1

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

At Mon, 28 Feb 2011 16:07:20 +0100,

Quoted 6 lines · David Henningsson
Quoted 2 lines

From 70f1b37d58c9c6322bb84368c9da299bfe2b0c57 Mon Sep 17 00:00:00 2001

From: David Henningsson <[email protected]>
Date: Mon, 28 Feb 2011 15:58:07 +0100
Subject: [PATCH] ALSA: HDA: Realtek: Fixup jack detection to input subsystem

Quoted 7 lines

This patch fixes an error in the jack detection reporting, causing the jack detection sometimes not to be reported correctly to the input subsystem. It should apply to several Realtek codecs.

Applied now. Thanks.

Takashi

Quoted 25 lines
---
 sound/pci/hda/patch_realtek.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
sound/pci/hda/patch_realtek.c +2 -5
index 3328a25..c052fc5 100644
@@ -1133,11 +1133,8 @@ static void alc_automute_speaker(struct hda_codec *codec, int pinctl)
 		nid = spec->autocfg.hp_pins[i];
 		if (!nid)
 			break;
-		if (snd_hda_jack_detect(codec, nid)) {
-			spec->jack_present = 1;
-			break;
-		}
-		alc_report_jack(codec, spec->autocfg.hp_pins[i]);
+		alc_report_jack(codec, nid);
+		spec->jack_present |= snd_hda_jack_detect(codec, nid);
 	}
 
 	mute = spec->jack_present ? HDA_AMP_MUTE : 0;
Signature · 1 line
1.7.1