summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-01-06 18:17:24 +0000
committerMark Brown <broonie@kernel.org>2017-01-06 18:17:24 +0000
commit8452a7639464a716b2b4051bd74cce1bdbeefbce (patch)
tree7864531924fbeb9d9fbaa73ccf9495a6f15eaf04
parent1448099dd3d55546057cdda0493a6493c007b9fd (diff)
parent09a8bf812c662c833621f19955a1d3fa495801bc (diff)
downloadop-kernel-dev-8452a7639464a716b2b4051bd74cce1bdbeefbce.zip
op-kernel-dev-8452a7639464a716b2b4051bd74cce1bdbeefbce.tar.gz
Merge branch 'topic/hda-ext-decouple' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
-rw-r--r--sound/hda/ext/hdac_ext_stream.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/hda/ext/hdac_ext_stream.c b/sound/hda/ext/hdac_ext_stream.c
index 3be051ab5..c96d7a7 100644
--- a/sound/hda/ext/hdac_ext_stream.c
+++ b/sound/hda/ext/hdac_ext_stream.c
@@ -128,14 +128,17 @@ void snd_hdac_ext_stream_decouple(struct hdac_ext_bus *ebus,
{
struct hdac_stream *hstream = &stream->hstream;
struct hdac_bus *bus = &ebus->bus;
+ u32 val;
+ int mask = AZX_PPCTL_PROCEN(hstream->index);
spin_lock_irq(&bus->reg_lock);
- if (decouple)
- snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, 0,
- AZX_PPCTL_PROCEN(hstream->index));
- else
- snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL,
- AZX_PPCTL_PROCEN(hstream->index), 0);
+ val = readw(bus->ppcap + AZX_REG_PP_PPCTL) & mask;
+
+ if (decouple && !val)
+ snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, mask);
+ else if (!decouple && val)
+ snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, 0);
+
stream->decoupled = decouple;
spin_unlock_irq(&bus->reg_lock);
}
OpenPOWER on IntegriCloud