diff mbox series

[012/113] ALSA: xen: use snd_pcm_is_playback/capture()

Message ID 87mslr24dt.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New
Headers show
Series ALSA: add snd_pcm_is_playback/capture() macro | expand

Commit Message

Kuninori Morimoto Aug. 5, 2024, 12:35 a.m. UTC
We can use snd_pcm_is_playback/capture(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/xen/xen_snd_front_alsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/xen/xen_snd_front_alsa.c b/sound/xen/xen_snd_front_alsa.c
index b229eb6f70571..0f4f849bd20b3 100644
--- a/sound/xen/xen_snd_front_alsa.c
+++ b/sound/xen/xen_snd_front_alsa.c
@@ -240,7 +240,7 @@  stream_get(struct snd_pcm_substream *substream)
 			snd_pcm_substream_chip(substream);
 	struct xen_snd_front_pcm_stream_info *stream;
 
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+	if (snd_pcm_is_playback(substream))
 		stream = &pcm_instance->streams_pb[substream->number];
 	else
 		stream = &pcm_instance->streams_cap[substream->number];