diff mbox series

[076/113] ASoC: codecs: cpcap: use snd_pcm_is_playback/capture()

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

Commit Message

Kuninori Morimoto Aug. 5, 2024, 12:41 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/soc/codecs/cpcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/codecs/cpcap.c b/sound/soc/codecs/cpcap.c
index 4f9dabd9d78a6..e8309458eb86e 100644
--- a/sound/soc/codecs/cpcap.c
+++ b/sound/soc/codecs/cpcap.c
@@ -1271,7 +1271,7 @@  static int cpcap_voice_hw_params(struct snd_pcm_substream *substream,
 	if (err)
 		return err;
 
-	if (direction == SNDRV_PCM_STREAM_CAPTURE) {
+	if (snd_pcm_is_capture(direction)) {
 		mask = 0x0000;
 		mask |= BIT(CPCAP_BIT_MIC1_RX_TIMESLOT0);
 		mask |= BIT(CPCAP_BIT_MIC1_RX_TIMESLOT1);