From: Takashi Iwai Subject: Re: [PATCH V2] ALSA: hda - add power states information in proc Date: Wed, 06 Jun 2012 12:40:41 +0200 Message-ID: References: <1338961784-26518-1-git-send-email-xingchao.wang@intel.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 B610510451C for ; Wed, 6 Jun 2012 12:40:42 +0200 (CEST) In-Reply-To: <1338961784-26518-1-git-send-email-xingchao.wang@intel.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: Wang Xingchao Cc: alsa-devel@alsa-project.org, wangxingchao2011@gmail.com List-Id: alsa-devel@alsa-project.org At Wed, 6 Jun 2012 13:49:44 +0800, Wang Xingchao wrote: > > add more power states information: > - reset status > - clock stop ok > - power states error > > Output like: > Power: setting=D0, actual=D0, Error, Clock-stop-OK, Setting-reset > > Signed-off-by: Wang Xingchao > --- > sound/pci/hda/hda_codec.h | 3 +++ > sound/pci/hda/hda_proc.c | 9 ++++++++- > 2 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h > index 4fc3960..71864cdd 100644 > --- a/sound/pci/hda/hda_codec.h > +++ b/sound/pci/hda/hda_codec.h > @@ -323,6 +323,9 @@ enum { > #define AC_PWRST_D1 0x01 > #define AC_PWRST_D2 0x02 > #define AC_PWRST_D3 0x03 > +#define AC_PWRST_ERROR (1<<8) > +#define AC_PWRST_CLK_STOP_OK (1<<9) > +#define AC_PWRST_SETTING_RESET (1<<10) > > /* Processing capabilies */ > #define AC_PCAP_BENIGN (1<<0) > diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c > index e59e2f0..79d0188 100644 > --- a/sound/pci/hda/hda_proc.c > +++ b/sound/pci/hda/hda_proc.c > @@ -455,10 +455,17 @@ static void print_power_state(struct snd_info_buffer *buffer, > snd_iprintf(buffer, " Power states: %s\n", > bits_names(sup, names, ARRAY_SIZE(names))); > > - snd_iprintf(buffer, " Power: setting=%s, actual=%s\n", > + snd_iprintf(buffer, " Power: setting=%s, actual=%s", > get_pwr_state(pwr & AC_PWRST_SETTING), > get_pwr_state((pwr & AC_PWRST_ACTUAL) >> > AC_PWRST_ACTUAL_SHIFT)); > + if (pwr & AC_PWRST_ERROR) > + snd_iprintf(buffer, " , Error"); The space at the beginning should be superfluous. I applied the patch with that fix now. thanks, Takashi