Skip to content

Commit a6d41fb

Browse files
committed
HACK: ptl/sdw: mic privacy force enable + register dump
title says all... Signed-off-by: Peter Ujfalusi <[email protected]>
1 parent bcc42be commit a6d41fb

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

drivers/soundwire/intel.h

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ struct sdw_intel_link_res {
4646
struct sdw_cdns *cdns;
4747
struct list_head list;
4848
struct hdac_bus *hbus;
49+
bool privacy;
4950
};
5051

5152
/**

drivers/soundwire/intel_ace2x_debugfs.c

+5
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ static int intel_reg_show(struct seq_file *s_file, void *data)
7676
ret += intel_sprintf(vs_s, false, buf, ret, SDW_SHIM2_INTEL_VS_IOCTL);
7777
ret += intel_sprintf(vs_s, false, buf, ret, SDW_SHIM2_INTEL_VS_ACTMCTL);
7878

79+
if (sdw->link_res->privacy) {
80+
ret += scnprintf(buf + ret, RD_BUF - ret, "\nVS PVCCS\n");
81+
ret += intel_sprintf(vs_s, false, buf, ret, SDW_SHIM2_INTEL_VS_PVCCS);
82+
}
83+
7984
seq_printf(s_file, "%s", buf);
8085
kfree(buf);
8186

drivers/soundwire/intel_init.c

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ static struct sdw_intel_link_dev *intel_link_dev_register(struct sdw_intel_res *
6464
link = &ldev->link_res;
6565
link->hw_ops = res->hw_ops;
6666
link->mmio_base = res->mmio_base;
67+
link->privacy = res->privacy;
6768
if (!res->ext) {
6869
link->registers = res->mmio_base + SDW_LINK_BASE
6970
+ (SDW_LINK_SIZE * link_id);

include/linux/soundwire/sdw_intel.h

+7
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@
189189
#define SDW_SHIM3_INTEL_VS_ACTMCTL_DOAISE2 BIT(14)
190190
#define SDW_SHIM3_INTEL_VS_ACTMCTL_CLDE BIT(15)
191191

192+
#define SDW_SHIM2_INTEL_VS_PVCCS 0x10
193+
#define SDW_SHIM2_INTEL_VS_PVCCS_MDSTSCHGIE BIT(0)
194+
#define SDW_SHIM2_INTEL_VS_PVCCS_MDSTSCHG BIT(8)
195+
#define SDW_SHIM2_INTEL_VS_PVCCS_MDSTS BIT(9)
196+
#define SDW_SHIM2_INTEL_VS_PVCCS_FMDIS BIT(10)
197+
192198
/**
193199
* struct sdw_intel_stream_params_data: configuration passed during
194200
* the @params_stream callback, e.g. for interaction with DSP
@@ -351,6 +357,7 @@ struct sdw_intel_res {
351357
u32 shim_base;
352358
u32 alh_base;
353359
bool ext;
360+
bool privacy;
354361
struct hdac_bus *hbus;
355362
struct mutex *eml_lock;
356363
};

sound/soc/sof/intel/hda.c

+7
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ static int hda_sdw_probe(struct snd_sof_dev *sdev)
207207
res.ext = true;
208208
res.ops = &sdw_ace2x_callback;
209209

210+
if (chip->hw_ip_version >= SOF_INTEL_ACE_3_0)
211+
res.privacy = true;
212+
210213
}
211214
res.irq = sdev->ipc_irq;
212215
res.handle = hdev->info.handle;
@@ -235,6 +238,10 @@ static int hda_sdw_probe(struct snd_sof_dev *sdev)
235238
/* save context */
236239
hdev->sdw = sdw;
237240

241+
if (chip->hw_ip_version >= SOF_INTEL_ACE_3_0)
242+
hdac_bus_eml_set_mic_privacy_mask(sof_to_bus(sdev), true,
243+
AZX_REG_ML_LEPTR_ID_SDW, 0xe);
244+
238245
return 0;
239246
}
240247

0 commit comments

Comments
 (0)