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

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: cs530x: Correct MCLK reference frequency values

The MCLK frequency must be 49.152 MHz (for 48 kHz-related
sample rates) or 45.1584 MHz (for 44.1 kHz-related sample rates).

Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://patch.msgid.link/20251023090327.58275-10-vitalyr@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Vitaly Rodionov and committed by
Mark Brown
e7ab8583 c37c3e5e

+12 -3
+6 -3
sound/soc/codecs/cs530x.c
··· 1100 1100 1101 1101 switch (source) { 1102 1102 case CS530X_SYSCLK_SRC_MCLK: 1103 - if (freq != 24560000 && freq != 22572000) { 1104 - dev_err(component->dev, "Invalid MCLK source rate %d\n", 1105 - freq); 1103 + switch (freq) { 1104 + case CS530X_SYSCLK_REF_45_1MHZ: 1105 + case CS530X_SYSCLK_REF_49_1MHZ: 1106 + break; 1107 + default: 1108 + dev_err(component->dev, "Invalid MCLK source rate %d\n", freq); 1106 1109 return -EINVAL; 1107 1110 } 1108 1111 break;
+6
sound/soc/codecs/cs530x.h
··· 200 200 /* IN_VOL_CTL5 and OUT_VOL_CTL5 */ 201 201 #define CS530X_INOUT_VU BIT(0) 202 202 203 + /* MCLK Reference Source Frequency */ 204 + /* 41KHz related */ 205 + #define CS530X_SYSCLK_REF_45_1MHZ 45158400 206 + /* 48KHz related */ 207 + #define CS530X_SYSCLK_REF_49_1MHZ 49152000 208 + 203 209 /* System Clock Source */ 204 210 #define CS530X_SYSCLK_SRC_MCLK 0 205 211 #define CS530X_SYSCLK_SRC_PLL 1