Commit 1aad779f authored by Ola Lilja's avatar Ola Lilja Committed by Mark Brown

ALSA: pcm: Add debug-print helper function

Adds a function getting the stream-name as a string for
a specific stream.
Signed-off-by: default avatarOla Lilja <ola.o.lilja@stericsson.com>
Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 656baaeb
......@@ -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 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment