From 3fda075378da508468d330057ba5d65646227fc9 Mon Sep 17 00:00:00 2001 From: Laxminath Kasam Date: Tue, 31 Jul 2018 19:27:44 +0530 Subject: [PATCH 1/2] soc: swr-wcd-ctrl: Fix wsa mute issue for stereo playback When temperature on a single wsa881x device is being read, then soundwire master wakes up both wsa881x devices but regcache_sync is happening only for one wsa881x device on which the temperature is being read. This results in audio playback mute after temperature read. Fix the regcache sync during temperature read and playback usecase. Change-Id: I856b96517c629ac685bbc25caabee841037106c8 Signed-off-by: Laxminath Kasam --- soc/swr-wcd-ctrl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/soc/swr-wcd-ctrl.c b/soc/swr-wcd-ctrl.c index 729eb3850b2d..ecca5f699fde 100644 --- a/soc/swr-wcd-ctrl.c +++ b/soc/swr-wcd-ctrl.c @@ -1790,6 +1790,8 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data) (swrm->state == SWR_MSTR_UP)) { dev_dbg(swrm->dev, "%s: SWR master is already UP: %d\n", __func__, swrm->state); + list_for_each_entry(swr_dev, &mstr->devices, dev_list) + swr_reset_device(swr_dev); } else { pm_runtime_mark_last_busy(&pdev->dev); mutex_unlock(&swrm->reslock); From 846ad08f106a2a61ff03fade9c5d806716c06f10 Mon Sep 17 00:00:00 2001 From: Laxminath Kasam Date: Tue, 31 Jul 2018 19:30:32 +0530 Subject: [PATCH 2/2] soc: soundwire: Fix wsa mute issue for stereo playback When stereo playback start and temperature read initiated at same time, one of speaker PA bits are not set in particular race scenario. Handle the broadcast check in soundwire framework to ensure broadcast is disabled only when respective gr_sid slave calls swr_remove_from_group. Change-Id: I6f82a8c3c0f39dc20c1def09c1728ce4c26c2f5d Signed-off-by: Laxminath Kasam --- soc/soundwire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soc/soundwire.c b/soc/soundwire.c index f05a5f9b1fb5..79bf75f785d5 100644 --- a/soc/soundwire.c +++ b/soc/soundwire.c @@ -245,7 +245,7 @@ int swr_remove_from_group(struct swr_device *dev, u8 dev_num) if (!dev->group_id) return 0; - if (master->gr_sid == dev_num) + if (master->gr_sid != dev_num) return 0; if (master->remove_from_group && master->remove_from_group(master))