Skip to content

Conversation

@mbukowsk
Copy link
Contributor

Audio privacy feature allows end user to directly
control if user space applications receive actual
data from input devices (microphones). The control
is bypassing application level settings or operating
system controls (like audio endpoint volume).

return mic_privacy_api->get_dma_data_zeroing_link_select();
}
//hardcoded for FW_MANAGED
return 0xFFFFFFFF;
Copy link
Collaborator

Choose a reason for hiding this comment

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

~0

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.

@mbukowsk can you confirm a high level overview of how it works when FW managed. i.e. I assume FW will send an IPC to SW when the mute is enabled/disabled ? What about Mic state at FW boot ?

#include <ipc4/base-config.h>
#include "../audio/copier/copier_gain.h"

#define ADSP_RTC_FREQUENCY 32768
Copy link
Member

Choose a reason for hiding this comment

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

This should be in Zephyr as its HW specific.

Copy link
Contributor

@jsarha jsarha left a comment

Choose a reason for hiding this comment

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

No bugs from me (the others already found the serious stuff), but couple of suggestions more.

@abonislawski abonislawski force-pushed the mbukowsk-mic_privacy branch 6 times, most recently from 70c6211 to 37336ba Compare February 8, 2025 16:32
@lgirdwood
Copy link
Member

@mbukowsk can you check CI, several failures. Thanks !

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.

@mbukowsk, the privacy_capabilities is configured to the wrong struct, that is going to case the host quite a bit of issues as it will not find it in hw_config and there will be two entries with the same ID in fw_config.

@lgirdwood
Copy link
Member

@mbukowsk, the privacy_capabilities is configured to the wrong struct, that is going to case the host quite a bit of issues as it will not find it in hw_config and there will be two entries with the same ID in fw_config.

@ujfalusi ok that's a blocker for kernel. Can you reply with what this should look like for kernel so @mbukowsk can copy.

@ujfalusi
Copy link
Contributor

ujfalusi commented Feb 11, 2025

@mbukowsk, the privacy_capabilities is configured to the wrong struct, that is going to case the host quite a bit of issues as it will not find it in hw_config and there will be two entries with the same ID in fw_config.

@ujfalusi ok that's a blocker for kernel. Can you reply with what this should look like for kernel so @mbukowsk can copy.

No, this is a blocker for this PR.

The firmware places the IPC4_PRIVACY_CAPS_HW_CFG (as is a hardware configuration tuple with ID 11) into the FW_CFG (as is firmware configuration). The ID 11 is IPC4_MAX_ASTATE_COUNT_FW_CFG in firmware config.

These are different configurations, one is queried with SOF_IPC4_FW_PARAM_FW_CONFIG (basefw param 6), the other is SOF_IPC4_FW_PARAM_HW_CONFIG_GET (basefw param 7).

The IPC4_PRIVACY_CAPS_HW_CFG must be placed to the hardware config data in basefw_hw_config() and not in basefw_config() as this PR does.

The corresponding kernel patch is thesofproject/linux@7f00cf9

@abonislawski abonislawski force-pushed the mbukowsk-mic_privacy branch 2 times, most recently from 37f0e45 to 764f2d8 Compare February 18, 2025 08:33
@abonislawski
Copy link
Member

@ujfalusi @lyakh yeap its related. Both DMIC and mic privacy drivers enables the same IRQ so in debug build (linux CI) it can trigger assert for such check but works in normal build (internal CI).
Pushed test commit for west update to verify it.

@ujfalusi
Copy link
Contributor

@abonislawski, we still have the crash on dmic start..

@abonislawski abonislawski force-pushed the mbukowsk-mic_privacy branch 2 times, most recently from 524af57 to abe0df8 Compare February 20, 2025 08:51
@ujfalusi
Copy link
Contributor

SOFCI TEST

@abonislawski
Copy link
Member

abonislawski commented Feb 24, 2025

@lgirdwood lgirdwood added the DNM Do Not Merge tag label Feb 24, 2025
@lgirdwood
Copy link
Member

I've made this DNM until @abonislawski is ready with Zephyr patches merged.

@abonislawski abonislawski force-pushed the mbukowsk-mic_privacy branch 2 times, most recently from 3843767 to 52c9e0d Compare February 25, 2025 07:53
@kv2019i
Copy link
Collaborator

kv2019i commented Mar 10, 2025

@abonislawski Zephyr PRs now merged, do you want to update to this PR?

@abonislawski abonislawski force-pushed the mbukowsk-mic_privacy branch from 52c9e0d to 6a1fefa Compare March 10, 2025 11:49
@lgirdwood lgirdwood removed the DNM Do Not Merge tag label Mar 10, 2025
@ujfalusi ujfalusi self-requested a review March 11, 2025 09:55
Change type of arguments for gain params setting functions.
DAI data struct is replaced by gain_params. Components other
than DAI can also use copier gain feature (eg. microphone privacy)

Signed-off-by: Michal Bukowski <michal.bukowski@intel.com>
Audio privacy feature allows end user to directly
control if user space applications receive actual
data from input devices (microphones). The control
is bypassing application level settings or operating
system controls (like audio endpoint volume).

Signed-off-by: Michal Bukowski <michal.bukowski@intel.com>
Added empty implementation which always returns success

Signed-off-by: Michal Bukowski <michal.bukowski@intel.com>
…ANGE

SW sends this IPC when microphone privacy state is changed for
HW_MANAGED mode and SNDW interface.

Signed-off-by: Michal Bukowski <michal.bukowski@intel.com>
@abonislawski abonislawski force-pushed the mbukowsk-mic_privacy branch from 6a1fefa to d3d665a Compare March 11, 2025 10:05
@lgirdwood lgirdwood merged commit f6b7e77 into thesofproject:main Mar 11, 2025
45 of 49 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.

7 participants