OSDN Git Service

ASoC: wm8804: Add DAPM widgets for SPDIF/AIF
authorSapthagiri Baratam <sapthagiri.baratam@incubesol.com>
Tue, 7 Apr 2015 11:55:09 +0000 (12:55 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 8 Apr 2015 18:25:40 +0000 (19:25 +0100)
commit5631f18763f1b0989cec7cbf8f3badcb74dfe469
tree3f9e63cd0cf6ccb130b040b56f0ae665b2e09877
parent9b5c352e5425622b4371387d4718060da5d3ae32
ASoC: wm8804: Add DAPM widgets for SPDIF/AIF

This change converts the driver to use DAPM to control the power for the
various blocks on the chip. As part of this change the existing controls
"TX Playback Switch" (controlled power for the SPDIF TX block) and "AIF
Playback Switch" (controlled power for the AIF block) are both removed,
as they are now redundant since the power state of those blocks is
controlled automatically by DAPM.

There are several benefits of this change, the most important of which
is this change adds support for powering down the SPDIF RX block. The RX
block will automatically assume control of the PLL on the chip when it
is receiving a signal, so leaving this enabled all the time as was
currently done in the driver can be problematic. An incoming SPDIF signal
that is not being used can completely destroy the clocking for an in use
TX signal. But this change ensures that the RX block will only be
powered when the user intends to be receiving data, thus avoiding this
issue.

Additional benefits include the chip being simpler to operate as the
power no longer needs to be manually controlled between use-cases and a
small power saving (although it is acknowledged that this is likely
unimportant in the typical use-cases for this chip).

Signed-off-by: Sapthagiri Baratam <sapthagiri.baratam@incubesol.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8804.c