Commit 1a3b7eab authored by Shuming Fan's avatar Shuming Fan Committed by Mark Brown

ASoC: rt712-sdca: fix speaker route missing issue

Sometimes the codec probe would be called earlier than the hardware initialization.
Therefore, the speaker route should be added before the the first_hw_init check.
Signed-off-by: default avatarShuming Fan <shumingf@realtek.com>
Fixes: f3da2ed1 ("ASoC: rt1712-sdca: enable pm_runtime in probe,  keep status as 'suspended'")?
Link: https://lore.kernel.org/r/20231030103644.1787948-1-shumingf@realtek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 04f8c76d
...@@ -963,13 +963,6 @@ static int rt712_sdca_probe(struct snd_soc_component *component) ...@@ -963,13 +963,6 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
rt712_sdca_parse_dt(rt712, &rt712->slave->dev); rt712_sdca_parse_dt(rt712, &rt712->slave->dev);
rt712->component = component; rt712->component = component;
if (!rt712->first_hw_init)
return 0;
ret = pm_runtime_resume(component->dev);
if (ret < 0 && ret != -EACCES)
return ret;
/* add SPK route */ /* add SPK route */
if (rt712->hw_id != RT712_DEV_ID_713) { if (rt712->hw_id != RT712_DEV_ID_713) {
snd_soc_add_component_controls(component, snd_soc_add_component_controls(component,
...@@ -980,6 +973,13 @@ static int rt712_sdca_probe(struct snd_soc_component *component) ...@@ -980,6 +973,13 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
rt712_sdca_spk_dapm_routes, ARRAY_SIZE(rt712_sdca_spk_dapm_routes)); rt712_sdca_spk_dapm_routes, ARRAY_SIZE(rt712_sdca_spk_dapm_routes));
} }
if (!rt712->first_hw_init)
return 0;
ret = pm_runtime_resume(component->dev);
if (ret < 0 && ret != -EACCES)
return ret;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment