Uh oh!
There was an error while loading. Please reload this page.
forked from torvalds/linux
- Notifications
You must be signed in to change notification settings - Fork 150
ASoC: SOF: core/Intel: Follow the pause_supported flag from topology to disable or keep the pause support enabled#5041
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
Merged
lgirdwood
merged 2 commits into
thesofproject:topic/sof-dev
from
ujfalusi:peter/sof/pr/pause-resume-token-01Oct 24, 2024
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -37,6 +37,11 @@ static bool hda_disable_rewinds; | ||
| module_param_named(disable_rewinds, hda_disable_rewinds, bool, 0444); | ||
| MODULE_PARM_DESC(disable_rewinds, "SOF HDA disable rewinds"); | ||
| static int hda_force_pause_support = -1; | ||
| module_param_named(force_pause_support, hda_force_pause_support, int, 0444); | ||
| MODULE_PARM_DESC(force_pause_support, | ||
| "Pause support: -1: Use default, 0: Disable, 1: Enable (default -1)"); | ||
| u32 hda_dsp_get_mult_div(struct snd_sof_dev *sdev, int rate) | ||
| { | ||
| switch (rate) { | ||
| @@ -240,6 +245,16 @@ int hda_dsp_pcm_open(struct snd_sof_dev *sdev, | ||
| if (hda_always_enable_dmi_l1 && direction == SNDRV_PCM_STREAM_CAPTURE) | ||
| runtime->hw.info &= ~SNDRV_PCM_INFO_PAUSE; | ||
| /* | ||
| * Do not advertise the PAUSE support if it is forced to be disabled via | ||
| * module parameter or if the pause_supported is false for the PCM | ||
| * device | ||
| */ | ||
| if (hda_force_pause_support == 0 || | ||
| (hda_force_pause_support == -1 && | ||
| !spcm->stream[substream->stream].pause_supported)) | ||
| runtime->hw.info &= ~SNDRV_PCM_INFO_PAUSE; | ||
plbossart marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| if (hda_always_enable_dmi_l1 || | ||
| direction == SNDRV_PCM_STREAM_PLAYBACK || | ||
| spcm->stream[substream->stream].d0i3_compatible) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -407,6 +407,10 @@ static const struct sof_topology_token stream_tokens[] = { | ||
| offsetof(struct snd_sof_pcm, stream[0].d0i3_compatible)}, | ||
| {SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3, SND_SOC_TPLG_TUPLE_TYPE_BOOL, get_token_u16, | ||
| offsetof(struct snd_sof_pcm, stream[1].d0i3_compatible)}, | ||
| {SOF_TKN_STREAM_PLAYBACK_PAUSE_SUPPORTED, SND_SOC_TPLG_TUPLE_TYPE_BOOL, get_token_u16, | ||
| offsetof(struct snd_sof_pcm, stream[0].pause_supported)}, | ||
| {SOF_TKN_STREAM_CAPTURE_PAUSE_SUPPORTED, SND_SOC_TPLG_TUPLE_TYPE_BOOL, get_token_u16, | ||
| offsetof(struct snd_sof_pcm, stream[1].pause_supported)}, | ||
plbossart marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| }; | ||
| /* Leds */ | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.