Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoundWire: use HDAudio registers for LunarLake #4471

Merged
merged 5 commits into from
Jul 28, 2023

Conversation

plbossart
Copy link
Member

important update reflecting updated programming flows, the use of SDWWAKEEN is reserved to the DSP and the global HDAudio registers must be used to detect wakes from low-power modes.

@bardliao @RanderWang comments welcome.

@plbossart plbossart force-pushed the sdw/wake-en-sts branch 2 times, most recently from 0990a2c to 5107b14 Compare July 12, 2023 05:44
bardliao
bardliao previously approved these changes Jul 12, 2023
RanderWang
RanderWang previously approved these changes Jul 12, 2023
@plbossart
Copy link
Member Author

This needs to be rebased once #4440 is merged.

Likely a combination of copy-paste and test coverage problem. Oops.

Fixes: 87a6ddc ("ASoC: SOF: Intel: hda-mlink: program SoundWire LSDIID registers")
Signed-off-by: Pierre-Louis Bossart <[email protected]>
The existing code cannot work for LunarLake, let's add a layer of
abstraction.

No functional change in this patch.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
We need to retrieve the current value to deal with the HDAudio
WAKEEN/WAKESTS setup.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
The initial programming sequence only worked in the case where the
OFLEN bit is set, i.e. the DSP handles the SoundWire interface. In the
Linux integration, the interface is owned by the host. This disconnect
leads to wake-ups being routed to the DSP and not to the host.

The suggested update is to rely on the global HDAudio WAKEEN/STATESTS
registers, with the SDI bits used to program the wakeups and check the
status.

Note that there is no way to know which peripheral generated a
wake-up. When the hardware detects a change, it sets all the bits
corresponding to LSDIIDx. The LSDIIDx information can be used to
figure out on which link the wakeup happened, but for further details
the software will have to check the status of each peripheral.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
The global STATESTS register will provide information on all
links. Rather than iterate on all possible links, the helpers only
filters the range of possible bits for a quick lookup. The
process_wakeen() helper will walk through all the links and deal with
wakes.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
@plbossart plbossart merged commit 7da9992 into thesofproject:topic/sof-dev Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants