Skip to content

Commit ac8073f

Browse files
committed
mic_privacy: implement new IPC - SNDW_MIC_PRIVACY_HW_MANAGED_STATE_CHANGE
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>
1 parent 6ae5174 commit ac8073f

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/audio/base_fw.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,20 @@ static int basefw_resource_allocation_request(bool first_block,
274274
}
275275
}
276276

277+
static int basefw_mic_priv_state_changed(bool first_block,
278+
bool last_block,
279+
uint32_t data_offset_or_size,
280+
const char *data)
281+
{
282+
tr_info(&basefw_comp_tr, "basefw_mic_priv_state_changed, status = %d", *data);
283+
284+
uint32_t mic_disable_status = (uint32_t)(*data);
285+
struct mic_privacy_settings settings = fill_mic_priv_settings(mic_disable_status);
286+
propagate_privacy_settings(&settings);
287+
288+
return 0;
289+
}
290+
277291
static int basefw_set_mic_priv_policy(bool first_block,
278292
bool last_block,
279293
uint32_t data_offset_or_size,
@@ -664,6 +678,9 @@ static int basefw_set_large_config(struct comp_dev *dev,
664678
case IPC4_RESOURCE_ALLOCATION_REQUEST:
665679
return basefw_resource_allocation_request(first_block, last_block, data_offset,
666680
data);
681+
case SNDW_MIC_PRIVACY_HW_MANAGED_STATE_CHANGE:
682+
return basefw_mic_priv_state_changed(first_block, last_block, data_offset,
683+
data);
667684
case IPC4_SET_MIC_PRIVACY_FW_MANAGED_POLICY_MASK:
668685
return basefw_set_mic_priv_policy(first_block, last_block, data_offset, data);
669686
default:

src/include/ipc4/base_fw.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ enum ipc4_basefw_params {
289289
/* Use LARGE_CONFIG_SET to change SDW ownership */
290290
IPC4_SDW_OWNERSHIP = 31,
291291

292+
/*!
293+
* This command is used by SW to notify FW for changing state of Mic Privacy
294+
* for SoundWire Gateways
295+
*/
296+
SNDW_MIC_PRIVACY_HW_MANAGED_STATE_CHANGE = 35,
297+
292298
IPC4_SET_MIC_PRIVACY_FW_MANAGED_POLICY_MASK =36,
293299
};
294300

0 commit comments

Comments
 (0)