diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-21 15:24:03 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-21 15:24:03 -0500 |
commit | b20222667d371bb9ddeadd47d18072efcab3f6d2 (patch) | |
tree | 65d8a638f1fa9d1d40b976afce11c81eb3dca64f /sound/pci/hda/hda_proc.c | |
parent | c70bfa8733e1ec4babe5a1b4a9a90053f79eb301 (diff) |
ALSA: hda - Fix build without CONFIG_PROC_FS
snd_print_pcm_rates() and snd_print_pcm_bits() are used by both
hda_proc.c and hda_eld.c, thus they have to be defined in the common
place.
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 | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 56cee3a22214..e7f91c44e631 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -89,21 +89,6 @@ static void print_amp_vals(struct snd_info_buffer *buffer, | |||
89 | snd_iprintf(buffer, "\n"); | 89 | snd_iprintf(buffer, "\n"); |
90 | } | 90 | } |
91 | 91 | ||
92 | void snd_print_pcm_rates(int pcm, char *buf, int buflen) | ||
93 | { | ||
94 | static unsigned int rates[] = { | ||
95 | 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, | ||
96 | 96000, 176400, 192000, 384000 | ||
97 | }; | ||
98 | int i, j; | ||
99 | |||
100 | for (i = 0, j = 0; i < ARRAY_SIZE(rates); i++) | ||
101 | if (pcm & (1 << i)) | ||
102 | j += snprintf(buf + j, buflen - j, " %d", rates[i]); | ||
103 | |||
104 | buf[j] = '\0'; /* necessary when j == 0 */ | ||
105 | } | ||
106 | |||
107 | static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm) | 92 | static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm) |
108 | { | 93 | { |
109 | char buf[SND_PRINT_RATES_ADVISED_BUFSIZE]; | 94 | char buf[SND_PRINT_RATES_ADVISED_BUFSIZE]; |
@@ -114,18 +99,6 @@ static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm) | |||
114 | snd_iprintf(buffer, "%s\n", buf); | 99 | snd_iprintf(buffer, "%s\n", buf); |
115 | } | 100 | } |
116 | 101 | ||
117 | void snd_print_pcm_bits(int pcm, char *buf, int buflen) | ||
118 | { | ||
119 | static unsigned int bits[] = { 8, 16, 20, 24, 32 }; | ||
120 | int i, j; | ||
121 | |||
122 | for (i = 0, j = 0; i < ARRAY_SIZE(bits); i++) | ||
123 | if (pcm & (AC_SUPPCM_BITS_8 << i)) | ||
124 | j += snprintf(buf + j, buflen - j, " %d", bits[i]); | ||
125 | |||
126 | buf[j] = '\0'; /* necessary when j == 0 */ | ||
127 | } | ||
128 | |||
129 | static void print_pcm_bits(struct snd_info_buffer *buffer, unsigned int pcm) | 102 | static void print_pcm_bits(struct snd_info_buffer *buffer, unsigned int pcm) |
130 | { | 103 | { |
131 | char buf[SND_PRINT_BITS_ADVISED_BUFSIZE]; | 104 | char buf[SND_PRINT_BITS_ADVISED_BUFSIZE]; |