summaryrefslogtreecommitdiff
path: root/target/linux/xburst/patches-3.10/006-ASoC-JZ4740-delay-activation-of-the-DAC-to-work-arou.patch
blob: 7a7ce73ec1f04483c595a13e7183d04ba7b4f121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 46c628ae74578382ec324405dd4caafdbf3838bd Mon Sep 17 00:00:00 2001
From: Paul Cercueil <paul@crapouillou.net>
Date: Sat, 16 Jun 2012 19:36:31 +0200
Subject: [PATCH 06/16] ASoC: JZ4740: delay activation of the DAC to work
 around a sound bug.

A proper fix of that bug would require a big rewrite of the driver,
which (I hope) will be done eventually.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/jz4740.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/sound/soc/codecs/jz4740.c
+++ b/sound/soc/codecs/jz4740.c
@@ -249,12 +249,15 @@ static int jz4740_codec_set_bias_level(s
 	case SND_SOC_BIAS_ON:
 		break;
 	case SND_SOC_BIAS_PREPARE:
-		mask = JZ4740_CODEC_1_VREF_DISABLE |
-				JZ4740_CODEC_1_VREF_AMP_DISABLE |
-				JZ4740_CODEC_1_HEADPHONE_POWERDOWN_M;
+		mask = JZ4740_CODEC_1_HEADPHONE_POWERDOWN_M;
 		value = 0;
 
 		regmap_update_bits(regmap, JZ4740_REG_CODEC_1, mask, value);
+
+		msleep(500);
+		mask = JZ4740_CODEC_1_VREF_DISABLE |
+						JZ4740_CODEC_1_VREF_AMP_DISABLE;
+		regmap_update_bits(regmap, JZ4740_REG_CODEC_1, mask, 0);
 		break;
 	case SND_SOC_BIAS_STANDBY:
 		/* The only way to clear the suspend flag is to reset the codec */