From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: module snd-atiixp issue with suspend/hibernate/resume Date: Thu, 30 Apr 2009 07:53:43 +0200 Message-ID: References: <75b66ecd0904291942u3b352dbj74e5de00ebdf167b@mail.gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id AAB2D1038AD for ; Thu, 30 Apr 2009 07:53:43 +0200 (CEST) Received: from relay2.suse.de (relay-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 86F178640B for ; Thu, 30 Apr 2009 07:53:43 +0200 (CEST) In-Reply-To: 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: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 30 Apr 2009 00:43:02 -0400, Ryan Dunn wrote: > = > Thanks Lee, > = > I grabbed the kernel source from the repos and started perusing the code.= =A0 It > looks like when the module is installed, the call chain starts in atiixp.= c and > moves into ac97/ac97_codec.c via a call to snd_ac97_tune_hardware() which > ultimately twiddles a bit in the AC97_POWERDOWN register.=A0 I'm not sure= yet if > the suspend method properly saves this register on suspend or not; It should. snd_ac97_resume() writes the cached value. Check /proc/asound/card0/codec97#0/ac97#*+regs files before and after suspend. You can change the codec register value directly via proc file, e.g. # echo 0x12 0x1234 > /proc/asound/card0/codec97#0/ac97#0-0+regs (only when you build with the debug option). The bit 0x8000 of the power-down register should correspond to LED. Takashi > or if the > same call chain needs to be repeated on a resume.=A0 I appreciate your qu= ick and > relevant answer.=A0 When I get time, I'll start adding some debug printou= ts to > try this out. > = > Also, the struct ac97_quirk ac97_quirks[] array has a couple of entries i= n it > currently (in the atiixp.c file).=A0 How do I get the subvender/subdevice= id's > for my system (I didn't seem to have luck with lspci, unless I'm not look= ing > in the right fields)?=A0 Would it be possible to edit the driver so that = an > explict module option would not be needed on my hardware? > = > Thanks, > Ryan > = > On Wed, Apr 29, 2009 at 10:42 PM, Lee Revell wrote: > = > On Wed, Apr 29, 2009 at 12:06 AM, Ryan Dunn > wrote: > > I have a Compaq V2000 laptop with the ATI IXP chipset and make use = of > the > > snd-atiixp module. =A0The laptop needs to have the ac97_quirk optio= n set > to 7 > > to enable the mute LED. =A0After setting this option in the > > /etc/modprobe.d/options.conf file, the mute LED works after a reboo= t. > > However, after a resume from suspend or hibernate, the mute LED doe= s not > > work. =A0The alsa-info.sh script reports that the quirk is still se= t with > 7. > > At this point a reboot will NOT fix the problem. =A0The only way to= fix it > is > > to remove and reinsert the module with modprobe. > > > > This is on a fresh Ubuntu 9.04 install. =A0Any ideas? =A0I wasn't s= ure if > this > > should be reported here or on the kernel list. =A0I saw a similar i= ssue > with > > the ac97_quirk on the kernel list and they were referred here. =A0I= 'm a > > software developer, so I'd be willing to try ideas/possible solutio= ns if > you > > have them. > = > Get the Ubuntu source code for the package that owns that ALSA driver, > find the place in the driver's initialization code where ac97_quirk= =3D7 > is handled, then check the driver's suspend and resume callbacks and > make sure the suspend callback is correctly saving the LED state and > that the resume callback is re-initializing the LED from the saved > state in the same way the init code does. =A0grep and printk() are yo= ur > friends ;-) > = > HTH, > = > Lee > = > =