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

ASoC: don't call trigger ops if the stream is not supported #4434

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

bardliao
Copy link
Collaborator

soc_dai_trigger may be called when the stream is not supported. We should not call the trigger ops in that case to avoid unexpect behavior.

Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

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

see comments below @bardliao

sound/soc/soc-dai.c Show resolved Hide resolved
@@ -617,8 +617,14 @@ int snd_soc_pcm_dai_prepare(struct snd_pcm_substream *substream)
static int soc_dai_trigger(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream, int cmd)
{
struct snd_soc_pcm_stream *stream;
Copy link
Member

Choose a reason for hiding this comment

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

commit message:

ASoC: soc-dai: don't call trigger ops if the stream is not valid

soc_dai_trigger may be called when the stream is not valid
We should not call the trigger ops in that case to avoid unexpected
behavior or unintended side effects.

soc_dai_trigger may be called when the stream is not valid.
We should not call the trigger ops in that case to avoid unexpected
behavior or unintended side effects.

Signed-off-by: Bard Liao <[email protected]>
@plbossart plbossart merged commit bffba72 into thesofproject:topic/sof-dev Jun 27, 2023
7 of 8 checks passed
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.

4 participants