Skip to content

[TEST] ASoC: rt700: disable jack detection when the codec suspends - #2949

Closed
shumingfan wants to merge 1 commit into
thesofproject:topic/sof-devfrom
shumingfan:topic/sof-dev
Closed

shumingfan wants to merge 1 commit into
thesofproject:topic/sof-devfrom
shumingfan:topic/sof-dev

Conversation

@shumingfan

@shumingfan shumingfan commented May 28, 2021 •

Copy link
Copy Markdown

This patch tries to avoid the unexpected interrupt to do the jack detection after the codec suspends.

TEST only for #2943

Signed-off-by: Shuming Fan shumingf@realtek.com

This patch tries to avoid the unexpected interrupt to do the jack detection after the codec suspends.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
dev_dbg(dev, "in %s jd enable\n", __func__);

regmap_write(rt700->regmap,
RT700_SET_AUDIO_POWER_STATE, AC_PWRST_D3);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is correct somehow and has been tested, but just seems a bit odd... Is it really switching to D3 during resume?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is just the power-saving mode for the codec. The codec driver should go to power-saving mode before going to the suspend state. So, I just set back to power-saving mode during the resume function.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, but we're resuming for playback, the codec goes to D3 here and then presumably it's switched back to D0 immediately, right? Is that common or has some specific reason? Naively I'd expect .resume() to bring the system to a fully operational mode to be able to begin operation immediately. Although bringing the hardware to some intermediate state, waiting for the actual operation to begin, should work too...

@plbossart

Copy link
Copy Markdown
Member

@shumingfan @bardliao I am not sure if we want this 'eature'. The Intel parts are capable of detecting a SoundWire wake while in pm_runtime suspend. I am not sure why we would disable this capability at the codec level. It's fine for a test, but it doesn't look like a good move.

@shumingfan

Copy link
Copy Markdown
Author

@shumingfan @bardliao I am not sure if we want this 'eature'. The Intel parts are capable of detecting a SoundWire wake while in pm_runtime suspend. I am not sure why we would disable this capability at the codec level. It's fine for a test, but it doesn't look like a good move.

@plbossart This patch just is used to debug and test for issue #2943. After the testing, this patch can't fix the issue and the problem should be why the codec driver goes to pm_runtime suspend from the resume so quick.
We will check the issue first. After that, I will close this PR.

@shumingfan shumingfan closed this Jun 5, 2021
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