]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: ssm4567: Reset device before regcache_sync()
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 27 Jan 2016 13:26:18 +0000 (14:26 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 27 Jan 2016 13:33:50 +0000 (13:33 +0000)
commite927b39c7bab37d0ba3b93945449a15e89cbc8b4
tree27c95b16404b743cf13ffb9d18d53e6f6714fa2c
parentd7e15052ecc9ac4f938d1d7432c1d120a2711a7e
ASoC: ssm4567: Reset device before regcache_sync()

When the ssm4567 is powered up the driver calles regcache_sync() to restore
the register map content. regcache_sync() assumes that the device is in its
power-on reset state. Make sure that this is the case by explicitly
resetting the ssm4567 register map before calling regcache_sync() otherwise
we might end up with a incorrect register map which leads to undefined
behaviour.

One such undefined behaviour was observed when returning from system
suspend while a playback stream is active, in that case the ssm4567 was
kept muted after resume.

Fixes: d29190df31fd ("ASoC: ssm4567: Add driver for Analog Devices SSM4567 amplifier")
Reported-by: Harsha Priya <harshapriya.n@intel.com>
Tested-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/ssm4567.c