diff mbox series

[028/113] ALSA: ppc: use snd_pcm_is_playback/capture()

Message ID 87zfprztxp.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: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/ppc/pmac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 84058bbf9d127..168c1e2535faf 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -103,7 +103,7 @@  unsigned int snd_pmac_rate_index(struct snd_pmac *chip, struct pmac_stream *rec,
  */
 static inline int another_stream(int stream)
 {
-	return (stream == SNDRV_PCM_STREAM_PLAYBACK) ?
+	return snd_pcm_is_playback(stream) ?
 		SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
 }
 
@@ -251,7 +251,7 @@  static int snd_pmac_pcm_trigger(struct snd_pmac *chip, struct pmac_stream *rec,
 	case SNDRV_PCM_TRIGGER_RESUME:
 		if (rec->running)
 			return -EBUSY;
-		command = (subs->stream == SNDRV_PCM_STREAM_PLAYBACK ?
+		command = (snd_pcm_is_playback(subs) ?
 			   OUTPUT_MORE : INPUT_MORE) + INTR_ALWAYS;
 		spin_lock(&chip->reg_lock);
 		snd_pmac_beep_stop(chip);