xburst: Update to 3.18
[openwrt/svn-archive/archive.git] / target / linux / xburst / patches-3.18 / 004-ASoC-JZ4740-delay-activation-of-the-DAC-to-work-arou.patch
1 From 1a1095927d224403af8ad57c354cc64521bf3081 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 4/7] ASoC: JZ4740: delay activation of the DAC to work around
5 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 sound/soc/codecs/jz4740.c | 9 ++++++---
11 1 file changed, 6 insertions(+), 3 deletions(-)
12
13 diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c
14 index df7c01c..6939444 100644
15 --- a/sound/soc/codecs/jz4740.c
16 +++ b/sound/soc/codecs/jz4740.c
17 @@ -249,12 +249,15 @@ static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec,
18 case SND_SOC_BIAS_ON:
19 break;
20 case SND_SOC_BIAS_PREPARE:
21 - mask = JZ4740_CODEC_1_VREF_DISABLE |
22 - JZ4740_CODEC_1_VREF_AMP_DISABLE |
23 - JZ4740_CODEC_1_HEADPHONE_POWERDOWN_M;
24 + mask = JZ4740_CODEC_1_HEADPHONE_POWERDOWN_M;
25 value = 0;
26
27 regmap_update_bits(regmap, JZ4740_REG_CODEC_1, mask, value);
28 +
29 + msleep(500);
30 + mask = JZ4740_CODEC_1_VREF_DISABLE |
31 + JZ4740_CODEC_1_VREF_AMP_DISABLE;
32 + regmap_update_bits(regmap, JZ4740_REG_CODEC_1, mask, 0);
33 break;
34 case SND_SOC_BIAS_STANDBY:
35 /* The only way to clear the suspend flag is to reset the codec */
36 --
37 1.7.10.4
38