Skip to content

Commit 134340b

Browse files
larsclausenbroonie
authored andcommitted
ASoC: rt5616: Don't use rtd->codec
rtd->codec does not necessarily point to the CODEC instance for which the callback was called (e.g. for CODEC<->CODEC or multi-CODEC links). Use dai->codec instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 1001354 commit 134340b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/soc/codecs/rt5616.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,8 +960,7 @@ static int rt5616_hw_params(struct snd_pcm_substream *substream,
960960
struct snd_pcm_hw_params *params,
961961
struct snd_soc_dai *dai)
962962
{
963-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
964-
struct snd_soc_codec *codec = rtd->codec;
963+
struct snd_soc_codec *codec = dai->codec;
965964
struct rt5616_priv *rt5616 = snd_soc_codec_get_drvdata(codec);
966965
unsigned int val_len = 0, val_clk, mask_clk;
967966
int pre_div, bclk_ms, frame_size;

0 commit comments

Comments
 (0)