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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We can use snd_pcm_is_playback/capture(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
---
 sound/ppc/pmac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
-- 
2.43.0




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux