summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2024-04-26 08:40:30 +0200
committerVinod Koul <vkoul@kernel.org>2024-04-26 16:22:11 +0200
commita36ec5f7625d923212f7b869f7870616b15f20a2 (patch)
treec76cefa188d7081f8bf95a060430ff3deb489872 /drivers/soundwire
parentsoundwire: intel_ace2x: fix wakeup handling (diff)
downloadlinux-a36ec5f7625d923212f7b869f7870616b15f20a2.tar.xz
linux-a36ec5f7625d923212f7b869f7870616b15f20a2.zip
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: https://github.com/thesofproject/linux/issues/4687 Co-developed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Keqiao Zhang <keqiao.zhang@intel.com> Link: https://lore.kernel.org/r/20240426064030.2305343-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/intel_ace2x.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/soundwire/intel_ace2x.c b/drivers/soundwire/intel_ace2x.c
index 8812527af4a8..75e629c938dc 100644
--- a/drivers/soundwire/intel_ace2x.c
+++ b/drivers/soundwire/intel_ace2x.c
@@ -51,22 +51,12 @@ static void intel_shim_vs_set_clock_source(struct sdw_intel *sdw, u32 source)
static int intel_shim_check_wake(struct sdw_intel *sdw)
{
- u16 lsdiid = 0;
- u16 wake_sts;
- int ret;
-
- /* find out which bits are set in LSDIID for this sublink */
- ret = hdac_bus_eml_sdw_get_lsdiid_unlocked(sdw->link_res->hbus, sdw->instance, &lsdiid);
- if (ret < 0)
- return ret;
-
/*
- * we need to use the global HDaudio WAKEEN/STS to be able to detect
- * wakes in low-power modes
+ * We follow the HDaudio example and resume unconditionally
+ * without checking the WAKESTS bit for that specific link
*/
- wake_sts = snd_hdac_chip_readw(sdw->link_res->hbus, STATESTS);
- return wake_sts & lsdiid;
+ return 1;
}
static void intel_shim_wake(struct sdw_intel *sdw, bool wake_enable)