| From f77165fc08deee82107e20f35969d07a20340f94 Mon Sep 17 00:00:00 2001 |
| From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| Date: Thu, 10 Nov 2011 16:21:42 -0800 |
| Subject: 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> |
| (cherry picked from commit 3c7035268c2c89942fe51a61833d1066b4a766eb) |
| |
| Signed-off-by: Simon Horman <horms@verge.net.au> |
| --- |
| sound/soc/codecs/ak4642.c | 5 ++--- |
| 1 file changed, 2 insertions(+), 3 deletions(-) |
| |
| diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c |
| index dd0c835..f728181 100644 |
| --- a/sound/soc/codecs/ak4642.c |
| +++ b/sound/soc/codecs/ak4642.c |
| @@ -149,6 +149,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[] = { |
| @@ -224,7 +226,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 |
| @@ -256,8 +257,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); |
| -- |
| 1.7.10.2.565.gbd578b5 |
| |