Skip to content

Commit a36ec5f

Browse files
plbossartvinodkoul
authored andcommitted
soundwire: intel_ace2x: simplify check_wake()
Since LunarLake, we use the HDadio WAKEEN/WAKESTS to detect wakes for SoundWire codecs. This patch follows the HDaudio example and simplifies the behavior on wake-up by unconditionally waking up all links. This behavior makes a lot of sense when removing the jack, which may signal that the user wants to start rendering audio using the local amplifiers. Resuming all links helps make sure the amplifiers are ready to be used. Worst case, the pm_runtime suspend would kick-in after several seconds of inactivity. Closes: thesofproject#4687 Co-developed-by: Bard Liao <[email protected]> Signed-off-by: Bard Liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Keqiao Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 79e7123 commit a36ec5f

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

drivers/soundwire/intel_ace2x.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,12 @@ static void intel_shim_vs_set_clock_source(struct sdw_intel *sdw, u32 source)
5151

5252
static int intel_shim_check_wake(struct sdw_intel *sdw)
5353
{
54-
u16 lsdiid = 0;
55-
u16 wake_sts;
56-
int ret;
57-
58-
/* find out which bits are set in LSDIID for this sublink */
59-
ret = hdac_bus_eml_sdw_get_lsdiid_unlocked(sdw->link_res->hbus, sdw->instance, &lsdiid);
60-
if (ret < 0)
61-
return ret;
62-
6354
/*
64-
* we need to use the global HDaudio WAKEEN/STS to be able to detect
65-
* wakes in low-power modes
55+
* We follow the HDaudio example and resume unconditionally
56+
* without checking the WAKESTS bit for that specific link
6657
*/
67-
wake_sts = snd_hdac_chip_readw(sdw->link_res->hbus, STATESTS);
6858

69-
return wake_sts & lsdiid;
59+
return 1;
7060
}
7161

7262
static void intel_shim_wake(struct sdw_intel *sdw, bool wake_enable)

0 commit comments

Comments
 (0)