Uh oh!
There was an error while loading. Please reload this page.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this moment in code we can reach if dai_link is a normal link (no_pcm = 0, dynamic=0) or a BE link (no_pcm=1).
If the link is already BE, we should do nothing.
if the link is normal link, we should convert it to BE.
-> no_pcm = 1
-> now here is the challenge as dai_link doesn't have a .capture or .playback field.
It has:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about the capture_only and playback_only flag, too. But it seems it is set by a few machine driver only. I am not sure if we can relay on the capture_only and playback_only flag or not. The other question is that is there any link supports none of playback and capture?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bardliao If I would have to guess I would say that not-supporting playback/capture makes no sense. So, I think we can infer that by default if capture_only is not set and playback_only is not set then both playback/capture are supported.
I have sent an email to alsa mailing list to clarify this situation:
https://mailman.alsa-project.org/pipermail/alsa-devel/2020-May/168352.html
I think the best way to fix this is as follows:
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dbaluta I asked the question on alsa-devel on why we have separate flags for dpcm and non-dpcm solutions. I think it's a complete mess. We should have .pcm_playback and .pcm_capture flags only, you can infer playback_only and capture_only when only one of the two is set.