summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_proc.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-10-06 08:16:29 +0200
committerTakashi Iwai <tiwai@suse.de>2011-10-06 08:21:15 +0200
commitf71ff0d713a85f647c16fbe44d2a12bbcc25add3 (patch)
treefcc7e781257c2b4f67babb05a352a6adee7eeed2 /sound/pci/hda/hda_proc.c
parentaf65cbf296a07c4a52079324fbefdfc9bd2622a3 (diff)
downloadblackbird-op-linux-f71ff0d713a85f647c16fbe44d2a12bbcc25add3.tar.gz
blackbird-op-linux-f71ff0d713a85f647c16fbe44d2a12bbcc25add3.zip
ALSA: hda - Moved snd_print_pcm_rates() back into hda_proc.c
Since hda_proc.c is now the only user of snd_print_pcm_rates(), better to put it back locally to hda_proc.c and revert to the old style. 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.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 2be57b051aa2..2c981b55940b 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -152,12 +152,18 @@ static void print_amp_vals(struct snd_info_buffer *buffer,
static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm)
{
- char buf[SND_PRINT_RATES_ADVISED_BUFSIZE];
+ static unsigned int rates[] = {
+ 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200,
+ 96000, 176400, 192000, 384000
+ };
+ int i;
pcm &= AC_SUPPCM_RATES;
snd_iprintf(buffer, " rates [0x%x]:", pcm);
- snd_print_pcm_rates(pcm, buf, sizeof(buf));
- snd_iprintf(buffer, "%s\n", buf);
+ for (i = 0; i < ARRAY_SIZE(rates); i++)
+ if (pcm & (1 << i))
+ snd_iprintf(buffer, " %d", rates[i]);
+ snd_iprintf(buffer, "\n");
}
static void print_pcm_bits(struct snd_info_buffer *buffer, unsigned int pcm)
OpenPOWER on IntegriCloud