We can use snd_pcm_is_playback/capture(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> --- sound/soc/codecs/adav80x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c index c8c0fc9282116..21d20cb42d200 100644 --- a/sound/soc/codecs/adav80x.c +++ b/sound/soc/codecs/adav80x.c @@ -521,7 +521,7 @@ static int adav80x_hw_params(struct snd_pcm_substream *substream, if (rate * 256 != adav80x->sysclk) return -EINVAL; - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + if (snd_pcm_is_playback(substream)) { adav80x_set_playback_pcm_format(component, dai, params); adav80x_set_dac_clock(component, rate); } else { -- 2.43.0