ASoC: rt712: avoid duplicate reset in io_init

The codec should be reset only once during io_init, regardless of
whether the system performs a warm or cold reboot.

Fixes: 4c9854ad3c ("ASoC: rt712-sdca: reset codec at io_init to fix silent headphone")
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20261001090219.797880-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Shuming Fan 2026-10-01 17:02:19 +08:00 committed by Mark Brown
parent 5367243a37
commit 923ff8155e
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -2088,7 +2088,8 @@ int rt712_sdca_io_init(struct device *dev, struct sdw_slave *slave)
pm_runtime_get_noresume(&slave->dev);
rt712_sdca_reset(rt712);
if (!rt712->first_hw_init)
rt712_sdca_reset(rt712);
rt712_sdca_index_read(rt712, RT712_VENDOR_REG, RT712_JD_PRODUCT_NUM, &val);
rt712->hw_id = (val & 0xf000) >> 12;
@ -2117,7 +2118,7 @@ int rt712_sdca_io_init(struct device *dev, struct sdw_slave *slave)
* if set_jack callback occurred early than io_init,
* we set up the jack detection function now
*/
if (rt712->hs_jack)
if (rt712->hs_jack && (!rt712->first_hw_init))
rt712_sdca_jack_init(rt712);
rt712_sdca_index_write(rt712, RT712_VENDOR_REG, RT712_SW_CONFIG1, 0x0001);