From d39b4352f2356bde9d4dae8591d4c8022360922f Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Wed, 19 Nov 2008 15:14:02 +0800 Subject: ALSA: hda: make global snd_print_pcm_bits() Introduce a global function snd_print_pcm_bits() and use it in the ELD code. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_eld.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sound/pci/hda/hda_eld.c') diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 75e9a4014f4e..8e575bb56ff7 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c @@ -455,7 +455,7 @@ void snd_hdmi_show_eld(struct hdmi_eld *e) static void hdmi_print_sad_info(int i, struct cea_sad *a, struct snd_info_buffer *buffer) { - char buf[80]; + char buf[SND_PRINT_RATES_ADVISED_BUFSIZE]; snd_iprintf(buffer, "sad%d_coding_type\t[0x%x] %s\n", i, a->format, cea_audio_coding_type_names[a->format]); @@ -464,9 +464,11 @@ static void hdmi_print_sad_info(int i, struct cea_sad *a, snd_print_pcm_rates(a->rates, buf, sizeof(buf)); snd_iprintf(buffer, "sad%d_rates\t\t[0x%x]%s\n", i, a->rates, buf); - if (a->format == AUDIO_CODING_TYPE_LPCM) - snd_iprintf(buffer, "sad%d_bits\t\t0x%x\n", - i, a->sample_bits); + if (a->format == AUDIO_CODING_TYPE_LPCM) { + snd_print_pcm_bits(a->sample_bits, buf, sizeof(buf)); + snd_iprintf(buffer, "sad%d_bits\t\t[0x%x]%s\n", + i, a->sample_bits, buf); + } if (a->max_bitrate) snd_iprintf(buffer, "sad%d_max_bitrate\t%d\n", -- cgit v1.2.3