From 42e8df10d5a387fcb9ae5ffbdd432237d018897d Mon Sep 17 00:00:00 2001 From: Ola Lilja Date: Thu, 24 May 2012 15:26:03 +0200 Subject: [PATCH] --- yaml --- r: 316192 b: refs/heads/master c: 1aad779fccdbb4d79af7b9de93dfd2bfe807e052 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/sound/pcm.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f02a2738d634..919a336755d3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 656baaebf92ae9b16644c7e10a273d8dfe1ba1f6 +refs/heads/master: 1aad779fccdbb4d79af7b9de93dfd2bfe807e052 diff --git a/trunk/include/sound/pcm.h b/trunk/include/sound/pcm.h index 0d1112815be3..a55d5db7eb5a 100644 --- a/trunk/include/sound/pcm.h +++ b/trunk/include/sound/pcm.h @@ -1073,4 +1073,15 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) const char *snd_pcm_format_name(snd_pcm_format_t format); +/** + * Get a string naming the direction of a stream + */ +static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream) +{ + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + return "Playback"; + else + return "Capture"; +} + #endif /* __SOUND_PCM_H */