mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ASoC: rk312x: Fix wrong component assignment
Should use dai->component instead of the fixed rtd->codec[0], because codec may be addressed in multi-codecs situation, Obviously, it's wrong. the dais' one is always RIGHT. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Change-Id: I4d95b82e36a929e46f4992cbb198b6a060c5c939
This commit is contained in:
@@ -1424,8 +1424,7 @@ static int rk312x_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct rk312x_codec_priv *rk312x = rk312x_priv;
|
||||
unsigned int rate = params_rate(params);
|
||||
unsigned int div;
|
||||
|
||||
Reference in New Issue
Block a user