diff options
author | Wu Fengguang <wfg@linux.intel.com> | 2008-11-20 20:42:59 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-21 02:27:30 -0500 |
commit | 218b5ffc0d3fa852624e67a1bb2528ca29274d6e (patch) | |
tree | 09902f6f254b812df0891a513d18bbc187dd13ed /sound/pci/hda/hda_proc.c | |
parent | 75a287d9a35a825cb758d2f8d8df93d41f9f8e3e (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.c | 3 |
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) | |||
120 | int i, j; | 120 | int i, j; |
121 | 121 | ||
122 | for (i = 0, j = 0; i < ARRAY_SIZE(bits); i++) | 122 | for (i = 0, j = 0; i < ARRAY_SIZE(bits); i++) |
123 | if (pcm & (1 << i)) | 123 | if (pcm & (AC_SUPPCM_BITS_8 << i)) |
124 | j += snprintf(buf + j, buflen - j, " %d", bits[i]); | 124 | j += snprintf(buf + j, buflen - j, " %d", bits[i]); |
125 | 125 | ||
126 | buf[j] = '\0'; /* necessary when j == 0 */ | 126 | buf[j] = '\0'; /* necessary when j == 0 */ |
@@ -130,7 +130,6 @@ static void print_pcm_bits(struct snd_info_buffer *buffer, unsigned int pcm) | |||
130 | { | 130 | { |
131 | char buf[SND_PRINT_BITS_ADVISED_BUFSIZE]; | 131 | char buf[SND_PRINT_BITS_ADVISED_BUFSIZE]; |
132 | 132 | ||
133 | pcm = (pcm >> 16) & 0xff; | ||
134 | snd_iprintf(buffer, " bits [0x%x]:", pcm); | 133 | snd_iprintf(buffer, " bits [0x%x]:", pcm); |
135 | snd_print_pcm_bits(pcm, buf, sizeof(buf)); | 134 | snd_print_pcm_bits(pcm, buf, sizeof(buf)); |
136 | snd_iprintf(buffer, "%s\n", buf); | 135 | snd_iprintf(buffer, "%s\n", buf); |