Skip to content

Commit 8096248

Browse files
plbossartvinodkoul
authored andcommitted
soundwire: intel_ace2x: cleanup DOAIS/DODS settings
Use two variables to save the settings, in preparation of a follow-up change to read values from _DSD properties. Starting with this patch, the bitfields will be reordered and listed MSB-first, as shown in the hardware documentation. Also note that the default for DOAIS is changed from 0x1 (copy-pasted value?) to 0x3 (hardware default). Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent a36ec5f commit 8096248

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/soundwire/intel_ace2x.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,17 @@
2525
static void intel_shim_vs_init(struct sdw_intel *sdw)
2626
{
2727
void __iomem *shim_vs = sdw->link_res->shim_vs;
28+
u16 doais;
29+
u16 dods;
2830
u16 act;
2931

32+
doais = 0x3;
33+
dods = 0x1;
34+
3035
act = intel_readw(shim_vs, SDW_SHIM2_INTEL_VS_ACTMCTL);
31-
u16p_replace_bits(&act, 0x1, SDW_SHIM2_INTEL_VS_ACTMCTL_DOAIS);
36+
u16p_replace_bits(&act, doais, SDW_SHIM2_INTEL_VS_ACTMCTL_DOAIS);
37+
u16p_replace_bits(&act, dods, SDW_SHIM2_INTEL_VS_ACTMCTL_DODS);
3238
act |= SDW_SHIM2_INTEL_VS_ACTMCTL_DACTQE;
33-
act |= SDW_SHIM2_INTEL_VS_ACTMCTL_DODS;
3439
intel_writew(shim_vs, SDW_SHIM2_INTEL_VS_ACTMCTL, act);
3540
usleep_range(10, 15);
3641
}

0 commit comments

Comments
 (0)