Patch "ASoC: wm8962: Wait for updated value of WM8962_CLOCKING1 register" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: wm8962: Wait for updated value of WM8962_CLOCKING1 register

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-wm8962-wait-for-updated-value-of-wm8962_clockin.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3f009a610fc78016ced546918f88c47d6733be11
Author: Chancel Liu <chancel.liu@xxxxxxx>
Date:   Wed Nov 9 20:13:54 2022 +0800

    ASoC: wm8962: Wait for updated value of WM8962_CLOCKING1 register
    
    [ Upstream commit 3ca507bf99611c82dafced73e921c1b10ee12869 ]
    
    DSPCLK_DIV field in WM8962_CLOCKING1 register is used to generate
    correct frequency of LRCLK and BCLK. Sometimes the read-only value
    can't be updated timely after enabling SYSCLK. This results in wrong
    calculation values. Delay is introduced here to wait for newest value
    from register. The time of the delay should be at least 500~1000us
    according to test.
    
    Signed-off-by: Chancel Liu <chancel.liu@xxxxxxx>
    Acked-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221109121354.123958-1-chancel.liu@xxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 6df06fba4377..ee1cad5af535 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2503,6 +2503,14 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
 		snd_soc_component_update_bits(component, WM8962_CLOCKING2,
 				WM8962_SYSCLK_ENA_MASK, WM8962_SYSCLK_ENA);
 
+	/* DSPCLK_DIV field in WM8962_CLOCKING1 register is used to generate
+	 * correct frequency of LRCLK and BCLK. Sometimes the read-only value
+	 * can't be updated timely after enabling SYSCLK. This results in wrong
+	 * calculation values. Delay is introduced here to wait for newest
+	 * value from register. The time of the delay should be at least
+	 * 500~1000us according to test.
+	 */
+	usleep_range(500, 1000);
 	dspclk = snd_soc_component_read(component, WM8962_CLOCKING1);
 
 	if (snd_soc_component_get_bias_level(component) != SND_SOC_BIAS_ON)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux