Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0176022a authored by Vidyakumar Athota's avatar Vidyakumar Athota
Browse files

ASoC: wsa881x: avoid regcache_sync() during playback



During playback device is already in UP state so no need to
call regcache_sync() function again. Fix this issue by checking
clk count and call only regcache_sync() if clk count is zero.

Change-Id: I1662567176e4c576403df19388414ed4bfb19bad
Signed-off-by: default avatarVidyakumar Athota <vathota@codeaurora.org>
parent ec971dd4
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -983,7 +983,13 @@ static int32_t wsa881x_temp_reg_read(struct snd_soc_codec *codec,
			return -EINVAL;
		}
	}
	mutex_lock(&wsa881x->res_lock);
	if (!wsa881x->clk_cnt) {
		regcache_mark_dirty(wsa881x->regmap);
		regcache_sync(wsa881x->regmap);
	}
	mutex_unlock(&wsa881x->res_lock);

	wsa881x_resource_acquire(codec, ENABLE);

	if (WSA881X_IS_2_0(wsa881x->version)) {