ASoC: codecs: aw88261: only check PLL and clock state at power-up
The SYSST check performed during device start requires SWS (amplifier
switching, bit 8) and BSTS (boost finished, bit 9) on top of PLL lock
and clock stability. Those bits cannot be asserted at this point in the
sequence: the check runs after amppd release but before the
hmute/ULS-hmute release, and the amplifier neither switches nor
finishes ramping its boost converter while it is still muted. With the
Fairphone (Gen. 6) firmware profile, aw88261_dev_start() therefore
always fails with
check sysst fail, reg_val=0x0011, check:0x311
and playback aborts, even though the amplifier is fine and PLL lock
and stable clocks are present.
Check only PLL lock and clock stability, for which a definition
already exists; this still re-validates the clocks after amppd release
(aw88261_dev_check_syspll() checked them before it). This matches the
vendor aw882xx driver, which only validates PLL lock and clock
stability at this stage, and the in-tree aw88399 driver, which skips
the SWS check whenever the amplifier may legitimately not be switching
(AW88399_BIT_SYSST_NOSWS_CHECK).
Fixes: 028a2ae256 ("ASoC: codecs: Add aw88261 amplifier driver")
Assisted-by: Claude:claude-fable-5
Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
This commit is contained in:
parent
8afb0d14a3
commit
86dc1798f5
2 changed files with 3 additions and 9 deletions
|
|
@ -254,10 +254,10 @@ static int aw88261_dev_check_sysst(struct aw_device *aw_dev)
|
|||
return ret;
|
||||
|
||||
check_val = reg_val & (~AW88261_BIT_SYSST_CHECK_MASK)
|
||||
& AW88261_BIT_SYSST_CHECK;
|
||||
if (check_val != AW88261_BIT_SYSST_CHECK) {
|
||||
& AW88261_BIT_PLL_CHECK;
|
||||
if (check_val != AW88261_BIT_PLL_CHECK) {
|
||||
dev_err(aw_dev->dev, "check sysst fail, reg_val=0x%04x, check:0x%x",
|
||||
reg_val, AW88261_BIT_SYSST_CHECK);
|
||||
reg_val, AW88261_BIT_PLL_CHECK);
|
||||
usleep_range(AW88261_2000_US, AW88261_2000_US + 10);
|
||||
} else {
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -181,12 +181,6 @@
|
|||
AW88261_OTHS_OT_VALUE | \
|
||||
AW88261_PLLS_LOCKED_VALUE))
|
||||
|
||||
#define AW88261_BIT_SYSST_CHECK \
|
||||
(AW88261_BSTS_FINISHED_VALUE | \
|
||||
AW88261_SWS_SWITCHING_VALUE | \
|
||||
AW88261_CLKS_STABLE_VALUE | \
|
||||
AW88261_PLLS_LOCKED_VALUE)
|
||||
|
||||
#define AW88261_ULS_HMUTE_START_BIT (14)
|
||||
#define AW88261_ULS_HMUTE_BITS_LEN (1)
|
||||
#define AW88261_ULS_HMUTE_MASK \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue