Loading sound/pci/hda/hda_local.h +3 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,9 @@ int snd_hda_codec_proc_new(struct hda_codec *codec); static inline int snd_hda_codec_proc_new(struct hda_codec *codec) { return 0; } #endif #define SND_PRINT_RATES_ADVISED_BUFSIZE 80 void snd_print_pcm_rates(int pcm, char *buf, int buflen); /* * Misc */ Loading sound/pci/hda/hda_proc.c +14 −6 Original line number Diff line number Diff line Loading @@ -89,20 +89,28 @@ static void print_amp_vals(struct snd_info_buffer *buffer, snd_iprintf(buffer, "\n"); } static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm) void snd_print_pcm_rates(int pcm, char *buf, int buflen) { static unsigned int rates[] = { 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000, 384000 }; int i; int i, j; for (i = 0, j = 0; i < ARRAY_SIZE(rates); i++) if (pcm & (1 << i)) j += snprintf(buf + j, buflen - j, " %d", rates[i]); buf[j] = '\0'; /* necessary when j == 0 */ } static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm) { char buf[SND_PRINT_RATES_ADVISED_BUFSIZE]; pcm &= AC_SUPPCM_RATES; snd_iprintf(buffer, " rates [0x%x]:", pcm); for (i = 0; i < ARRAY_SIZE(rates); i++) if (pcm & (1 << i)) snd_iprintf(buffer, " %d", rates[i]); snd_iprintf(buffer, "\n"); snd_print_pcm_rates(pcm, buf, sizeof(buf)); snd_iprintf(buffer, "%s\n", buf); } static void print_pcm_bits(struct snd_info_buffer *buffer, unsigned int pcm) Loading Loading
sound/pci/hda/hda_local.h +3 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,9 @@ int snd_hda_codec_proc_new(struct hda_codec *codec); static inline int snd_hda_codec_proc_new(struct hda_codec *codec) { return 0; } #endif #define SND_PRINT_RATES_ADVISED_BUFSIZE 80 void snd_print_pcm_rates(int pcm, char *buf, int buflen); /* * Misc */ Loading
sound/pci/hda/hda_proc.c +14 −6 Original line number Diff line number Diff line Loading @@ -89,20 +89,28 @@ static void print_amp_vals(struct snd_info_buffer *buffer, snd_iprintf(buffer, "\n"); } static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm) void snd_print_pcm_rates(int pcm, char *buf, int buflen) { static unsigned int rates[] = { 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000, 384000 }; int i; int i, j; for (i = 0, j = 0; i < ARRAY_SIZE(rates); i++) if (pcm & (1 << i)) j += snprintf(buf + j, buflen - j, " %d", rates[i]); buf[j] = '\0'; /* necessary when j == 0 */ } static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm) { char buf[SND_PRINT_RATES_ADVISED_BUFSIZE]; pcm &= AC_SUPPCM_RATES; snd_iprintf(buffer, " rates [0x%x]:", pcm); for (i = 0; i < ARRAY_SIZE(rates); i++) if (pcm & (1 << i)) snd_iprintf(buffer, " %d", rates[i]); snd_iprintf(buffer, "\n"); snd_print_pcm_rates(pcm, buf, sizeof(buf)); snd_iprintf(buffer, "%s\n", buf); } static void print_pcm_bits(struct snd_info_buffer *buffer, unsigned int pcm) Loading