summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ak4642.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-11-10 16:21:42 -0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-11 08:47:04 +0000
commit3c7035268c2c89942fe51a61833d1066b4a766eb (patch)
tree29eda9eea71815859515800a938d44837f0c6146 /sound/soc/codecs/ak4642.c
parent24747daea5610676fd1e2c2ca603c8822a085c87 (diff)
downloadop-kernel-dev-3c7035268c2c89942fe51a61833d1066b4a766eb.zip
op-kernel-dev-3c7035268c2c89942fe51a61833d1066b4a766eb.tar.gz
ASoC: ak4642: add headphone mute switch control
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/ak4642.c')
-rw-r--r--sound/soc/codecs/ak4642.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index da9caf0..b2460c2 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -150,6 +150,8 @@ static const struct snd_kcontrol_new ak4642_snd_controls[] = {
SOC_DOUBLE_R_TLV("Digital Playback Volume", L_DVC, R_DVC,
0, 0xFF, 1, out_tlv),
+
+ SOC_SINGLE("Headphone Switch", PW_MGMT2, 6, 1, 0),
};
static const struct snd_kcontrol_new ak4642_hpout_mixer_controls[] = {
@@ -225,7 +227,6 @@ static int ak4642_dai_startup(struct snd_pcm_substream *substream,
*/
snd_soc_write(codec, L_IVC, 0x91); /* volume */
snd_soc_write(codec, R_IVC, 0x91); /* volume */
- snd_soc_update_bits(codec, PW_MGMT2, HPMTN, HPMTN);
} else {
/*
* start stereo input
@@ -257,8 +258,6 @@ static void ak4642_dai_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_codec *codec = dai->codec;
if (is_play) {
- /* stop headphone output */
- snd_soc_update_bits(codec, PW_MGMT2, HPMTN, 0);
} else {
/* stop stereo input */
snd_soc_update_bits(codec, PW_MGMT1, PMADL, 0);
OpenPOWER on IntegriCloud