-
Notifications
You must be signed in to change notification settings - Fork 349
component: reorder the switch case in comp_get_requested_state() #4812
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
Conversation
Pipeline trigger is now handled as part of the pipeline task. Keeping the PRE_START/PRE_RELEASE as the last options in the switch case to get the current component state results in task taking taking too long during PRE_START leading to an xrun with the first copy in the pipeline task. Move the PRE_START/PRE_RELEASE options as the first cases to fix this. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
|
@lyakh this fixes my problem with deep buffer pipelines and hda topology for me. But I feel like maybe we need to speed up the trigger now that it is part of the pipeline task. Maybe we should have an array look-up for translating trigger commands to the requested state. What do you think? |
This really shouldn't be a fix. The difference should be just a couple of DSP cycles, a couple of assembly instructions, we really shouldn't be down to that. If we are, we have a bigger problem to solve. Also effects of such reordering are compiler specific. So, no, I'm very suspicious that this actually is making a difference in your tests... |
@lyakh that is my worry too but this does fix my problem. maybe what we need to do is time how long the trigger set state takes per comp and see how to proceed |
I'll eat my hat if this is the case (mmh, no, I won't, but still). Is this in multicore configurations? Can there be a race? I'd much rather suspect a race with an interrupt or something, where by moving the instructions earlier the racing interrupt now hits after them or something. |
|
SOFCI TEST |
And I still get an xrun... firmware: #4611 + #4812 test with this script that starts two streams going to the same mixer. |
@plbossart agree. Its just bizarre that this has an effect. @lyakh and I agreed for him to look into race conditions with the pipeline trigger in this case. I will close this PR and open an issue instead |
Pipeline trigger is now handled as part of the pipeline
task. Keeping the PRE_START/PRE_RELEASE as the last options
in the switch case to get the current component state results
in task taking taking too long during PRE_START leading to an
xrun with the first copy in the pipeline task. Move the
PRE_START/PRE_RELEASE options as the first cases to fix this.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com