Skip to content
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

Audio: Multiband-DRC: Add switch control for IPC4 #8140

Merged

Conversation

singalsu
Copy link
Collaborator

@singalsu singalsu commented Sep 1, 2023

No description provided.

Copy link
Contributor

@ujfalusi ujfalusi left a comment

Choose a reason for hiding this comment

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

@singalsu, looks good to my eyes, thanks,

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Looks good with the change to last patch.

src/include/ipc4/header.h Outdated Show resolved Hide resolved
@singalsu singalsu force-pushed the multiband_drc_add_ipc4_switch_control branch from 8f1d2b3 to 6ed5db4 Compare September 1, 2023 12:46
@singalsu singalsu requested a review from kv2019i September 1, 2023 12:47
@singalsu singalsu marked this pull request as ready for review September 1, 2023 12:49
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.

Thanks @singalsu , one comment from me.

src/include/ipc4/header.h Outdated Show resolved Hide resolved
@singalsu singalsu force-pushed the multiband_drc_add_ipc4_switch_control branch 2 times, most recently from 1ea9a49 to 95aa269 Compare September 1, 2023 13:00
@singalsu singalsu requested a review from lgirdwood September 1, 2023 13:01
comp_info(dev, "process_enabled = %d", cd->process_enabled);
} else {
comp_err(dev, "Illegal control id = %d, num_elems = %d",
ctl->id, ctl->num_elems);
Copy link
Collaborator

Choose a reason for hiding this comment

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

but still returning 0 - ignoring and continuing?

Copy link
Contributor

Choose a reason for hiding this comment

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

should not, need return a negative value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll test what happens if I return error, I didn't want to stop streaming so I left it out, but maybe it doesn't. It's good if only amixer errors.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The control handler now errors as requested. The playback doesn't start at all since the control is sent to FW after init. I guess it's good to error incorrect topologies instead of just logging the errors, so proposing this now.

src/include/ipc4/header.h Show resolved Hide resolved
#if CONFIG_IPC_MAJOR_3
/* Other control types are possible only with IPC3 */
#if CONFIG_IPC_MAJOR_4
struct sof_ipc4_control_msg_payload *ctl;
Copy link
Contributor

Choose a reason for hiding this comment

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

line 336 only used under line 339, can move to line 339

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I combined the pointer declare and set. OK now?

comp_info(dev, "process_enabled = %d", cd->process_enabled);
} else {
comp_err(dev, "Illegal control id = %d, num_elems = %d",
ctl->id, ctl->num_elems);
Copy link
Contributor

Choose a reason for hiding this comment

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

should not, need return a negative value.

The structs sof_ipc4_control_msg_payload and sof_ipc4_ctrl_value_chan
match the similar structures in Linux kernel SOF IPC4 driver.

Signed-off-by: Seppo Ingalsuo <[email protected]>
This patch adds switch control handling into multiband_drc_set_config()
operation. The switch control is a set large config with
param_id set to SOF_IPC4_SWITCH_CONTROL_PARAM_ID.

The patch changes config_id to param_id in this function. The
config_id name was confusing.

Signed-off-by: Seppo Ingalsuo <[email protected]>
The workaround is preserved but the comment is updated to describe why.

Signed-off-by: Seppo Ingalsuo <[email protected]>
@singalsu singalsu force-pushed the multiband_drc_add_ipc4_switch_control branch from 95aa269 to 1926420 Compare September 5, 2023 11:46
@singalsu singalsu requested review from lyakh and btian1 September 5, 2023 11:46
@singalsu
Copy link
Collaborator Author

singalsu commented Sep 8, 2023

"45 successful and 2 failing checks"

The sparse issue is not related. Also the not tested in cavs2.5 jenkins can't be related.

@cujomalainey
Copy link
Contributor

is cavs2.5 CI down?

@singalsu
Copy link
Collaborator Author

SOFCI TEST

@kv2019i
Copy link
Collaborator

kv2019i commented Sep 13, 2023

@cujomalainey The CI results publishing has an issue (fix under way). I'm looking up the results manually during this time. cAVS2.5 test results ok, ACE results still in progress (but all good so far). Once that completes, we can merge this.

@singalsu
Copy link
Collaborator Author

@cujomalainey Some good news, we have now successfully tested also enum control. Switch and enum controls update notification from firmware to user space works too. I'll update the example later to TDFB component.

@lgirdwood lgirdwood merged commit 0fd9828 into thesofproject:main Sep 14, 2023
40 of 41 checks passed
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.

8 participants