aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-2.6.20/nhk15/patch_audiocodec_glitch.patch
blob: 8c1d3bbd479d10d6c66bb65dd0ca107c7eb08cfa (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
 sound/nomadik_stw5095.c |   54 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 53 insertions(+), 1 deletion(-)

--- linux-2.6.20.orig/sound/nomadik_stw5095.c
+++ linux-2.6.20/sound/nomadik_stw5095.c
@@ -2575,17 +2575,69 @@ t_codec_error nomadik_acodec_powerdown(_
 
 t_codec_error nomadik_acodec_powerup(void)
 {
 	t_codec_error error_status = CODEC_OK;
 
-	DEBUG(1, "  Entering nomadik_acodec_powerup()\n");
+	DEBUG(1, "  Entering nomadik_acodec_powerup Sequence()\n");
 
+	//CR0 conf
+	g_codec_system_context.codec_configuration.cr0_powerup =
+		    CODEC_STW5095_CR0_POWERUP_OFF;
+	g_codec_system_context.codec_configuration.cr0_enana =
+			CODEC_STW5095_CR0_ENANA_ON;
+
+	error_status = codec_stw5095_update_cr0();
+	if (CODEC_OK != error_status)
+		return (error_status);
+
+	//CR2 conf
+	codec_stw5095_i2cwrite(CODEC_STW5095_CR2, 0x0);
+	//CR19 conf
+	g_codec_system_context.codec_configuration.cr19_lssel =
+			CODEC_STW5095_CR19_LSSEL_MUTELOUDSPEAKER_DRIVER;
+	g_codec_system_context.codec_configuration.cr19_mutehp =
+			CODEC_STW5095_CR19_MUTEHP_MUTED;
+	g_codec_system_context.codec_configuration.cr19_mutelo =
+			CODEC_STW5095_CR19_MUTELO_MUTED;
+
+	error_status = codec_stw5095_update_cr19();
+	if (CODEC_OK != error_status)
+		return (error_status);
+
+	//CR0 conf
 	g_codec_system_context.codec_configuration.cr0_powerup =
 	    CODEC_STW5095_CR0_POWERUP_ON;
+
 	error_status = codec_stw5095_update_cr0();
+	if (CODEC_OK != error_status)
+		return (error_status);
+
+	#if 0
+	//CR2 conf
+	g_codec_system_context.codec_configuration.cr2_enlol =
+			CODEC_STW5095_CR2_ENLOL_ENABLED;
+	g_codec_system_context.codec_configuration.cr2_enlor =
+			CODEC_STW5095_CR2_ENLOR_ENABLED;
+
+	error_status = codec_stw5095_update_cr2();
+	if (CODEC_OK != error_status)
+		return (error_status);
+
+	//CR19 conf
+	g_codec_system_context.codec_configuration.cr19_mutehp =
+			CODEC_STW5095_CR19_MUTEHP_MUTED;
+
+	g_codec_system_context.codec_configuration.cr19_mutelo =
+			CODEC_STW5095_CR19_MUTELO_NOT_MUTED;
+
+	error_status = codec_stw5095_update_cr19();
+	if (CODEC_OK != error_status)
+		return (error_status);
+	#endif
 
 	DEBUG(1, "  leaving nomadik_acodec_powerup()\n");
+
 	return (error_status);
 }
 
 /**
 * nomadik_acodec_enable_bypassmode