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

ASoC: rt715-sdca: fix clock stop prepare timeout issue

Fix clock stop prepare timeout issue (#2853).
The trigger of internal circuit which belong to
“SDCA preset stuffs” was not set correctly in previous driver,
which could block clock_stop_preparation state.
Add the correct register setting to fix it.

Fixes: 20d17057f0a8c ('ASoC: rt715-sdca: Add RT715 sdca vendor-specific driver')
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jack Yu and committed by
Mark Brown
e343d34a dbc07517

+6
+1
sound/soc/codecs/rt715-sdca-sdw.c
··· 70 70 case 0x2000036: 71 71 case 0x2000037: 72 72 case 0x2000039: 73 + case 0x2000044: 73 74 case 0x6100000: 74 75 return true; 75 76 default:
+1
sound/soc/codecs/rt715-sdca-sdw.h
··· 113 113 { 0x2000036, 0x0000 }, 114 114 { 0x2000037, 0x0000 }, 115 115 { 0x2000039, 0xaa81 }, 116 + { 0x2000044, 0x0202 }, 116 117 { 0x6100000, 0x0100 }, 117 118 { SDW_SDCA_CTL(FUN_MIC_ARRAY, RT715_SDCA_FU_ADC8_9_VOL, 118 119 RT715_SDCA_FU_VOL_CTRL, CH_01), 0x00 },
+3
sound/soc/codecs/rt715-sdca.c
··· 1054 1054 rt715_sdca_index_update_bits(rt715, RT715_VENDOR_REG, 1055 1055 RT715_REV_1, 0x40, 0x40); 1056 1056 } 1057 + /* DFLL Calibration trigger */ 1058 + rt715_sdca_index_update_bits(rt715, RT715_VENDOR_REG, 1059 + RT715_DFLL_VAD, 0x1, 0x1); 1057 1060 /* trigger mode = VAD enable */ 1058 1061 regmap_write(rt715->regmap, 1059 1062 SDW_SDCA_CTL(FUN_MIC_ARRAY, RT715_SDCA_SMPU_TRIG_ST_EN,
+1
sound/soc/codecs/rt715-sdca.h
··· 81 81 #define RT715_AD_FUNC_EN 0x36 82 82 #define RT715_REV_1 0x37 83 83 #define RT715_SDW_INPUT_SEL 0x39 84 + #define RT715_DFLL_VAD 0x44 84 85 #define RT715_EXT_DMIC_CLK_CTRL2 0x54 85 86 86 87 /* Index (NID:61h) */