aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorOla Lilja <ola.o.lilja@stericsson.com>2012-05-24 09:26:03 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-03 08:06:38 -0400
commit1aad779fccdbb4d79af7b9de93dfd2bfe807e052 (patch)
tree70904cf7378a8b58f60dd181630cdf63b1ab6f47 /include/sound
parent656baaebf92ae9b16644c7e10a273d8dfe1ba1f6 (diff)
ALSA: pcm: Add debug-print helper function
Adds a function getting the stream-name as a string for a specific stream. Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/pcm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 0d1112815be3..a55d5db7eb5a 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1073,4 +1073,15 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
1073 1073
1074const char *snd_pcm_format_name(snd_pcm_format_t format); 1074const char *snd_pcm_format_name(snd_pcm_format_t format);
1075 1075
1076/**
1077 * Get a string naming the direction of a stream
1078 */
1079static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
1080{
1081 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
1082 return "Playback";
1083 else
1084 return "Capture";
1085}
1086
1076#endif /* __SOUND_PCM_H */ 1087#endif /* __SOUND_PCM_H */