diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-09-08 08:26:51 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-09-08 08:26:51 -0400 |
commit | 6e5265ec34d3b9578973841ddec8b925e986136a (patch) | |
tree | 3e11210c9bea96c0299b2a03d7efafc84f21194e /sound/core | |
parent | a68c4d11336610dc348620766119db09675707c2 (diff) |
ALSA: Re-export snd_pcm_format_name() function
Re-export snd_pcm_format_name() function to be used outside the PCM core.
As a first example, usbaudio is changed to use it now again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 145931a9ff30..0c1440121c22 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c | |||
@@ -162,18 +162,7 @@ static int snd_pcm_control_ioctl(struct snd_card *card, | |||
162 | return -ENOIOCTLCMD; | 162 | return -ENOIOCTLCMD; |
163 | } | 163 | } |
164 | 164 | ||
165 | #ifdef CONFIG_SND_VERBOSE_PROCFS | ||
166 | |||
167 | #define STATE(v) [SNDRV_PCM_STATE_##v] = #v | ||
168 | #define STREAM(v) [SNDRV_PCM_STREAM_##v] = #v | ||
169 | #define READY(v) [SNDRV_PCM_READY_##v] = #v | ||
170 | #define XRUN(v) [SNDRV_PCM_XRUN_##v] = #v | ||
171 | #define SILENCE(v) [SNDRV_PCM_SILENCE_##v] = #v | ||
172 | #define TSTAMP(v) [SNDRV_PCM_TSTAMP_##v] = #v | ||
173 | #define ACCESS(v) [SNDRV_PCM_ACCESS_##v] = #v | ||
174 | #define START(v) [SNDRV_PCM_START_##v] = #v | ||
175 | #define FORMAT(v) [SNDRV_PCM_FORMAT_##v] = #v | 165 | #define FORMAT(v) [SNDRV_PCM_FORMAT_##v] = #v |
176 | #define SUBFORMAT(v) [SNDRV_PCM_SUBFORMAT_##v] = #v | ||
177 | 166 | ||
178 | static char *snd_pcm_format_names[] = { | 167 | static char *snd_pcm_format_names[] = { |
179 | FORMAT(S8), | 168 | FORMAT(S8), |
@@ -216,10 +205,23 @@ static char *snd_pcm_format_names[] = { | |||
216 | FORMAT(U18_3BE), | 205 | FORMAT(U18_3BE), |
217 | }; | 206 | }; |
218 | 207 | ||
219 | static const char *snd_pcm_format_name(snd_pcm_format_t format) | 208 | const char *snd_pcm_format_name(snd_pcm_format_t format) |
220 | { | 209 | { |
221 | return snd_pcm_format_names[format]; | 210 | return snd_pcm_format_names[format]; |
222 | } | 211 | } |
212 | EXPORT_SYMBOL_GPL(snd_pcm_format_name); | ||
213 | |||
214 | #ifdef CONFIG_SND_VERBOSE_PROCFS | ||
215 | |||
216 | #define STATE(v) [SNDRV_PCM_STATE_##v] = #v | ||
217 | #define STREAM(v) [SNDRV_PCM_STREAM_##v] = #v | ||
218 | #define READY(v) [SNDRV_PCM_READY_##v] = #v | ||
219 | #define XRUN(v) [SNDRV_PCM_XRUN_##v] = #v | ||
220 | #define SILENCE(v) [SNDRV_PCM_SILENCE_##v] = #v | ||
221 | #define TSTAMP(v) [SNDRV_PCM_TSTAMP_##v] = #v | ||
222 | #define ACCESS(v) [SNDRV_PCM_ACCESS_##v] = #v | ||
223 | #define START(v) [SNDRV_PCM_START_##v] = #v | ||
224 | #define SUBFORMAT(v) [SNDRV_PCM_SUBFORMAT_##v] = #v | ||
223 | 225 | ||
224 | static char *snd_pcm_stream_names[] = { | 226 | static char *snd_pcm_stream_names[] = { |
225 | STREAM(PLAYBACK), | 227 | STREAM(PLAYBACK), |