Skip to content

Commit 393cae5

Browse files
Chao Songvinodkoul
authored andcommitted
soundwire: intel_ace2x: fix AC timing setting for ACE2.x
Start from ACE1.x, DOAISE is added to AC timing control register bit 5, it combines with DOAIS to get effective timing, and has the default value 1. The current code fills DOAIS, DACTQE and DODS bits to a variable initialized to zero, and updates the variable to AC timing control register. With this operation, We change DOAISE to 0, and force a much more aggressive timing. The timing is even unable to form a working waveform on SDA pin. This patch uses read-modify-write operation for the AC timing control register access, thus makes sure those bits not supposed and intended to change are not touched. Signed-off-by: Chao Song <chao.song@linux.intel.com> Reviewed-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/20231127124735.2080562-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent e199bf5 commit 393cae5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/soundwire/intel_ace2x.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
static void intel_shim_vs_init(struct sdw_intel *sdw)
2424
{
2525
void __iomem *shim_vs = sdw->link_res->shim_vs;
26-
u16 act = 0;
26+
u16 act;
2727

28+
act = intel_readw(shim_vs, SDW_SHIM2_INTEL_VS_ACTMCTL);
2829
u16p_replace_bits(&act, 0x1, SDW_SHIM2_INTEL_VS_ACTMCTL_DOAIS);
2930
act |= SDW_SHIM2_INTEL_VS_ACTMCTL_DACTQE;
3031
act |= SDW_SHIM2_INTEL_VS_ACTMCTL_DODS;

0 commit comments

Comments
 (0)