Repository navigation
refine the hda stream management - #194
RanderWang wants to merge 2 commits into
Conversation
(1) remove redundant stream get function for different direction
(2) get last capture stream for dma trace. this make FW easier
to manage dma channels just from index 0, or it is complex
to match host dma and link dma because the channel of host dma
would be based on one, but zero with link dma
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
keyonjie
left a comment
There was a problem hiding this comment.
Hi @RanderWang , I think your solution still not work if we have I2S streams which occupied those beginning stream_tags, sending link stream_tag for HDA/HDMI pipelines looks inevitable.
|
yes, for hda bug, it is another issue. How about this patch? |
|
I think those 2 patches at least looks no harm for us, I agree to merge them firstly. |
|
done by thesofproject/sof#497 |
| /* get next unused stream */ | ||
| struct hdac_ext_stream * | ||
| hda_dsp_stream_get(struct snd_sof_dev *sdev, int direction) | ||
| hda_dsp_stream_get(struct snd_sof_dev *sdev, int direction, int reverse) |
There was a problem hiding this comment.
Why do clients need to know about the order of searching the list for the next free stream ? This should not be known by callers.
Can you explain more why this has to match with the FW
There was a problem hiding this comment.
Why do clients need to know about the order of searching the list for the next free stream ? This should not be known by callers.
for dma trace, it wants to get last capture stream, so it checks stream from last one to first one.
Can you explain more why this has to match with the FW
Now we allocate host dma channel and link dma channel base on the same stream tag. So If dma trace gets the index 0 channel, channel 1 would be gotten for host dma for capture by stream tag. And also channel 1 would be for link dma. But only channel 0 of link dma is the correct one which link to a hda codec. I fire a enhancement to totally fix it but it maybe not a easy task finished in short time.(thesofproject/sof#497) because each hda codec is fixed to a link dma channel, and this is defined by HW spec.
We need to get the hw info and send to FW. For COE driver, these info is gotten from topology. We need to check whether we can get it from some registers
There was a problem hiding this comment.
this is related to the issue capture cant work with HDA
|
close this PR, because it may make others confused about my change |
Avoid `-n1` with `-I`
(1) remove redundant stream function for different directions
(2) get last capture stream for dma trace. this make FW easier
to manage dma channels just from index 0, or it is complex
to match host dma and link dma because the channel of host dma
would be based on one, but zero with link dma