From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] ALSA: HDA: Realtek: Fixup jack detection to input subsystem Date: Mon, 28 Feb 2011 16:25:52 +0100 Message-ID: References: <4D6BBA28.8080506@canonical.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 19A82103823 for ; Mon, 28 Feb 2011 16:25:53 +0100 (CET) In-Reply-To: <4D6BBA28.8080506@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: David Henningsson Cc: ALSA Development Mailing List List-Id: alsa-devel@alsa-project.org At Mon, 28 Feb 2011 16:07:20 +0100, David Henningsson wrote: > > >From 70f1b37d58c9c6322bb84368c9da299bfe2b0c57 Mon Sep 17 00:00:00 2001 > From: David Henningsson > 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 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 >