-
Notifications
You must be signed in to change notification settings - Fork 140
ASoC: SOF: pcm: add sof_keep_normal_fes to keep normal fes #3217
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
ASoC: SOF: pcm: add sof_keep_normal_fes to keep normal fes #3217
Conversation
Original SOF design use ignore_machine to use topolgy and ignore normal machine driver's FEs, all FEs of SOF should be from topology and audio path goto DSP. In this patch, a new flag sof_keep_normal_fes is introduced in sof_dev_desc to keep normal FEs then can reuse them. The advantage of sof_keep_normal_fes is one machine driver can use both sof plaform driver and normal platform driver and it provides the flexibilties to choose which audio paths on AP and which paths on DSP. User can choose them depends on audio processing requirements and DSP maximum speed capability. We can offload the process of certain audio data(e.g. speaker/headphone) to dsp and we can reuse normal alsa driver for those audio data which don't need dsp offloading. (e.g. Display port). Set sof_keep_normal_fes as '1' to skip ignore_machine then keep normal FEs, default value is '0' for backward compatible. Signed-off-by: YC Hung <yc.hung@mediatek.com>
kv2019i
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is certainly a welcome ability to mix DSP and non-DSP usage. Not sure whether this is the only way to enable this though. Let's see if we get more insights from other reviewers.
| bool use_acpi_target_states; | ||
|
|
||
| /*set to 1 to not use ignore_machine and still keep the normal platform driver*/ | ||
| bool sof_keep_normal_fes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is already "sof_dev_desc", the "sof_" prefix is not needed. Also "normal" is a bit problematic, it depends on the case what is normal, so this can lead to confusion later on. Maybe "fixed_fe_link_config"?
| pd->pcm_construct = sof_pcm_new; | ||
| pd->ignore_machine = drv_name; | ||
| if (!plat_data->desc->sof_keep_normal_fes) | ||
| pd->ignore_machine = drv_name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the situation is that you have an sof plaform driver and a 'normal' platform driver then presumably they register two separate ASoC components.
So it's not clear to me why we would add in the SOF driver something that relates to the other component. There should be something in the card creation that ignores FEs when the component of that FE needs to be overridden.
In other words, the ignore_machine should be a component property, not a card property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @plbossart. Are you suggesting that the 2 platforms drivers are used concurrently? If that is the case, shouldnt the SOF platform driver always ignore the FE's that are associated with the audio paths on the AP?
Original SOF design use ignore_machine to use topolgy and ignore
normal machine driver's FEs, all FEs of SOF should be from topology and
audio path goto DSP. In this patch, a new flag sof_keep_normal_fes is
introduced in sof_dev_desc to keep normal FEs then can reuse them.
The advantage of sof_keep_normal_fes is one machine driver can use
both sof plaform driver and normal platform driver and it provides
the flexibilties to choose which audio paths on AP and which paths on
DSP. User can choose them depends on audio processing requirements and
DSP maximum speed capability. We can offload the process of certain
audio data(e.g. speaker/headphone) to dsp and we can reuse normal alsa
driver for those audio data which don't need dsp offloading.
(e.g. Display port). Set sof_keep_normal_fes as '1' to skip
ignore_machine then keep normal FEs, default value is '0' for backward
compatible.
Signed-off-by: YC Hung yc.hung@mediatek.com