ASoC: SOF: Intel: Add support for ACE3+ mic privacy
Subsystems (3)
Peter Ujfalusi
maintainercover ASoC: SOF: Intel: Add support for ACE3+ mic privacy
Hi,
ACE3 (Panther Lake) introduced support for microphone privacy feature which can - in hardware - mute incoming audio data based on a state of a physical switch.
The change in the privacy state is delivered through interface IP blocks and can only be handled by the link owner.
In Intel platforms Soundwire is for example host owned, so the interrupt can only be handled by the host.
Since the input stream is going to be muted by hardware, the host needs to send a message to firmware about the change in privacy so it can execute a fade out/in to enhance user experience.
The support for microphone privacy can be queried from the HW_CONFIG data under the INTEL_MIC_PRIVACY_CAP tuple. This is Intel specific data, the core will pass it to platform code if the intel_configure_mic_privacy() callback is provided.
Platform code can call sof_ipc4_mic_privacy_state_change() to send the IPC message to the firmware on state change.
Regards,
Peter
----
Peter Ujfalusi (8):
ASoC: SOF: Intel: mtl: Split up dsp_ops setup code
ASoC: SOF: Intel: lnl/ptl: Only set dsp_ops which differs from MTL
ASoC: SOF: Intel: mtl: Stop exporting dsp_ops callback functions
ASoC: SOF: Intel: Create ptl.c as placeholder for Panther Lake
features
ASoC: SOF: ipc4: Add support for Intel HW managed mic privacy
messaging
ASoC: SOF: Intel: hda-mlink: Add support for mic privacy in VS SHIM
registers
ASoC: SOF: hda/shim: Add callbacks to handle mic privacy change for
sdw
ASoC: SOF: Intel: ptl: Add support for mic privacy
include/sound/hda-mlink.h | 25 +++++++ include/sound/sof/ipc4/header.h | 13 ++++ sound/soc/sof/intel/Makefile | 2 +- sound/soc/sof/intel/hda-mlink.c | 127 ++++++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.c | 34 +++++++++ sound/soc/sof/intel/hda.h | 4 - sound/soc/sof/intel/lnl.c | 117 ++++++----------------------- sound/soc/sof/intel/lnl.h | 6 ++ sound/soc/sof/intel/mtl.c | 74 ++++++++----------- sound/soc/sof/intel/mtl.h | 15 +--- sound/soc/sof/intel/pci-lnl.c | 12 ++- sound/soc/sof/intel/pci-mtl.c | 8 ++ sound/soc/sof/intel/pci-ptl.c | 17 +++-- sound/soc/sof/intel/ptl.c | 106 ++++++++++++++++++++++++++ sound/soc/sof/intel/ptl.h | 19 +++++ sound/soc/sof/intel/shim.h | 2 + sound/soc/sof/ipc4-loader.c | 33 +++++++++ sound/soc/sof/ipc4-priv.h | 5 ++ sound/soc/sof/ipc4.c | 18 +++++ 19 files changed, 470 insertions(+), 167 deletions(-) create mode 100644 sound/soc/sof/intel/ptl.c create mode 100644 sound/soc/sof/intel/ptl.h
Signature · 1 line
2.48.1
Peter Ujfalusi
maintainerPATCH 1/8 ASoC: SOF: Intel: mtl: Split up dsp_ops setup code
Move the sof_mtl_ops and sof_mtl_ops_init() to pci-mtl.c as local static and add a 'generic' sof_mtl_set_ops() function as replacement exported function to fill the dsp_ops structure.
--- sound/soc/sof/intel/hda.h | 2 -- sound/soc/sof/intel/mtl.c | 44 +++++++++++++++++------------------ sound/soc/sof/intel/mtl.h | 2 ++ sound/soc/sof/intel/pci-mtl.c | 8 +++++++ 4 files changed, 31 insertions(+), 25 deletions(-)
sound/soc/sof/intel/hda.h +0 -2
@@ -913,8 +913,6 @@ extern struct snd_sof_dsp_ops sof_tgl_ops;int sof_tgl_ops_init (struct snd_sof_dev *sdev);extern struct snd_sof_dsp_ops sof_icl_ops;int sof_icl_ops_init (struct snd_sof_dev *sdev); -extern struct snd_sof_dsp_ops sof_mtl_ops; -int sof_mtl_ops_init (struct snd_sof_dev *sdev);extern struct snd_sof_dsp_ops sof_lnl_ops;int sof_lnl_ops_init (struct snd_sof_dev *sdev);
sound/soc/sof/intel/mtl.c +21 -23
77 lines not on this page · raw message
sound/soc/sof/intel/mtl.h +2 -0
@@ -145,3 +145,5 @@ void mtl_ipc_dump(struct snd_sof_dev *sdev);int mtl_dsp_core_get (struct snd_sof_dev *sdev,int core);int mtl_dsp_core_put (struct snd_sof_dev *sdev,int core); + +int sof_mtl_set_ops (struct snd_sof_dev *sdev,struct snd_sof_dsp_ops *dsp_ops);
sound/soc/sof/intel/pci-mtl.c +8 -0
@@ -20,6 +20,14 @@#include "hda.h" #include "mtl.h" +/* Meteorlake ops */ +static struct snd_sof_dsp_ops sof_mtl_ops; + +static int sof_mtl_ops_init (struct snd_sof_dev *sdev) +{ +return sof_mtl_set_ops (sdev, &sof_mtl_ops); +} +static const struct sof_dev_desc mtl_desc = { .use_acpi_target_states = true, .machines = snd_soc_acpi_intel_mtl_machines,
Signature · 1 line
2.48.1
Peter Ujfalusi
maintainerPATCH 2/8 ASoC: SOF: Intel: lnl/ptl: Only set dsp_ops which differs from MTL
In reply to Peter UjfalusiLunarLake is a next generation in ACE architecture and most of the dsp_ops are the same as it is in previous generation.
Use the sof_mtl_set_ops() to get the ops used for mtl and update the ones that needs different functions for LNL.
Update pci-ptl at the same time to use the LNL dsp_ops as before.
--- sound/soc/sof/intel/hda.h | 2 - sound/soc/sof/intel/lnl.c | 86 +++++++---------------------------- sound/soc/sof/intel/lnl.h | 2 + sound/soc/sof/intel/pci-lnl.c | 12 +++-- sound/soc/sof/intel/pci-ptl.c | 15 ++++-- 5 files changed, 38 insertions(+), 79 deletions(-)
sound/soc/sof/intel/hda.h +0 -2
@@ -913,8 +913,6 @@ extern struct snd_sof_dsp_ops sof_tgl_ops;int sof_tgl_ops_init (struct snd_sof_dev *sdev);extern struct snd_sof_dsp_ops sof_icl_ops;int sof_icl_ops_init (struct snd_sof_dev *sdev); -extern struct snd_sof_dsp_ops sof_lnl_ops; -int sof_lnl_ops_init (struct snd_sof_dev *sdev);extern const struct sof_intel_dsp_desc skl_chip_info;extern const struct sof_intel_dsp_desc apl_chip_info;
sound/soc/sof/intel/lnl.c +16 -70
114 lines not on this page · raw message
sound/soc/sof/intel/lnl.h +2 -0
@@ -12,4 +12,6 @@#define LNL_DSP_REG_HFDSC 0x160200/* DSP core0 status */ #define LNL_DSP_REG_HFDEC 0x160204/* DSP core0 error */ +int sof_lnl_set_ops (struct snd_sof_dev *sdev,struct snd_sof_dsp_ops *dsp_ops); +#endif /* __SOF_INTEL_LNL_H */
sound/soc/sof/intel/pci-lnl.c +9 -3
@@ -18,7 +18,15 @@/* platform specific devices */ #include "hda.h" -#include "mtl.h" +#include "lnl.h" + +/* LunarLake ops */ +static struct snd_sof_dsp_ops sof_lnl_ops; + +static int sof_lnl_ops_init (struct snd_sof_dev *sdev) +{ +return sof_lnl_set_ops (sdev, &sof_lnl_ops); +}static const struct sof_dev_desc lnl_desc = { .use_acpi_target_states = true,
@@ -73,6 +81,4 @@ MODULE_LICENSE("Dual BSD/GPL");MODULE_DESCRIPTION ("SOF support for LunarLake platforms" );MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_HDA_GENERIC" );MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_HDA_COMMON" ); -MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_MTL" ); -MODULE_IMPORT_NS ("SND_SOC_SOF_HDA_MLINK" );MODULE_IMPORT_NS ("SND_SOC_SOF_PCI_DEV" );
sound/soc/sof/intel/pci-ptl.c +11 -4
@@ -16,7 +16,15 @@/* platform specific devices */ #include "hda.h" -#include "mtl.h" +#include "lnl.h" + +/* PantherLake ops */ +static struct snd_sof_dsp_ops sof_ptl_ops; + +static int sof_ptl_ops_init (struct snd_sof_dev *sdev) +{ +return sof_lnl_set_ops (sdev, &sof_ptl_ops); +}static const struct sof_dev_desc ptl_desc = { .use_acpi_target_states = true,
@@ -43,8 +51,8 @@ static const struct sof_dev_desc ptl_desc = { [SOF_IPC_TYPE_4] = "sof-ptl.ri", }, .nocodec_tplg_filename = "sof-ptl-nocodec.tplg", - .ops = &sof_lnl_ops, - .ops_init = sof_lnl_ops_init, + .ops = &sof_ptl_ops, + .ops_init = sof_ptl_ops_init, };/* PCI IDs */
@@ -73,6 +81,5 @@ MODULE_DESCRIPTION("SOF support for PantherLake platforms");MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_HDA_GENERIC" );MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_HDA_COMMON" );MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_LNL" ); -MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_MTL" );MODULE_IMPORT_NS ("SND_SOC_SOF_HDA_MLINK" );MODULE_IMPORT_NS ("SND_SOC_SOF_PCI_DEV" );
Signature · 1 line
2.48.1
Peter Ujfalusi
maintainerPATCH 3/8 ASoC: SOF: Intel: mtl: Stop exporting dsp_ops callback functions
In reply to Peter UjfalusiThere is no need to export individual dsp_ops functions anymore as the callbacks are filled now by sof_mtl_set_ops()
--- sound/soc/sof/intel/mtl.c | 30 ++++++++++-------------------- sound/soc/sof/intel/mtl.h | 15 --------------- 2 files changed, 10 insertions(+), 35 deletions(-)
sound/soc/sof/intel/mtl.c +10 -20
@@ -96,7 +96,7 @@ static bool mtl_dsp_check_sdw_irq(struct snd_sof_dev *sdev)return false; } -int mtl_ipc_send_msg (struct snd_sof_dev *sdev,struct snd_sof_ipc_msg *msg) +static int mtl_ipc_send_msg (struct snd_sof_dev *sdev,struct snd_sof_ipc_msg *msg) {struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata;struct sof_ipc4_msg *msg_data = msg->msg_data;
@@ -122,7 +122,6 @@ int mtl_ipc_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg)return 0 ; } -EXPORT_SYMBOL_NS (mtl_ipc_send_msg,"SND_SOC_SOF_INTEL_MTL" );void mtl_enable_ipc_interrupts (struct snd_sof_dev *sdev) {
@@ -238,7 +237,7 @@ int mtl_enable_interrupts(struct snd_sof_dev *sdev, bool enable)EXPORT_SYMBOL_NS (mtl_enable_interrupts,"SND_SOC_SOF_INTEL_MTL" );/* pre fw run operations */ -int mtl_dsp_pre_fw_run (struct snd_sof_dev *sdev) +static int mtl_dsp_pre_fw_run (struct snd_sof_dev *sdev) {struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata;u32 dsphfpwrsts;
@@ -298,9 +297,8 @@ int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev)return ret; } -EXPORT_SYMBOL_NS (mtl_dsp_pre_fw_run,"SND_SOC_SOF_INTEL_MTL" ); -int mtl_dsp_post_fw_run (struct snd_sof_dev *sdev) +static int mtl_dsp_post_fw_run (struct snd_sof_dev *sdev) {int ret;
@@ -325,9 +323,8 @@ int mtl_dsp_post_fw_run(struct snd_sof_dev *sdev)hda_sdw_int_enable (sdev, true);return 0 ; } -EXPORT_SYMBOL_NS (mtl_dsp_post_fw_run,"SND_SOC_SOF_INTEL_MTL" ); -void mtl_dsp_dump (struct snd_sof_dev *sdev,u32 flags) +static void mtl_dsp_dump (struct snd_sof_dev *sdev,u32 flags) {char *level = (flags &SOF_DBG_DUMP_OPTIONAL ) ?KERN_DEBUG :KERN_ERR ;u32 fwsts;
@@ -343,7 +340,6 @@ void mtl_dsp_dump(struct snd_sof_dev *sdev, u32 flags)sof_ipc4_intel_dump_telemetry_state (sdev, flags); } -EXPORT_SYMBOL_NS (mtl_dsp_dump,"SND_SOC_SOF_INTEL_MTL" );static bool mtl_dsp_primary_core_is_enabled (struct snd_sof_dev *sdev) {
@@ -559,7 +555,7 @@ int mtl_dsp_cl_init(struct snd_sof_dev *sdev, int stream_tag, bool imr_boot) }EXPORT_SYMBOL_NS (mtl_dsp_cl_init,"SND_SOC_SOF_INTEL_MTL" ); -irqreturn_t mtl_ipc_irq_thread (int irq,void *context) +static irqreturn_t mtl_ipc_irq_thread (int irq,void *context) {struct sof_ipc4_msg notification_data = {{0 }};struct snd_sof_dev *sdev = context;
@@ -641,21 +637,18 @@ irqreturn_t mtl_ipc_irq_thread(int irq, void *context)return IRQ_HANDLED ; } -EXPORT_SYMBOL_NS (mtl_ipc_irq_thread,"SND_SOC_SOF_INTEL_MTL" ); -int mtl_dsp_ipc_get_mailbox_offset (struct snd_sof_dev *sdev) +static int mtl_dsp_ipc_get_mailbox_offset (struct snd_sof_dev *sdev) {return MTL_DSP_MBOX_UPLINK_OFFSET ; } -EXPORT_SYMBOL_NS (mtl_dsp_ipc_get_mailbox_offset,"SND_SOC_SOF_INTEL_MTL" ); -int mtl_dsp_ipc_get_window_offset (struct snd_sof_dev *sdev,u32 id) +static int mtl_dsp_ipc_get_window_offset (struct snd_sof_dev *sdev,u32 id) {return MTL_SRAM_WINDOW_OFFSET (id); } -EXPORT_SYMBOL_NS (mtl_dsp_ipc_get_window_offset,"SND_SOC_SOF_INTEL_MTL" ); -void mtl_ipc_dump (struct snd_sof_dev *sdev) +static void mtl_ipc_dump (struct snd_sof_dev *sdev) {u32 hipcidr, hipcidd, hipcida, hipctdr, hipctdd, hipctda, hipcctl;
@@ -671,7 +664,6 @@ void mtl_ipc_dump(struct snd_sof_dev *sdev)"Host IPC initiator: %#x|%#x|%#x, target: %#x|%#x|%#x, ctl: %#x\n" , hipcidr, hipcidd, hipcida, hipctdr, hipctdd, hipctda, hipcctl); } -EXPORT_SYMBOL_NS (mtl_ipc_dump,"SND_SOC_SOF_INTEL_MTL" );static int mtl_dsp_disable_interrupts (struct snd_sof_dev *sdev) {
@@ -680,7 +672,7 @@ static int mtl_dsp_disable_interrupts(struct snd_sof_dev *sdev)return mtl_enable_interrupts (sdev, false); } -int mtl_dsp_core_get (struct snd_sof_dev *sdev,int core) +static int mtl_dsp_core_get (struct snd_sof_dev *sdev,int core) {const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm;
@@ -692,9 +684,8 @@ int mtl_dsp_core_get(struct snd_sof_dev *sdev, int core)return 0 ; } -EXPORT_SYMBOL_NS (mtl_dsp_core_get,"SND_SOC_SOF_INTEL_MTL" ); -int mtl_dsp_core_put (struct snd_sof_dev *sdev,int core) +static int mtl_dsp_core_put (struct snd_sof_dev *sdev,int core) {const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm;int ret;
@@ -710,7 +701,6 @@ int mtl_dsp_core_put(struct snd_sof_dev *sdev, int core)return 0 ; } -EXPORT_SYMBOL_NS (mtl_dsp_core_put,"SND_SOC_SOF_INTEL_MTL" );int sof_mtl_set_ops (struct snd_sof_dev *sdev,struct snd_sof_dsp_ops *dsp_ops) {
sound/soc/sof/intel/mtl.h +0 -15
@@ -122,28 +122,13 @@#define MTL_DSP_REG_HfIMRIS1_IU_MASK BIT(0)bool mtl_dsp_check_ipc_irq (struct snd_sof_dev *sdev); -int mtl_ipc_send_msg (struct snd_sof_dev *sdev,struct snd_sof_ipc_msg *msg);void mtl_enable_ipc_interrupts (struct snd_sof_dev *sdev);void mtl_disable_ipc_interrupts (struct snd_sof_dev *sdev);int mtl_enable_interrupts (struct snd_sof_dev *sdev,bool enable); -int mtl_dsp_pre_fw_run (struct snd_sof_dev *sdev); -int mtl_dsp_post_fw_run (struct snd_sof_dev *sdev); -void mtl_dsp_dump (struct snd_sof_dev *sdev,u32 flags); -int mtl_power_down_dsp (struct snd_sof_dev *sdev);int mtl_dsp_cl_init (struct snd_sof_dev *sdev,int stream_tag,bool imr_boot); -irqreturn_t mtl_ipc_irq_thread (int irq,void *context); - -int mtl_dsp_ipc_get_mailbox_offset (struct snd_sof_dev *sdev); -int mtl_dsp_ipc_get_window_offset (struct snd_sof_dev *sdev,u32 id); - -void mtl_ipc_dump (struct snd_sof_dev *sdev); - -int mtl_dsp_core_get (struct snd_sof_dev *sdev,int core); -int mtl_dsp_core_put (struct snd_sof_dev *sdev,int core); -int sof_mtl_set_ops (struct snd_sof_dev *sdev,struct snd_sof_dsp_ops *dsp_ops);
Signature · 1 line
2.48.1
Peter Ujfalusi
maintainerPATCH 4/8 ASoC: SOF: Intel: Create ptl.c as placeholder for Panther Lake features
In reply to Peter UjfalusiCreate a minimal placeholder to make it possible to add code to handle the new features of Panther Lake compared to MTL/LNL.
--- sound/soc/sof/intel/Makefile | 2 +- sound/soc/sof/intel/lnl.c | 33 ++++------------------ sound/soc/sof/intel/lnl.h | 4 +++ sound/soc/sof/intel/pci-ptl.c | 6 ++-- sound/soc/sof/intel/ptl.c | 52 +++++++++++++++++++++++++++++++++++ sound/soc/sof/intel/ptl.h | 14 ++++++++++ 6 files changed, 79 insertions(+), 32 deletions(-) create mode 100644 sound/soc/sof/intel/ptl.c create mode 100644 sound/soc/sof/intel/ptl.h
sound/soc/sof/intel/Makefile +1 -1
@@ -34,7 +34,7 @@ snd-sof-pci-intel-icl-y := pci-icl.o icl.o snd-sof-pci-intel-tgl-y := pci-tgl.o tgl.o snd-sof-pci-intel-mtl-y := pci-mtl.o mtl.o snd-sof-pci-intel-lnl-y := pci-lnl.o lnl.o -snd-sof-pci-intel-ptl-y := pci-ptl.o +snd-sof-pci-intel-ptl-y := pci-ptl.o ptl.o obj-$(CONFIG_SND_SOC_SOF_MERRIFIELD) += snd-sof-pci-intel-tng.o obj-$(CONFIG_SND_SOC_SOF_INTEL_SKL) += snd-sof-pci-intel-skl.o
sound/soc/sof/intel/lnl.c +6 -27
@@ -128,20 +128,22 @@ int sof_lnl_set_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *dsp_ops)EXPORT_SYMBOL_NS (sof_lnl_set_ops,"SND_SOC_SOF_INTEL_LNL" );/* Check if an SDW IRQ occurred */ -static bool lnl_dsp_check_sdw_irq (struct snd_sof_dev *sdev) +bool lnl_dsp_check_sdw_irq (struct snd_sof_dev *sdev) {struct hdac_bus *bus =sof_to_bus (sdev);return hdac_bus_eml_check_interrupt (bus, true,AZX_REG_ML_LEPTR_ID_SDW ); } +EXPORT_SYMBOL_NS (lnl_dsp_check_sdw_irq,"SND_SOC_SOF_INTEL_LNL" ); -static int lnl_dsp_disable_interrupts (struct snd_sof_dev *sdev) +int lnl_dsp_disable_interrupts (struct snd_sof_dev *sdev) {mtl_disable_ipc_interrupts (sdev);return mtl_enable_interrupts (sdev, false); } +EXPORT_SYMBOL_NS (lnl_dsp_disable_interrupts,"SND_SOC_SOF_INTEL_LNL" ); -static bool lnl_sdw_check_wakeen_irq (struct snd_sof_dev *sdev) +bool lnl_sdw_check_wakeen_irq (struct snd_sof_dev *sdev) {struct hdac_bus *bus =sof_to_bus (sdev);u16 wake_sts;
@@ -157,6 +159,7 @@ static bool lnl_sdw_check_wakeen_irq(struct snd_sof_dev *sdev)/* filter out the range of SDIs that can be set for SoundWire */ return wake_sts &GENMASK (SDW_MAX_DEVICES ,SDW_INTEL_DEV_NUM_IDA_MIN ); } +EXPORT_SYMBOL_NS (lnl_sdw_check_wakeen_irq,"SND_SOC_SOF_INTEL_LNL" );const struct sof_intel_dsp_desc lnl_chip_info = { .cores_num =5 ,
@@ -182,29 +185,5 @@ const struct sof_intel_dsp_desc lnl_chip_info = { .hw_ip_version = SOF_INTEL_ACE_2_0, }; -const struct sof_intel_dsp_desc ptl_chip_info = { - .cores_num =5 , - .init_core_mask =BIT (0 ), - .host_managed_cores_mask =BIT (0 ), - .ipc_req =MTL_DSP_REG_HFIPCXIDR , - .ipc_req_mask =MTL_DSP_REG_HFIPCXIDR_BUSY , - .ipc_ack =MTL_DSP_REG_HFIPCXIDA , - .ipc_ack_mask =MTL_DSP_REG_HFIPCXIDA_DONE , - .ipc_ctl =MTL_DSP_REG_HFIPCXCTL , - .rom_status_reg =LNL_DSP_REG_HFDSC , - .rom_init_timeout =300 , - .ssp_count =MTL_SSP_COUNT , - .d0i3_offset =MTL_HDA_VS_D0I3C , - .read_sdw_lcount = hda_sdw_check_lcount_ext, - .check_sdw_irq = lnl_dsp_check_sdw_irq, - .check_sdw_wakeen_irq = lnl_sdw_check_wakeen_irq, - .check_ipc_irq = mtl_dsp_check_ipc_irq, - .cl_init = mtl_dsp_cl_init, - .power_down_dsp = mtl_power_down_dsp, - .disable_interrupts = lnl_dsp_disable_interrupts, - .hw_ip_version =SOF_INTEL_ACE_3_0 , -}; -EXPORT_SYMBOL_NS (ptl_chip_info,"SND_SOC_SOF_INTEL_LNL" ); -MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_MTL" );MODULE_IMPORT_NS ("SND_SOC_SOF_HDA_MLINK" );
sound/soc/sof/intel/lnl.h +4 -0
@@ -14,4 +14,8 @@int sof_lnl_set_ops (struct snd_sof_dev *sdev,struct snd_sof_dsp_ops *dsp_ops); +bool lnl_dsp_check_sdw_irq (struct snd_sof_dev *sdev); +int lnl_dsp_disable_interrupts (struct snd_sof_dev *sdev); +bool lnl_sdw_check_wakeen_irq (struct snd_sof_dev *sdev); +#endif /* __SOF_INTEL_LNL_H */
sound/soc/sof/intel/pci-ptl.c +2 -4
@@ -16,14 +16,14 @@/* platform specific devices */ #include "hda.h" -#include "lnl.h" +#include "ptl.h" /* PantherLake ops */ static struct snd_sof_dsp_ops sof_ptl_ops;static int sof_ptl_ops_init (struct snd_sof_dev *sdev) { -return sof_lnl_set_ops (sdev, &sof_ptl_ops); +return sof_ptl_set_ops (sdev, &sof_ptl_ops); }static const struct sof_dev_desc ptl_desc = {
@@ -80,6 +80,4 @@ MODULE_LICENSE("Dual BSD/GPL");MODULE_DESCRIPTION ("SOF support for PantherLake platforms" );MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_HDA_GENERIC" );MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_HDA_COMMON" ); -MODULE_IMPORT_NS ("SND_SOC_SOF_INTEL_LNL" ); -MODULE_IMPORT_NS ("SND_SOC_SOF_HDA_MLINK" );MODULE_IMPORT_NS ("SND_SOC_SOF_PCI_DEV" );
sound/soc/sof/intel/ptl.c new file +52 -0
52 lines not on this page · raw message
sound/soc/sof/intel/ptl.h new file +14 -0
@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ +/* +* This file is provided under a dual BSD/GPLv2 license. When using or +* redistributing this file, you may do so under either license. +* +* Copyright(c) 2025 Intel Corporation +*/ + +#ifndef __SOF_INTEL_PTL_H +#define __SOF_INTEL_PTL_H + +int sof_ptl_set_ops (struct snd_sof_dev *sdev,struct snd_sof_dsp_ops *dsp_ops); + +#endif /* __SOF_INTEL_PTL_H */
Signature · 1 line
2.48.1
Peter Ujfalusi
maintainerPATCH 5/8 ASoC: SOF: ipc4: Add support for Intel HW managed mic privacy messaging
In reply to Peter UjfalusiACE3 (Panther Lake) introduced support for microphone privacy feature which can - in hardware - mute incoming audio data based on a state of a physical switch.
The change in the privacy state is delivered through interface IP blocks and can only be handled by the link owner.
In Intel platforms Soundwire is for example host owned, so the interrupt can only be handled by the host.
Since the input stream is going to be muted by hardware, the host needs to send a message to firmware about the change in privacy so it can execute a fade out/in to enhance user experience.
The support for microphone privacy can be queried from the HW_CONFIG data under the INTEL_MIC_PRIVACY_CAP tuple. This is Intel specific data, the core will pass it to platform code if the intel_configure_mic_privacy() callback is provided.
Platform code can call sof_ipc4_mic_privacy_state_change() to send the IPC message to the firmware on state change.
--- include/sound/sof/ipc4/header.h | 13 +++++++++++++ sound/soc/sof/ipc4-loader.c | 33 +++++++++++++++++++++++++++++++++ sound/soc/sof/ipc4-priv.h | 5 +++++ sound/soc/sof/ipc4.c | 18 ++++++++++++++++++ 4 files changed, 69 insertions(+)
include/sound/sof/ipc4/header.h +13 -0
@@ -396,6 +396,7 @@ enum sof_ipc4_base_fw_params {SOF_IPC4_FW_PARAM_MODULES_INFO_GET ,SOF_IPC4_FW_PARAM_LIBRARIES_INFO_GET =16 ,SOF_IPC4_FW_PARAM_SYSTEM_TIME =20 , + SOF_IPC4_FW_PARAM_MIC_PRIVACY_STATE_CHANGE = 35, }; enum sof_ipc4_fw_config_params {
@@ -446,6 +447,18 @@ struct sof_ipc4_dx_state_info {uint32_t dx_mask; } __packed__aligned(4) ; +enum sof_ipc4_hw_config_params { +SOF_IPC4_HW_CFG_INTEL_MIC_PRIVACY_CAPS =11 , +}; + +#define SOF_IPC_INTEL_MIC_PRIVACY_VERSION_PTL 1 + +struct sof_ipc4_intel_mic_privacy_cap { +uint32_t version; +uint32_t capabilities_length; +uint32_t capabilities[]; +} __packed; +/* Reply messages */ /*
sound/soc/sof/ipc4-loader.c +33 -0
@@ -502,6 +502,39 @@ int sof_ipc4_query_fw_configuration(struct snd_sof_dev *sdev) offset +=sizeof (*tuple) + tuple->size; } +/* Get the hardware configuration */ + msg.primary =SOF_IPC4_MSG_TARGET (SOF_IPC4_MODULE_MSG ); + msg.primary |=SOF_IPC4_MSG_DIR (SOF_IPC4_MSG_REQUEST ); + msg.primary |=SOF_IPC4_MOD_ID (SOF_IPC4_MOD_INIT_BASEFW_MOD_ID ); + msg.primary |=SOF_IPC4_MOD_INSTANCE (SOF_IPC4_MOD_INIT_BASEFW_INSTANCE_ID ); + msg.extension =SOF_IPC4_MOD_EXT_MSG_PARAM_ID (SOF_IPC4_FW_PARAM_HW_CONFIG_GET ); + + msg.data_size = sdev->ipc->max_payload_size; + + ret = iops->set_get_data (sdev, &msg, msg.data_size, false); +if (ret) + goto out; + + offset =0 ; +while (offset < msg.data_size) { + tuple = (struct sof_ipc4_tuple *)((u8 *)msg.data_ptr + offset); + +switch (tuple->type) { +case SOF_IPC4_HW_CFG_INTEL_MIC_PRIVACY_CAPS : +if (ipc4_data->intel_configure_mic_privacy) { +struct sof_ipc4_intel_mic_privacy_cap *caps; + + caps = (struct sof_ipc4_intel_mic_privacy_cap *)tuple->value; + ipc4_data->intel_configure_mic_privacy (sdev, caps); + } +break ; +default : +break ; + } + + offset +=sizeof (*tuple) + tuple->size; + } + out:kfree (msg.data_ptr);
sound/soc/sof/ipc4-priv.h +5 -0
@@ -11,6 +11,7 @@#include <linux/idr.h> #include <sound/sof/ext_manifest4.h> +#include <sound/sof/ipc4/header.h> #include "sof-priv.h" /* The DSP window indices are fixed */
@@ -89,6 +90,8 @@ struct sof_ipc4_fw_data {int (*load_library)(struct snd_sof_dev *sdev,struct sof_ipc4_fw_library *fw_lib,bool reload); +void (*intel_configure_mic_privacy)(struct snd_sof_dev *sdev, +struct sof_ipc4_intel_mic_privacy_cap *caps);struct mutex pipeline_state_mutex;/* protect pipeline triggers, ref counts and states */ };
@@ -118,4 +121,6 @@ void sof_ipc4_update_cpc_from_manifest(struct snd_sof_dev *sdev,size_t sof_ipc4_find_debug_slot_offset_by_type (struct snd_sof_dev *sdev,u32 slot_type); +void sof_ipc4_mic_privacy_state_change (struct snd_sof_dev *sdev,bool state); +#endif
sound/soc/sof/ipc4.c +18 -0
@@ -851,3 +851,21 @@ const struct sof_ipc_ops ipc4_ops = { .pcm = &ipc4_pcm_ops, .fw_tracing = &ipc4_mtrace_ops, }; + +void sof_ipc4_mic_privacy_state_change (struct snd_sof_dev *sdev,bool state) +{ +struct sof_ipc4_msg msg; +u32 data = state; + + msg.primary =SOF_IPC4_MSG_TARGET (SOF_IPC4_MODULE_MSG ); + msg.primary |=SOF_IPC4_MSG_DIR (SOF_IPC4_MSG_REQUEST ); + msg.primary |=SOF_IPC4_MOD_ID (SOF_IPC4_MOD_INIT_BASEFW_MOD_ID ); + msg.primary |=SOF_IPC4_MOD_INSTANCE (SOF_IPC4_MOD_INIT_BASEFW_INSTANCE_ID ); + msg.extension =SOF_IPC4_MOD_EXT_MSG_PARAM_ID (SOF_IPC4_FW_PARAM_MIC_PRIVACY_STATE_CHANGE ); + + msg.data_size =sizeof (data); + msg.data_ptr = &data; + +sof_ipc4_set_get_data (sdev, &msg, msg.data_size, true); +} +EXPORT_SYMBOL (sof_ipc4_mic_privacy_state_change);
Signature · 1 line
2.48.1
Mark Brown
maintainerRe: [PATCH 5/8] ASoC: SOF: ipc4: Add support for Intel HW managed mic privacy messaging
Quoted 2 lines · Peter Ujfalusi
Platform code can call
sof_ipc4_mic_privacy_state_change()to send the IPC message to the firmware on state change.
What's the plan for that plaform code - is it expected to be the machine driver, or something else?
Péter Ujfalusi
maintainerRe: [PATCH 5/8] ASoC: SOF: ipc4: Add support for Intel HW managed mic privacy messaging
Quoted 7 lines · Mark Brown
Quoted 2 lines · Peter Ujfalusi
Platform code can call
sof_ipc4_mic_privacy_state_change()to send the IPC message to the firmware on state change.What's the plan for that plaform code - is it expected to be the machine driver, or something else?
By platform code I mean here sound/soc/sof/intel.
This feature is only available for Intel hardware, but I wanted to keep the APIs as open as possible for other vendors.
The reason for the implementation is that the interrupt about the change in mic privacy is delivered via IP interrupt (piggy-backing on them). The interrupt is delivered to the owner of the IP:
DMIC is owned by DSP, so firmware can handle it
SNDW is owned by host, so Linux is handling it.
The firmware needs to be notified of a change to do a nice fade out/in, the software cannot block or do anything else, the incoming stream mute is done by the hardware.
No plan to integrate it to machine drivers, this is outside of the scope of SW. The feedback is also handled by hardware internally.
Signature · 1 line
Péter
Peter Ujfalusi
maintainerPATCH 6/8 ASoC: SOF: Intel: hda-mlink: Add support for mic privacy in VS SHIM registers
In reply to Peter UjfalusiNew register has been introduced with PTL in the vendor specific SHIM registers, outside of the IPs itself for microphone privacy status handling.
Via the PVCCS register the current microphone privacy status can be checked and the interrupt generation on status change can be enabled/disabled. The status change interrupt is routed to the owner of the interface (DSP/host).
The PVCCS is provided for each sublink under the IP to make it possible to control the interrupt generation per sublink.
On status change the MDSTSCHG bit needs to be cleared for all sublink of the interface to be able to detect future changes in privacy.
The status bit (MDSTS) is volatile in all PVCCS register, it reflects the current state of the GPIO signal.
Microphone privacy is a hardware feature (if enabled and configured that way), the host has only passive, monitoring role.
The added functions are generic to be future proof if the mic privacy support is extended beyond Soundwire and DMIC links.
--- include/sound/hda-mlink.h | 25 +++++++ sound/soc/sof/intel/hda-mlink.c | 127 ++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+)
include/sound/hda-mlink.h +25 -0
@@ -62,6 +62,12 @@ struct mutex *hdac_bus_eml_get_mutex(struct hdac_bus *bus, bool alt, int elid);int hdac_bus_eml_enable_offload (struct hdac_bus *bus,bool alt,int elid,bool enable); +/* microphone privacy specific function supported by ACE3+ architecture */ +void hdac_bus_eml_set_mic_privacy_mask (struct hdac_bus *bus,bool alt,int elid, +unsigned long mask); +bool hdac_bus_eml_is_mic_privacy_changed (struct hdac_bus *bus,bool alt,int elid); +bool hdac_bus_eml_get_mic_privacy_state (struct hdac_bus *bus,bool alt,int elid); +#else static inline int
@@ -185,4 +191,23 @@ hdac_bus_eml_enable_offload(struct hdac_bus *bus, bool alt, int elid, bool enabl {return 0 ; } + +static inline void +hdac_bus_eml_set_mic_privacy_mask (struct hdac_bus *bus,bool alt,int elid, +unsigned long mask) +{ +} + +static inline bool +hdac_bus_eml_is_mic_privacy_changed (struct hdac_bus *bus,bool alt,int elid) +{ +return false; +} + +static inline bool +hdac_bus_eml_get_mic_privacy_state (struct hdac_bus *bus,bool alt,int elid) +{ +return false; +} +#endif /* CONFIG_SND_SOC_SOF_HDA_MLINK */
sound/soc/sof/intel/hda-mlink.c +127 -0
169 lines not on this page · raw message
Signature · 1 line
2.48.1
Peter Ujfalusi
maintainerPATCH 7/8 ASoC: SOF: hda/shim: Add callbacks to handle mic privacy change for sdw
In reply to Peter UjfalusiAdd generic callback definitions for checking the mic privacy interrupt and status.
Implement wrappers for mic privacy reported via the Soundwire interrupt and its vendor specific SHIM registers.
--- sound/soc/sof/intel/hda.c | 34 ++++++++++++++++++++++++++++++++++ sound/soc/sof/intel/shim.h | 2 ++ 2 files changed, 36 insertions(+)
sound/soc/sof/intel/hda.c +34 -0
@@ -352,6 +352,27 @@ void hda_sdw_process_wakeen_common(struct snd_sof_dev *sdev) }EXPORT_SYMBOL_NS (hda_sdw_process_wakeen_common,"SND_SOC_SOF_INTEL_HDA_GENERIC" ); +static bool hda_dsp_sdw_check_mic_privacy_irq (struct snd_sof_dev *sdev) +{ +const struct sof_intel_dsp_desc *chip; + + chip =get_chip_info (sdev->pdata); +if (chip && chip->check_mic_privacy_irq) +return chip->check_mic_privacy_irq (sdev, true, +AZX_REG_ML_LEPTR_ID_SDW ); + +return false; +} + +static void hda_dsp_sdw_process_mic_privacy (struct snd_sof_dev *sdev) +{ +const struct sof_intel_dsp_desc *chip; + + chip =get_chip_info (sdev->pdata); +if (chip && chip->process_mic_privacy) + chip->process_mic_privacy (sdev, true,AZX_REG_ML_LEPTR_ID_SDW ); +} +#else /* IS_ENABLED(CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE) */ static inline int hda_sdw_acpi_scan (struct snd_sof_dev *sdev) {
@@ -383,6 +404,13 @@ static inline bool hda_sdw_check_wakeen_irq(struct snd_sof_dev *sdev) return false; } +static inline bool hda_dsp_sdw_check_mic_privacy_irq (struct snd_sof_dev *sdev) +{ +return false; +} + +static inline void hda_dsp_sdw_process_mic_privacy (struct snd_sof_dev *sdev) { } +#endif /* IS_ENABLED(CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE) */ /* pre fw run operations */
@@ -678,7 +706,13 @@ static irqreturn_t hda_dsp_interrupt_thread(int irq, void *context)if (hda_dsp_check_sdw_irq (sdev)) {trace_sof_intel_hda_irq (sdev,"sdw" ); +hda_dsp_sdw_thread (irq, hdev->sdw); + +if (hda_dsp_sdw_check_mic_privacy_irq (sdev)) { +trace_sof_intel_hda_irq (sdev,"mic privacy" ); +hda_dsp_sdw_process_mic_privacy (sdev); + } }if (hda_sdw_check_wakeen_irq (sdev)) {
sound/soc/sof/intel/shim.h +2 -0
@@ -193,6 +193,8 @@ struct sof_intel_dsp_desc {bool (*check_sdw_wakeen_irq)(struct snd_sof_dev *sdev);void (*sdw_process_wakeen)(struct snd_sof_dev *sdev);bool (*check_ipc_irq)(struct snd_sof_dev *sdev); +bool (*check_mic_privacy_irq)(struct snd_sof_dev *sdev,bool alt,int elid); +void (*process_mic_privacy)(struct snd_sof_dev *sdev,bool alt,int elid);int (*power_down_dsp)(struct snd_sof_dev *sdev);int (*disable_interrupts)(struct snd_sof_dev *sdev);int (*cl_init)(struct snd_sof_dev *sdev,int stream_tag,bool imr_boot);
Signature · 1 line
2.48.1
Peter Ujfalusi
maintainerPATCH 8/8 ASoC: SOF: Intel: ptl: Add support for mic privacy
In reply to Peter UjfalusiImplement the three callbacks that is needed to enable support for reporting the mic privacy change via soundwire.
In PTL the mic privacy reporting is supported via soundwire and DMIC and the soundwire is owned by the host, it's interrupt is routed there.
To enable the interrupt, the sublink mask needs to be passed to the multilink layer, the check_mic_privacy_irq/process_mic_privacy callbacks needs to be implemented to check and report the mic privacy change.
--- sound/soc/sof/intel/ptl.c | 58 +++++++++++++++++++++++++++++++++++++-- sound/soc/sof/intel/ptl.h | 5 ++++ 2 files changed, 61 insertions(+), 2 deletions(-)
sound/soc/sof/intel/ptl.c +56 -2
@@ -18,10 +18,62 @@#include "lnl.h" #include "ptl.h" -int sof_ptl_set_ops (struct snd_sof_dev *sdev,struct snd_sof_dsp_ops *dsp_ops) +static bool sof_ptl_check_mic_privacy_irq (struct snd_sof_dev *sdev,bool alt, +int elid) +{ +if (alt !=1 || elid !=AZX_REG_ML_LEPTR_ID_SDW ) +return false; + +return hdac_bus_eml_is_mic_privacy_changed (sof_to_bus (sdev), alt, elid); +} + +static void sof_ptl_process_mic_privacy (struct snd_sof_dev *sdev,bool alt, +int elid) +{ +bool state; + +if (alt !=1 || elid !=AZX_REG_ML_LEPTR_ID_SDW ) +return ; + + state =hdac_bus_eml_get_mic_privacy_state (sof_to_bus (sdev), alt, elid); + +sof_ipc4_mic_privacy_state_change (sdev, state); +} + +static void sof_ptl_set_mic_privacy (struct snd_sof_dev *sdev, +struct sof_ipc4_intel_mic_privacy_cap *caps) { -return sof_lnl_set_ops (sdev, dsp_ops); +u32 micpvcp; + +if (!caps || !caps->capabilities_length) +return ; + + micpvcp = caps->capabilities[0 ]; + +/* No need to set the mic privacy if it is not enabled or forced */ +if (!(micpvcp &PTL_MICPVCP_DDZE_ENABLED ) || + micpvcp &PTL_MICPVCP_DDZE_FORCED ) +return ; + +hdac_bus_eml_set_mic_privacy_mask (sof_to_bus (sdev), true, +AZX_REG_ML_LEPTR_ID_SDW , +PTL_MICPVCP_GET_SDW_MASK (micpvcp)); } + +int sof_ptl_set_ops (struct snd_sof_dev *sdev,struct snd_sof_dsp_ops *dsp_ops) +{ +struct sof_ipc4_fw_data *ipc4_data; +int ret; + + ret =sof_lnl_set_ops (sdev, dsp_ops); +if (ret) +return ret; + + ipc4_data = sdev->private; + ipc4_data->intel_configure_mic_privacy = sof_ptl_set_mic_privacy; + +return 0 ; +};EXPORT_SYMBOL_NS (sof_ptl_set_ops,"SND_SOC_SOF_INTEL_PTL" );const struct sof_intel_dsp_desc ptl_chip_info = {
@@ -41,6 +93,8 @@ const struct sof_intel_dsp_desc ptl_chip_info = { .check_sdw_irq = lnl_dsp_check_sdw_irq, .check_sdw_wakeen_irq = lnl_sdw_check_wakeen_irq, .check_ipc_irq = mtl_dsp_check_ipc_irq, + .check_mic_privacy_irq = sof_ptl_check_mic_privacy_irq, + .process_mic_privacy = sof_ptl_process_mic_privacy, .cl_init = mtl_dsp_cl_init, .power_down_dsp = mtl_power_down_dsp, .disable_interrupts = lnl_dsp_disable_interrupts,
sound/soc/sof/intel/ptl.h +5 -0
@@ -9,6 +9,11 @@#ifndef __SOF_INTEL_PTL_H#define __SOF_INTEL_PTL_H +#define PTL_MICPVCP_DDZE_FORCED BIT(16) +#define PTL_MICPVCP_DDZE_ENABLED BIT(17) +#define PTL_MICPVCP_DDZLS_SDW GENMASK(26, 20) +#define PTL_MICPVCP_GET_SDW_MASK (x) (((x) & PTL_MICPVCP_DDZLS_SDW) >> 20) +int sof_ptl_set_ops (struct snd_sof_dev *sdev,struct snd_sof_dsp_ops *dsp_ops);#endif /* __SOF_INTEL_PTL_H */
Signature · 1 line
2.48.1
Re: [PATCH 8/8] ASoC: SOF: Intel: ptl: Add support for mic privacy
Quoted 24 lines · Peter Ujfalusi
Implement the three callbacks that is needed to enable support for reporting the mic privacy change via soundwire.
In PTL the mic privacy reporting is supported via soundwire and DMIC and the soundwire is owned by the host, it's interrupt is routed there.
To enable the interrupt, the sublink mask needs to be passed to the multilink layer, the check_mic_privacy_irq/process_mic_privacy callbacks needs to be implemented to check and report the mic privacy change.
Signed-off-by Peter Ujfalusi <[email protected]>Reviewed-by Ranjani Sridharan <[email protected]>Reviewed-by Liam Girdwood <[email protected]>Reviewed-by Kai Vehmanen <[email protected]>--- sound/soc/sof/intel/ptl.c | 58 +++++++++++++++++++++++++++++++++++++-- sound/soc/sof/intel/ptl.h | 5 ++++ 2 files changed, 61 insertions(+), 2 deletions(-)sound/soc/sof/intel/ptl.c +0
-0
sound/soc/sof/intel/ptl.c line 24
Quoted 8 lines
sound/soc/sof/intel/ptl.c +4
-1@@ -18,10 +18,62 @@#include "lnl.h" #include "ptl.h" -int sof_ptl_set_ops (struct snd_sof_dev *sdev,struct snd_sof_dsp_ops *dsp_ops) +static bool sof_ptl_check_mic_privacy_irq (struct snd_sof_dev *sdev,bool alt, +int elid) +{ +if (alt !=1 || elid !=AZX_REG_ML_LEPTR_ID_SDW )
alt is bool, so let's be type aware and either "alt != true" or just "!alt"?
sound/soc/sof/intel/ptl.c line 35
Quoted 11 lines
sound/soc/sof/intel/ptl.c +11
-0+return false; + +return hdac_bus_eml_is_mic_privacy_changed (sof_to_bus (sdev), alt, elid); +} + +static void sof_ptl_process_mic_privacy (struct snd_sof_dev *sdev,bool alt, +int elid) +{ +bool state; + +if (alt !=1 || elid !=AZX_REG_ML_LEPTR_ID_SDW )
same here
Péter Ujfalusi
maintainerRe: [PATCH 8/8] ASoC: SOF: Intel: ptl: Add support for mic privacy
Quoted 29 lines · Amadeusz Sławiński
Quoted 28 lines · Peter Ujfalusi
Implement the three callbacks that is needed to enable support for reporting the mic privacy change via soundwire.
In PTL the mic privacy reporting is supported via soundwire and DMIC and the soundwire is owned by the host, it's interrupt is routed there.
To enable the interrupt, the sublink mask needs to be passed to the multilink layer, the check_mic_privacy_irq/process_mic_privacy callbacks needs to be implemented to check and report the mic privacy change.
Signed-off-by Peter Ujfalusi <[email protected]>Reviewed-by Ranjani Sridharan <[email protected]>Reviewed-by Liam Girdwood <[email protected]>Reviewed-by Kai Vehmanen <[email protected]>---
sound/soc/sof/intel/ptl.c| 58 +++++++++++++++++++++++++++++++++++++--sound/soc/sof/intel/ptl.h| 5 ++++2 files changed, 61 insertions(+), 2 deletions(-)sound/soc/sof/intel/ptl.c +0
-0@@ -18,10 +18,62 @@ #include "lnl.h" #include "ptl.h"-int
sof_ptl_set_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *dsp_ops)
Quoted 8 lines
Quoted 5 lines
+static bool sof_ptl_check_mic_privacy_irq(struct
snd_sof_dev*sdev, bool alt,
+ int elid)
+{
+ if (alt != 1 || elid !=AZX_REG_ML_LEPTR_ID_SDW)alt is bool, so let's be type aware and either "alt != true" or just "! alt"?
Sure, I can't explain why it ended up like this.
Quoted 17 lines
Quoted 10 lines
+ return false;
+
+ returnhdac_bus_eml_is_mic_privacy_changed(sof_to_bus(sdev), alt, elid);sound/soc/sof/intel/ptl.c +3
-0+} + +static void sof_ptl_process_mic_privacy(struct snd_sof_dev *sdev,bool alt,
+ int elid)sound/soc/sof/intel/ptl.c line 35
Quoted 4 lines
sound/soc/sof/intel/ptl.c +4
-0+{ + bool state; + + if (alt != 1 || elid != AZX_REG_ML_LEPTR_ID_SDW)same here
Signature · 1 line
Péter