]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerKamal Mostafa <kamal@canonical.com>
Mon, 16 May 2016 17:26:19 +0000 (10:26 -0700)
commit4374dfa965907c78d94470c3cec29449a54b47c8
tree1ea6db63ce9ad2d1cf70aa9e5224f98895e47133
parent4a34ab8d7b1a0fb1ae42fdcb04e9de306de36309
ASoC: ssm4567: Reset device before regcache_sync()

BugLink: http://bugs.launchpad.net/bugs/1578798
commit 712a8038cc24dba668afe82f0413714ca87184e0 upstream.

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: 1ee44ce03011 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
sound/soc/codecs/ssm4567.c