mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ASoC: rk817: 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: I97cd09aa0886e2b89f2c2f257defb228168e93b0
This commit is contained in:
@@ -892,8 +892,7 @@ static int rk817_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 rk817_codec_priv *rk817 = snd_soc_component_get_drvdata(component);
|
||||
unsigned int rate = params_rate(params);
|
||||
unsigned char apll_cfg3_val;
|
||||
|
||||
Reference in New Issue
Block a user