Skip to content

refine the hda stream management - #194

Closed
RanderWang wants to merge 2 commits into
thesofproject:topic/sof-devfrom
RanderWang:hda-link
Closed

RanderWang wants to merge 2 commits into
thesofproject:topic/sof-devfrom
RanderWang:hda-link

Conversation

@RanderWang

@RanderWang RanderWang commented Oct 19, 2018 •

Copy link
Copy Markdown

(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

(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 keyonjie left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@RanderWang

Copy link
Copy Markdown
Author

yes, for hda bug, it is another issue. How about this patch?
I will send anther patch for that issue.

@keyonjie

Copy link
Copy Markdown

I think those 2 patches at least looks no harm for us, I agree to merge them firstly.
@RanderWang could you please help file an issue(enhancement) for stream_tag decouple mode to trace the new feature implementation.

@RanderWang

Copy link
Copy Markdown
Author

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@RanderWang RanderWang Oct 19, 2018 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

this is related to the issue capture cant work with HDA

@RanderWang

Copy link
Copy Markdown
Author

close this PR, because it may make others confused about my change

@RanderWang RanderWang closed this Oct 20, 2018
aiChaoSONG pushed a commit to aiChaoSONG/linux that referenced this pull request May 6, 2021
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.

3 participants