summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire/intel_ace2x.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2024-04-29 02:43:19 +0200
committerVinod Koul <vkoul@kernel.org>2024-05-04 14:56:50 +0200
commit3b0b441a297e7fe11baab51439a81cd6a336ed64 (patch)
treec7349f4f16febe303782e9460dc0c7e75876d7fc /drivers/soundwire/intel_ace2x.c
parentsoundwire: intel_ace2x: cleanup DOAIS/DODS settings (diff)
downloadlinux-3b0b441a297e7fe11baab51439a81cd6a336ed64.tar.xz
linux-3b0b441a297e7fe11baab51439a81cd6a336ed64.zip
soundwire: intel_ace2x: use DOAIS and DODS settings from firmware
Starting with LNL, the recommendation is to use settings read from DSD properties instead of hard-coding the values. The DOAIS and DODS values are completely-specific to Intel and are stored in a vendor-specific property structure. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20240429004321.2399754-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/intel_ace2x.c')
-rw-r--r--drivers/soundwire/intel_ace2x.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/soundwire/intel_ace2x.c b/drivers/soundwire/intel_ace2x.c
index 32b538cd6d66..917cc79d4d85 100644
--- a/drivers/soundwire/intel_ace2x.c
+++ b/drivers/soundwire/intel_ace2x.c
@@ -25,12 +25,15 @@
static void intel_shim_vs_init(struct sdw_intel *sdw)
{
void __iomem *shim_vs = sdw->link_res->shim_vs;
+ struct sdw_bus *bus = &sdw->cdns.bus;
+ struct sdw_intel_prop *intel_prop;
u16 doais;
u16 dods;
u16 act;
- doais = 0x3;
- dods = 0x1;
+ intel_prop = bus->vendor_specific_prop;
+ doais = intel_prop->doais;
+ dods = intel_prop->dods;
act = intel_readw(shim_vs, SDW_SHIM2_INTEL_VS_ACTMCTL);
u16p_replace_bits(&act, doais, SDW_SHIM2_INTEL_VS_ACTMCTL_DOAIS);