Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757401AbZLYV71 (ORCPT ); Fri, 25 Dec 2009 16:59:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756891AbZLYV70 (ORCPT ); Fri, 25 Dec 2009 16:59:26 -0500 Received: from cantor2.suse.de ([195.135.220.15]:55465 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756863AbZLYV70 (ORCPT ); Fri, 25 Dec 2009 16:59:26 -0500 Date: Fri, 25 Dec 2009 22:59:24 +0100 Message-ID: From: Takashi Iwai To: Maciej Rutecki Cc: Sergei Trofimovich , linux-kernel@vger.kernel.org, =?UTF-8?B?w4lyaWM=?= Piel Subject: Re: intel hda regression: 2.6.33-rc{1,2}: hd-audio0 eats 25% CPU (according to top) In-Reply-To: <8db1092f0912251101q7ae69d1ai59c68d03a9155566@mail.gmail.com> References: <20091225122107.357d7102@mosly> <20091225162528.5dbbbea0@mosly> <8db1092f0912250731u46637a55lccb77e6cdb376a57@mail.gmail.com> <20091225183205.744be270@mosly> <8db1092f0912251101q7ae69d1ai59c68d03a9155566@mail.gmail.com> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4192 Lines: 123 At Fri, 25 Dec 2009 20:01:46 +0100, Maciej Rutecki wrote: > > 2009/12/25 Takashi Iwai : > > > diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c > > index 950ee5c..f98b47c 100644 > > --- a/sound/pci/hda/hda_codec.c > > +++ b/sound/pci/hda/hda_codec.c > > @@ -1327,11 +1327,13 @@ EXPORT_SYMBOL_HDA(snd_hda_query_pin_caps); > >  */ > >  u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid) > >  { > > -       u32 pincap = snd_hda_query_pin_caps(codec, nid); > > - > > -       if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */ > > -               snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0); > > +       u32 pincap; > > > > +       if (!codec->no_trigger_sense) { > > +               pincap = snd_hda_query_pin_caps(codec, nid); > > +               if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */ > > +                       snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0); > > +       } > >        return snd_hda_codec_read(codec, nid, 0, > >                                  AC_VERB_GET_PIN_SENSE, 0); > >  } > > diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h > > index 1d541b7..0a770a2 100644 > > --- a/sound/pci/hda/hda_codec.h > > +++ b/sound/pci/hda/hda_codec.h > > @@ -817,6 +817,7 @@ struct hda_codec { > >        unsigned int pin_amp_workaround:1; /* pin out-amp takes index > >                                            * (e.g. Conexant codecs) > >                                            */ > > +       unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ > >  #ifdef CONFIG_SND_HDA_POWER_SAVE > >        unsigned int power_on :1;       /* current (global) power-state */ > >        unsigned int power_transition :1; /* power-state in transition */ > > diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c > > index 1a36137..69a941c 100644 > > --- a/sound/pci/hda/patch_analog.c > > +++ b/sound/pci/hda/patch_analog.c > > @@ -1186,6 +1186,8 @@ static int patch_ad1986a(struct hda_codec *codec) > >         */ > >        spec->multiout.no_share_stream = 1; > > > > +       codec->no_trigger_sense = 1; > > + > >        return 0; > >  } > > > > @@ -1371,6 +1373,8 @@ static int patch_ad1983(struct hda_codec *codec) > > > >        codec->patch_ops = ad198x_patch_ops; > > > > +       codec->no_trigger_sense = 1; > > + > >        return 0; > >  } > > > > @@ -1813,6 +1817,9 @@ static int patch_ad1981(struct hda_codec *codec) > >                codec->patch_ops.unsol_event = ad1981_hp_unsol_event; > >                break; > >        } > > + > > +       codec->no_trigger_sense = 1; > > + > >        return 0; > >  } > > > > @@ -3118,6 +3125,8 @@ static int patch_ad1988(struct hda_codec *codec) > >  #endif > >        spec->vmaster_nid = 0x04; > > > > +       codec->no_trigger_sense = 1; > > + > >        return 0; > >  } > > > > @@ -3330,6 +3339,8 @@ static int patch_ad1884(struct hda_codec *codec) > > > >        codec->patch_ops = ad198x_patch_ops; > > > > +       codec->no_trigger_sense = 1; > > + > >        return 0; > >  } > > > > @@ -4287,6 +4298,8 @@ static int patch_ad1884a(struct hda_codec *codec) > >                break; > >        } > > > > +       codec->no_trigger_sense = 1; > > + > >        return 0; > >  } > > > > @@ -4623,6 +4636,9 @@ static int patch_ad1882(struct hda_codec *codec) > >                spec->mixers[2] = ad1882_6stack_mixers; > >                break; > >        } > > + > > +       codec->no_trigger_sense = 1; > > + > >        return 0; > >  } > > > > > Patch solves the problem. > > Tested-by Maciej Rutecki Thanks for testing. I merged the patch now. Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/