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/stac9766.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index 2f9f10a4dfed9..3511776af8f95 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c @@ -171,7 +171,7 @@ static int ac97_analog_prepare(struct snd_pcm_substream *substream, /* enable variable rate audio, disable SPDIF output */ snd_soc_component_update_bits(component, AC97_EXTENDED_STATUS, 0x5, 0x1);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + if (snd_pcm_is_playback(substream)) reg = AC97_PCM_FRONT_DAC_RATE; else reg = AC97_PCM_LR_ADC_RATE;