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: max98357a: handle playback trigger only #4432

Closed
wants to merge 1 commit into from

Conversation

bardliao
Copy link
Collaborator

Max98357a supports playback only. However, we may add capture capability in machine driver to use the BE to get the playback data for echo reference. That will introduce an issue that when the capture pcm is closed, the trigger ops will be triggered and power down max98357a. This commit adds a direction test and only handle playback triggers that will fix the issue.

Fixes: #4431

Max98357a supports playback only. However, we may add capture capability
in machine driver to use the BE to get the playback data for echo
reference. That will introduce an issue that when the capture pcm is
closed, the trigger ops will be triggered and power down max98357a.
This commit adds a direction test and only handle playback triggers that
will fix the issue.

Signed-off-by: Bard Liao <[email protected]>
@lyakh
Copy link

lyakh commented Jun 20, 2023

Great, that we have a fix! A question: why is the codec then triggered when the capture pipeline state changes? Shouldn't that be avoided, and would that be possible?

@plbossart
Copy link
Member

@lyakh that's because we set the .dpcm_capture flag in the machine driver dailink, but the dai does not support capture. that's really borderline legit.

see
https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sof_rt5682.c#L814
and
https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/codecs/max98357a.c#L104

@bardliao bardliao closed this Jun 21, 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.

[BUG] Speaker playback loses sound upon feedback capture stops
4 participants