Skip to content

Conversation

@bardliao
Copy link
Collaborator

To avoid it is reset to 0 when second alh is registered to the same
stream.

Signed-off-by: Bard Liao yung-chuan.liao@linux.intel.com

To avoid it is reset to 0 when second alh is registered to the same
stream.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

@bardliao can you describe the problem here in more detail. i.e. include all the steps prior to the issue and how this works around the issue. @lbetlej fyi

@slawblauciak
Copy link
Collaborator

@lgirdwood the stream params are not properly propagated through the mux component. This hack should not be implemented, rather, the underlying problem should be fixed instead.
I'm currently investigating and looking for a proper way to fix this.

@lgirdwood
Copy link
Member

@slawblauciak yep, thanks, that's what I was trying to establish here It seems we have some issues with MUX atm..

@bardliao
Copy link
Collaborator Author

@bardliao can you describe the problem here in more detail. i.e. include all the steps prior to the issue and how this works around the issue. @lbetlej fyi

The problem is that I will see comp_err(dev, "dai_params() error: invalid period_bytes."); when I try the synchronize playback topology. And the error is due to dd->local_buffer->stream.channels is 0.
Note that the two DAIs which connect to the demux share the same sof_ipc_stream_params{}. So, when alh_get_hw_params() is called for the 2nd DAI, the configured params will be reset to 0.

@lgirdwood
Copy link
Member

@bardliao can you describe the problem here in more detail. i.e. include all the steps prior to the issue and how this works around the issue. @lbetlej fyi

The problem is that I will see comp_err(dev, "dai_params() error: invalid period_bytes."); when I try the synchronize playback topology. And the error is due to dd->local_buffer->stream.channels is 0.
Note that the two DAIs which connect to the demux share the same sof_ipc_stream_params{}. So, when alh_get_hw_params() is called for the 2nd DAI, the configured params will be reset to 0.

Why and where are they reset to 0 ? Can you describe the flow and topology.

@bardliao
Copy link
Collaborator Author

Why and where are they reset to 0 ? Can you describe the flow and topology.

The topology is #2542 and below is the flow

ipc_stream_pcm_params() 
    -> pipeline_params()
    -> loop calling pipeline_comp_hw_params() for each component 
    -> dai_hw_params() 
    -> alh_get_hw_params() where params->channels will be set to 0

Btw, I think @slawblauciak is looking into this issue.

@slawblauciak
Copy link
Collaborator

@lgirdwood when the values are set to 0, they are supposed to be set properly later, when stream parameters are propagated through the pipeline. However, that seems to be somewhat broken with mux/demux, I managed to pinpoint the issue. I'm currently working on a fix.

@bardliao
Copy link
Collaborator Author

@slawblauciak will create another PR to fix it.

@bardliao bardliao closed this Mar 26, 2020
@@ -41,7 +41,7 @@ static int alh_get_hw_params(struct dai *dai,
{
/* 0 means variable */
params->rate = 0;
Copy link
Collaborator

@singalsu singalsu Mar 26, 2020

Choose a reason for hiding this comment

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

The rate should be set also (48000). Components SRC and ASRC need it.

This similar hack is also needed for HDA.

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