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 <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index 75e9a40..8e575bb 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -455,7 +455,7 @@
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 @@
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",