ASoC: rt1320: run the initialisation preset on the first hardware init
rt1320_io_init() applies the vendor initialisation preset only when the
amplifier's SDCA function status has FUNCTION_NEEDS_INITIALIZATION set:
if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION)) {
Its two sibling drivers guard the same write differently, also running
the preset on the first hardware init:
rt712-sdca.c: if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION) ||
(!rt712->first_hw_init)) {
rt722-sdca.c: if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION) ||
(!rt722->first_hw_init)) {
On the Microsoft Surface Pro 11 (Intel) the RT1320 never sets that bit.
Its function status reads back 0x41 on every boot, cold or warm:
rt1320-sdca sdw:0:0:025d:1320:01: rt1320_io_init amp func_status=0x41
which is NEWLY_ATTACHED | FUNCTION_HAS_BEEN_RESET: the function reports
that it has been reset and does not consider itself in need of
initialisation. Bit 5 is never set, so the preset never runs,
rt1320_vc_preset() and the MCU patch load are skipped, and the amplifier
is left unprogrammed. rt712 and rt722 would have run it via their
first_hw_init fallback.
Add the same fallback. With it rt1320_vc_preset() executes and the
amplifier reports RT1320_KR0_INT_READY=0x1f where previously it did not.
Signed-off-by: Sergey Lebedev <lsa.uz@pm.me>
Link: https://patch.msgid.link/20260804225853.31585-2-lsa.uz@pm.me
Signed-off-by: Mark Brown <broonie@kernel.org>