b4b69a8a8225473b585df7794ed164b3b8537614
[openwrt/svn-archive/archive.git] / target / linux / xburst / patches-3.10 / 006-ASoC-JZ4740-delay-activation-of-the-DAC-to-work-arou.patch
1 From 46c628ae74578382ec324405dd4caafdbf3838bd Mon Sep 17 00:00:00 2001
2 From: Paul Cercueil <paul@crapouillou.net>
3 Date: Sat, 16 Jun 2012 19:36:31 +0200
4 Subject: [PATCH 06/16] ASoC: JZ4740: delay activation of the DAC to work
5 around a sound bug.
6
7 A proper fix of that bug would require a big rewrite of the driver,
8 which (I hope) will be done eventually.
9
10 Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
11 ---
12 sound/soc/codecs/jz4740.c | 9 ++++++---
13 1 file changed, 6 insertions(+), 3 deletions(-)
14
15 diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c
16 index 5f607b3..76ff580 100644
17 --- a/sound/soc/codecs/jz4740.c
18 +++ b/sound/soc/codecs/jz4740.c
19 @@ -249,12 +249,15 @@ static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec,
20 case SND_SOC_BIAS_ON:
21 break;
22 case SND_SOC_BIAS_PREPARE:
23 - mask = JZ4740_CODEC_1_VREF_DISABLE |
24 - JZ4740_CODEC_1_VREF_AMP_DISABLE |
25 - JZ4740_CODEC_1_HEADPHONE_POWERDOWN_M;
26 + mask = JZ4740_CODEC_1_HEADPHONE_POWERDOWN_M;
27 value = 0;
28
29 regmap_update_bits(regmap, JZ4740_REG_CODEC_1, mask, value);
30 +
31 + msleep(500);
32 + mask = JZ4740_CODEC_1_VREF_DISABLE |
33 + JZ4740_CODEC_1_VREF_AMP_DISABLE;
34 + regmap_update_bits(regmap, JZ4740_REG_CODEC_1, mask, 0);
35 break;
36 case SND_SOC_BIAS_STANDBY:
37 /* The only way to clear the suspend flag is to reset the codec */
38 --
39 1.7.10.4
40