File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -1392,6 +1392,20 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
1392
1392
1393
1393
const char * snd_pcm_format_name (snd_pcm_format_t format );
1394
1394
1395
+ /**
1396
+ * snd_pcm_direction_name - Get a string naming the direction of a stream
1397
+ * @direction: Stream's direction, one of SNDRV_PCM_STREAM_XXX
1398
+ *
1399
+ * Returns a string naming the direction of the stream.
1400
+ */
1401
+ static inline const char * snd_pcm_direction_name (int direction )
1402
+ {
1403
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK )
1404
+ return "Playback" ;
1405
+ else
1406
+ return "Capture" ;
1407
+ }
1408
+
1395
1409
/**
1396
1410
* snd_pcm_stream_str - Get a string naming the direction of a stream
1397
1411
* @substream: the pcm substream instance
@@ -1400,10 +1414,7 @@ const char *snd_pcm_format_name(snd_pcm_format_t format);
1400
1414
*/
1401
1415
static inline const char * snd_pcm_stream_str (struct snd_pcm_substream * substream )
1402
1416
{
1403
- if (substream -> stream == SNDRV_PCM_STREAM_PLAYBACK )
1404
- return "Playback" ;
1405
- else
1406
- return "Capture" ;
1417
+ return snd_pcm_direction_name (substream -> stream );
1407
1418
}
1408
1419
1409
1420
/*
You can’t perform that action at this time.
0 commit comments