Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 150
Generic process implementation#2129
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
588483021febe6ac1c78b2f5d64eFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -39,6 +39,12 @@ enum sof_comp_type { | ||
| SOF_COMP_ASRC, /**< Asynchronous sample rate converter */ | ||
| SOF_COMP_DCBLOCK, | ||
keyonjie marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| SOF_COMP_SMART_AMP, /**< smart amplifier component */ | ||
| /* | ||
| * No more _COMP_ types to be added. | ||
| * Use SOF_COMP_PROCESS from now on. | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @keyonjie@lgirdwood Shouldn't this be "No more COMP types should be added for effects" (snd_soc_dapm_effect/sof_ipc_comp_process)? If want to have main type that defines the ALSa controls and IPC msg, and flavor which can vary, we can't put everything under same component id right? The above comment would mean our current list of main types is exhaustive and it will never be extended. This doesn't make sense. If we add a new component class, it should be identified by a unique component type. Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, let me change it to "No more COMP types should be added for effects/process". | ||
| */ | ||
| SOF_COMP_PROCESS = 1000, /**< generic process component */ | ||
| /* keep FILEREAD/FILEWRITE as the last ones */ | ||
| SOF_COMP_FILEREAD = 10000, /**< host test based file IO */ | ||
| SOF_COMP_FILEWRITE = 10001, /**< host test based file IO */ | ||
keyonjie marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| @@ -57,8 +63,7 @@ struct sof_ipc_comp { | ||
| uint32_t pipeline_id; | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/flavour/favour in commit message? Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oops, thanks. | ||
| uint32_t core; | ||
| /* reserved for future use */ | ||
| uint32_t reserved[1]; | ||
| uint32_t subtype; /**< flavour for generic component type */ | ||
| } __packed; | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The FW discussion ( thesofproject/sof#2956 ) seems to be moving to use UUIDs directly, so let's target that. Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay. | ||
| /* | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2183,7 +2183,13 @@ static int sof_process_load(struct snd_soc_component *scomp, int index, | ||
| process->comp.hdr.size = ipc_size; | ||
| process->comp.hdr.cmd = SOF_IPC_GLB_TPLG_MSG | SOF_IPC_TPLG_COMP_NEW; | ||
| process->comp.id = swidget->comp_id; | ||
| process->comp.type = type; | ||
| if (sdev->fw_ready.version.abi_version >= SOF_ABI_VER(3, 17, 0)) { | ||
| /* use generic process component if supported */ | ||
| process->comp.type = SOF_COMP_PROCESS; | ||
| process->comp.subtype = type; | ||
| ||
| } else { | ||
| process->comp.type = SOF_COMP_PROCESS; | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this be Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep, good catch, thanks. | ||
| } | ||
| process->comp.pipeline_id = index; | ||
| process->config.hdr.size = sizeof(process->config); | ||
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.
@keyonjie The discussions page is not public for all and we didn't really conclude anything there, so I would not refer to it from the commit message, but rather summarize the design here. I'd also not refer to the FW PR in the commit message (we have not done that traditionally in the kernel commit messages -> rather have these in the kernel PR description). I'd also drop the paragraph on "After this series is applied.."
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.
Good points, thank you.