Skip to content

Commit 1a3b7ea

Browse files
shumingfanbroonie
authored andcommitted
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: Shuming Fan <shumingf@realtek.com> Fixes: f3da2ed ("ASoC: rt1712-sdca: enable pm_runtime in probe, keep status as 'suspended'")? Link: https://lore.kernel.org/r/20231030103644.1787948-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 04f8c76 commit 1a3b7ea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sound/soc/codecs/rt712-sdca.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -963,13 +963,6 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
963963
rt712_sdca_parse_dt(rt712, &rt712->slave->dev);
964964
rt712->component = component;
965965

966-
if (!rt712->first_hw_init)
967-
return 0;
968-
969-
ret = pm_runtime_resume(component->dev);
970-
if (ret < 0 && ret != -EACCES)
971-
return ret;
972-
973966
/* add SPK route */
974967
if (rt712->hw_id != RT712_DEV_ID_713) {
975968
snd_soc_add_component_controls(component,
@@ -980,6 +973,13 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
980973
rt712_sdca_spk_dapm_routes, ARRAY_SIZE(rt712_sdca_spk_dapm_routes));
981974
}
982975

976+
if (!rt712->first_hw_init)
977+
return 0;
978+
979+
ret = pm_runtime_resume(component->dev);
980+
if (ret < 0 && ret != -EACCES)
981+
return ret;
982+
983983
return 0;
984984
}
985985

0 commit comments

Comments
 (0)