summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_proc.c
diff options
context:
space:
mode:
authorWu Fengguang <wfg@linux.intel.com>2008-11-21 09:42:59 +0800
committerTakashi Iwai <tiwai@suse.de>2008-11-21 08:27:30 +0100
commit218b5ffc0d3fa852624e67a1bb2528ca29274d6e (patch)
tree09902f6f254b812df0891a513d18bbc187dd13ed /sound/pci/hda/hda_proc.c
parent75a287d9a35a825cb758d2f8d8df93d41f9f8e3e (diff)
ALSA: hda - properly print ELD sample bits
Fix bugs on printing the ELD sample bits. Signed-off-by: Wu Fengguang <wfg@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_proc.c')
-rw-r--r--sound/pci/hda/hda_proc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 31b49bdc58f5..56cee3a22214 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -120,7 +120,7 @@ void snd_print_pcm_bits(int pcm, char *buf, int buflen)
int i, j;
for (i = 0, j = 0; i < ARRAY_SIZE(bits); i++)
- if (pcm & (1 << i))
+ if (pcm & (AC_SUPPCM_BITS_8 << i))
j += snprintf(buf + j, buflen - j, " %d", bits[i]);
buf[j] = '\0'; /* necessary when j == 0 */
@@ -130,7 +130,6 @@ static void print_pcm_bits(struct snd_info_buffer *buffer, unsigned int pcm)
{
char buf[SND_PRINT_BITS_ADVISED_BUFSIZE];
- pcm = (pcm >> 16) & 0xff;
snd_iprintf(buffer, " bits [0x%x]:", pcm);
snd_print_pcm_bits(pcm, buf, sizeof(buf));
snd_iprintf(buffer, "%s\n", buf);