aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorWang Xingchao <xingchao.wang@intel.com>2012-06-06 01:49:44 -0400
committerTakashi Iwai <tiwai@suse.de>2012-06-06 06:12:49 -0400
commitce63f3ba256a48023b425a4a6792f8da03d00948 (patch)
tree213ada4d578caf48cc323c3680bf4806cf80639c /sound/pci/hda
parentf8f5701bdaf9134b1f90e5044a82c66324d2073f (diff)
ALSA: hda - add power states information in proc
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 <xingchao.wang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_codec.h3
-rw-r--r--sound/pci/hda/hda_proc.c9
2 files changed, 11 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 4fc3960c8591..71864cddcb9d 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -323,6 +323,9 @@ enum {
323#define AC_PWRST_D1 0x01 323#define AC_PWRST_D1 0x01
324#define AC_PWRST_D2 0x02 324#define AC_PWRST_D2 0x02
325#define AC_PWRST_D3 0x03 325#define AC_PWRST_D3 0x03
326#define AC_PWRST_ERROR (1<<8)
327#define AC_PWRST_CLK_STOP_OK (1<<9)
328#define AC_PWRST_SETTING_RESET (1<<10)
326 329
327/* Processing capabilies */ 330/* Processing capabilies */
328#define AC_PCAP_BENIGN (1<<0) 331#define AC_PCAP_BENIGN (1<<0)
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index e59e2f059b6e..fb9ef132f13b 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,
455 snd_iprintf(buffer, " Power states: %s\n", 455 snd_iprintf(buffer, " Power states: %s\n",
456 bits_names(sup, names, ARRAY_SIZE(names))); 456 bits_names(sup, names, ARRAY_SIZE(names)));
457 457
458 snd_iprintf(buffer, " Power: setting=%s, actual=%s\n", 458 snd_iprintf(buffer, " Power: setting=%s, actual=%s",
459 get_pwr_state(pwr & AC_PWRST_SETTING), 459 get_pwr_state(pwr & AC_PWRST_SETTING),
460 get_pwr_state((pwr & AC_PWRST_ACTUAL) >> 460 get_pwr_state((pwr & AC_PWRST_ACTUAL) >>
461 AC_PWRST_ACTUAL_SHIFT)); 461 AC_PWRST_ACTUAL_SHIFT));
462 if (pwr & AC_PWRST_ERROR)
463 snd_iprintf(buffer, ", Error");
464 if (pwr & AC_PWRST_CLK_STOP_OK)
465 snd_iprintf(buffer, ", Clock-stop-OK");
466 if (pwr & AC_PWRST_SETTING_RESET)
467 snd_iprintf(buffer, ", Setting-reset");
468 snd_iprintf(buffer, "\n");
462} 469}
463 470
464static void print_unsol_cap(struct snd_info_buffer *buffer, 471static void print_unsol_cap(struct snd_info_buffer *buffer,