Uh oh!
There was an error while loading. Please reload this page.
Fix IPC4 pipeline trigger - #3917
Conversation
b0b45f0 to
7641581CompareUh oh!
There was an error while loading. Please reload this page.
7641581 to
768141bCompare71a5e88 to
b001899CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| for (i = 0; i < pipeline_info.count; i++) { | ||
| pipeline_widget = pipeline_info.pipelines[i]; | ||
| pipeline = pipeline_widget->private; | ||
| pipeline->state = state; |
There was a problem hiding this comment.
So, we still have the separate BE (DAI) pipeline trigger and we handle the non BE (DAI) pipelines in batch mode?
There was a problem hiding this comment.
no if there are multiple BE DAI's, their pipelines will get triggered in the respective BE trigger callbacks. There wouldnt be a batch mode there
There was a problem hiding this comment.
In here it does not matter if we have triggered it or not like in case of the pause?
There was a problem hiding this comment.
it does matter and if it is triggered it will be in the right state already no?
There was a problem hiding this comment.
I meant the ones newly triggered will need an update to the state and the others will be the same state already. So, no need to check here
ujfalusi
commented
Oct 13, 2022
@ranj063, I have started internal IPC4 daily test plan: 16213 |
b001899 to
a11c35bComparea8c8e8a to
8b063a4CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| case SOF_DAI_INTEL_HDA: | ||
| gtw_attr = ipc4_copier->gtw_attr; | ||
| gtw_attr->lp_buffer_alloc = pipeline->lp_mode; | ||
| pipeline->skip_during_fe_trigger = true; |
There was a problem hiding this comment.
I am still in the dark on why we need to skip only HDAudio pipelines?
There was a problem hiding this comment.
because they're the only ones left with BE DAI trigger ops
There was a problem hiding this comment.
Can't we detect this rather than add a flag that duplicates information that can be discovered?
There was a problem hiding this comment.
I can think of doing this with a very convoluted check by accessing the snd_soc_dai from the snd_sof_widget using the sname and then checking if the dai->drv-ops are set. But the flag is a lot simpler I think
There was a problem hiding this comment.
Don't we have a snd_sof_dai -> snd_soc_dai helper? I don't really understand why we don't have a 1:1 mapping.
There was a problem hiding this comment.
we don't have a 1:1 mapping, Pierre. I can add this in a follow up maybe
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
67622a0 to
dcab26aCompareThese will be used to perform IPC-specific PCM setup/free. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
dcab26a to
462da65CompareUh oh!
There was an error while loading. Please reload this page.
| }; | ||
| /** | ||
| * struct snd_sof_pipeline_trigger_info - multi pipeline trigger IPC info |
There was a problem hiding this comment.
How this struct is 'multi pipeline trigger IPC info'?
It is more like pipeline path or pipeline list.
In any case, I find it increasingly confusing that snd_sof_widget is sometimes a widget, module, component or a pipeline.
Probably it is really a snd_sof_pipeline_trigger_path? Certainly not IPC info.
There was a problem hiding this comment.
And this does not necessarily needs to be valid for paths which consists of more than one pipeline (we always have at least 2 pipelines with IPC4, are they also multi-pipeline?)
There was a problem hiding this comment.
In any case, I find it increasingly confusing that
snd_sof_widgetis sometimes a widget, module, component or a pipeline.
a widget is never a pipeline but widget/module/component are all used intrerchageably. There's a pipeline widget which is a widget of type snd_soc_dapm_scheduler.
There was a problem hiding this comment.
How this struct is 'multi pipeline trigger IPC info'?
I changed the name to snd_sof_pcm_stream_trigger_info now. hope that makes more sense.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Define the pcm_setup/pcm_free ops for IPC4. Define a new struct snd_sof_pcm_stream_trigger_info and add a new field trigger_info of this type to struct snd_sof_pcm_stream. This will be used to save the list of pipelines that need to be triggered. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
…trigger Add a new flag, skip_during_fe_trigger, to struct sof_ipc4_pipeline to skip triggering pipelines in the FE DAI trigger. Set this flag for the HDA DAI BE pipelines so that their BE pipeline will not be triggered in the FE DAI trigger. Also, move the trigger handling for all commands include START/PAUSE_RELEASE for the HDA DAI's to the backend DAI trigger ops. For the SSP/DMIC/SDW cases, remove the BE DAI trigger as they involve no DMA operations and can be triggered in the FE DAI trigger. This is in preparation to perform batch triggering of all pipelines for the non-HDA case. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Populate the pipeline_info for the PCM stream with the list of pipeline widgets that need to be handled during the PCM trigger. This will be used in the IPC-specific PCM trigger op to trigger the pipelines. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Uh oh!
There was an error while loading. Please reload this page.
462da65 to
dd63b11CompareUse the list of pipelines in the PCM stream's pipeline info to trigger the pipelines in the right order. Add a helper for triggering pipelines in batch mode that will be used to trigger multiple pipelines at the same time. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
52285a3 to
4abe644CompareUh oh!
There was an error while loading. Please reload this page.
bardliao
left a comment
There was a problem hiding this comment.
This PR LGTM and test result looks good
| return 0; | ||
| /* allocate data for the pipeline ID's and the count of pipelines to be triggered */ | ||
| data = kzalloc(sizeof(u32) * (pipeline_info->count + 1), GFP_KERNEL); |
There was a problem hiding this comment.
data=kzalloc(struct_size(data, pipeline_ids, pipeline_info->count), GFP_KERNEL);There was a problem hiding this comment.
this too, can I fix in a fixup?
Uh oh!
There was an error while loading. Please reload this page.
| */ | ||
| struct snd_sof_pcm_stream_trigger_info { | ||
| uint32_t count; | ||
| struct snd_sof_widget **pipeline_list; |
There was a problem hiding this comment.
I'm not good at naming, but would
struct snd_sof_pcm_stream_pipeline_list {
uint32_t count;
struct snd_sof_widget **pipelines;
};
or
struct snd_sof_pipelines_in_pcm_stream {
uint32_t count;
struct snd_sof_widget **pipeline_list;
};
would describe this better?
The reason is that I don't see anything trigger_infoish in the struct
There was a problem hiding this comment.
@ujfalusi pipeline_list is the list of pipelines to be triggered. Isn't that good enough? And it is only used in the trigger callback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
plbossart
commented
Oct 20, 2022
merging |
tested with thesofproject/sof#6401
FIrst patch is from the previous PR #3914