MLK-11301: ASoC: cs42xx8: can't set volume 255 in idle mode
authorShengjiu Wang <shengjiu.wang@freescale.com>
Fri, 31 Jul 2015 09:48:53 +0000 (17:48 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:48:12 +0000 (14:48 -0500)
commit09173ed1a9489f42bf3f386996b59f1823f2d106
tree433008f97eeb5de5dfd180e3f1478e7e6f1883df
parent34639865ecb98b42b802c877da3d77b633bbef13
MLK-11301: ASoC: cs42xx8: can't set volume 255 in idle mode

Volume 255 corresponding to register value 0, the value 0 is default
value. In regcache_sync(), when the cache value is equal to default
value, this register will be skipped. So volume 255 isn't set to
register successfully.

The correct fix is to add software reset in runtime_resume, but cs42xx8
has no software reset, the hardware reset gpio pin is used by all the
perpherial device in ARD base board. So need to use another method.

In order to fix it, need to cherry-pick two patch from master branch.
Which will sync all the registers include the register which cache value
equal the default value, And remove regcache_mark_dirty().

Add update value of one register to make the cache_dirty if user press
the hardware reset pin on the board, then need to regcache_sync.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 5c0cae19928f99ebc8adf0013df850ba5b41d6a8)
sound/soc/codecs/cs42xx8.c