diff mbox series

[036/113] ALSA: firewire: oxfw: use snd_pcm_is_playback/capture()

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

Commit Message

Kuninori Morimoto Aug. 5, 2024, 12:37 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/firewire/oxfw/oxfw-pcm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/firewire/oxfw/oxfw-pcm.c b/sound/firewire/oxfw/oxfw-pcm.c
index 5f43a0b826d2e..c0e67a0d10f1b 100644
--- a/sound/firewire/oxfw/oxfw-pcm.c
+++ b/sound/firewire/oxfw/oxfw-pcm.c
@@ -114,7 +114,7 @@  static int init_hw_params(struct snd_oxfw *oxfw,
 	struct amdtp_stream *stream;
 	int err;
 
-	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
+	if (snd_pcm_is_capture(substream)) {
 		runtime->hw.formats = AM824_IN_PCM_FORMAT_BITS;
 		stream = &oxfw->tx_stream;
 		formats = oxfw->tx_stream_formats;
@@ -150,7 +150,7 @@  static int limit_to_current_params(struct snd_pcm_substream *substream)
 	enum avc_general_plug_dir dir;
 	int err;
 
-	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
+	if (snd_pcm_is_capture(substream))
 		dir = AVC_GENERAL_PLUG_DIR_OUT;
 	else
 		dir = AVC_GENERAL_PLUG_DIR_IN;