[PATCH 037/113] ALSA: firewire: dice: 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/firewire/dice/dice-pcm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/firewire/dice/dice-pcm.c b/sound/firewire/dice/dice-pcm.c
index d64366217d572..063e16d153fa5 100644
--- a/sound/firewire/dice/dice-pcm.c
+++ b/sound/firewire/dice/dice-pcm.c
@@ -26,7 +26,7 @@ static int dice_rate_constraint(struct snd_pcm_hw_params *params,
 	enum snd_dice_rate_mode mode;
 	unsigned int i, rate;
 
-	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
+	if (snd_pcm_is_capture(substream))
 		pcm_channels = dice->tx_pcm_chs[index];
 	else
 		pcm_channels = dice->rx_pcm_chs[index];
@@ -64,7 +64,7 @@ static int dice_channels_constraint(struct snd_pcm_hw_params *params,
 	enum snd_dice_rate_mode mode;
 	unsigned int i, rate;
 
-	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
+	if (snd_pcm_is_capture(substream))
 		pcm_channels = dice->tx_pcm_chs[index];
 	else
 		pcm_channels = dice->rx_pcm_chs[index];
@@ -132,7 +132,7 @@ static int init_hw_info(struct snd_dice *dice,
 	struct amdtp_stream *stream;
 	int err;
 
-	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
+	if (snd_pcm_is_capture(substream)) {
 		hw->formats = AM824_IN_PCM_FORMAT_BITS;
 		dir = AMDTP_IN_STREAM;
 		stream = &dice->tx_stream[index];
-- 
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