Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: dwc: add quirk to override COMP_PARAM_1 register

DWC for capture in ACP 2.x IP reports playback and capture capabilities
though it supports only capture. Added a quirk to override default value
to represent capture capability only.

Signed-off-by: Maruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Maruthi Srinivas Bayyavarapu and committed by
Mark Brown
a242cac1 0032e9db

+5
+1
include/sound/designware_i2s.h
··· 46 46 u32 snd_rates; 47 47 48 48 #define DW_I2S_QUIRK_COMP_REG_OFFSET (1 << 0) 49 + #define DW_I2S_QUIRK_COMP_PARAM1 (1 << 1) 49 50 unsigned int quirks; 50 51 unsigned int i2s_reg_comp1; 51 52 unsigned int i2s_reg_comp2;
+4
sound/soc/dwc/designware_i2s.c
··· 500 500 u32 comp2 = i2s_read_reg(dev->i2s_base, dev->i2s_reg_comp2); 501 501 u32 idx; 502 502 503 + if (dev->capability & DWC_I2S_RECORD && 504 + dev->quirks & DW_I2S_QUIRK_COMP_PARAM1) 505 + comp1 = comp1 & ~BIT(5); 506 + 503 507 if (COMP1_TX_ENABLED(comp1)) { 504 508 dev_dbg(dev->dev, " designware: play supported\n"); 505 509 idx = COMP1_TX_WORDSIZE_0(comp1);