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

ASoC: Disable register synchronisation for low frequency WM8996 SYSCLK

With a low frequency SYSCLK and a fast I2C clock register synchronisation
may occasionally take too long to take effect, causing I/O issues. Disable
synchronisation in order to avoid any issues.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org

+8
+4
sound/soc/codecs/wm8996.c
··· 2007 2007 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); 2008 2008 int lfclk = 0; 2009 2009 int ratediv = 0; 2010 + int sync = WM8996_REG_SYNC; 2010 2011 int src; 2011 2012 int old; 2012 2013 ··· 2052 2051 case 32000: 2053 2052 case 32768: 2054 2053 lfclk = WM8996_LFCLK_ENA; 2054 + sync = 0; 2055 2055 break; 2056 2056 default: 2057 2057 dev_warn(codec->dev, "Unsupported clock rate %dHz\n", ··· 2066 2064 WM8996_SYSCLK_SRC_MASK | WM8996_SYSCLK_DIV_MASK, 2067 2065 src << WM8996_SYSCLK_SRC_SHIFT | ratediv); 2068 2066 snd_soc_update_bits(codec, WM8996_CLOCKING_1, WM8996_LFCLK_ENA, lfclk); 2067 + snd_soc_update_bits(codec, WM8996_CONTROL_INTERFACE_1, 2068 + WM8996_REG_SYNC, sync); 2069 2069 snd_soc_update_bits(codec, WM8996_AIF_CLOCKING_1, 2070 2070 WM8996_SYSCLK_ENA, old); 2071 2071
+4
sound/soc/codecs/wm8996.h
··· 1567 1567 /* 1568 1568 * R257 (0x101) - Control Interface (1) 1569 1569 */ 1570 + #define WM8996_REG_SYNC 0x8000 /* REG_SYNC */ 1571 + #define WM8996_REG_SYNC_MASK 0x8000 /* REG_SYNC */ 1572 + #define WM8996_REG_SYNC_SHIFT 15 /* REG_SYNC */ 1573 + #define WM8996_REG_SYNC_WIDTH 1 /* REG_SYNC */ 1570 1574 #define WM8996_AUTO_INC 0x0004 /* AUTO_INC */ 1571 1575 #define WM8996_AUTO_INC_MASK 0x0004 /* AUTO_INC */ 1572 1576 #define WM8996_AUTO_INC_SHIFT 2 /* AUTO_INC */