Re: [PATCH v2 2/6] ASoC: codecs: lpass-wsa-macro: Add support to WSA Macro

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

 





On 29/10/2020 15:47, Pierre-Louis Bossart wrote:
+static void wsa_macro_mclk_enable(struct wsa_macro *wsa, bool mclk_enable)
+{
+    struct regmap *regmap = wsa->regmap;
+
+    if (mclk_enable) {
+        if (wsa->wsa_mclk_users == 0) {
+            regcache_mark_dirty(regmap);
+            regcache_sync_region(regmap, 0x0, WSA_MAX_OFFSET);

I am not a regcache/regmap expert but the sequence seems odd. I could be wrong, but one would typically sync *after* doing changes, no?

In this code path the MCLK is going from OFF to ON state, so the registers would be put in reset state, so we need to sync them with current cache state!

--srini




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux