* [PATCH] ALSA: HDA: Realtek: Fixup jack detection to input subsystem
@ 2011-02-28 15:07 David Henningsson
2011-02-28 15:25 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: David Henningsson @ 2011-02-28 15:07 UTC (permalink / raw)
To: Takashi Iwai, ALSA Development Mailing List
[-- Attachment #1: Type: text/plain, Size: 67 bytes --]
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
[-- Attachment #2: 0001-ALSA-HDA-Realtek-Fixup-jack-detection-to-input-subsy.patch --]
[-- Type: text/x-patch, Size: 1252 bytes --]
>From 70f1b37d58c9c6322bb84368c9da299bfe2b0c57 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
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.
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
sound/pci/hda/patch_realtek.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3328a25..c052fc5 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -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;
--
1.7.1
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: HDA: Realtek: Fixup jack detection to input subsystem
2011-02-28 15:07 [PATCH] ALSA: HDA: Realtek: Fixup jack detection to input subsystem David Henningsson
@ 2011-02-28 15:25 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2011-02-28 15:25 UTC (permalink / raw)
To: David Henningsson; +Cc: ALSA Development Mailing List
At Mon, 28 Feb 2011 16:07:20 +0100,
David Henningsson wrote:
>
> >From 70f1b37d58c9c6322bb84368c9da299bfe2b0c57 Mon Sep 17 00:00:00 2001
> From: David Henningsson <david.henningsson@canonical.com>
> 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.
>
> Cc: stable@kernel.org
> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Applied now. Thanks.
Takashi
> ---
> sound/pci/hda/patch_realtek.c | 7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 3328a25..c052fc5 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -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;
> --
> 1.7.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-28 15:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-28 15:07 [PATCH] ALSA: HDA: Realtek: Fixup jack detection to input subsystem David Henningsson
2011-02-28 15:25 ` Takashi Iwai
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).