aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx25840/cx25840-audio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-04-22 09:22:46 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 01:00:16 -0400
commite2b8cf4ced47465b24d6fe911714827475fb0412 (patch)
treeadc3dcf673c084ad58f3ace0c11d44141cd892a4 /drivers/media/video/cx25840/cx25840-audio.c
parent3eb731705556b643df2cbae1bc98976335451548 (diff)
V4L/DVB (4005): Add support for the cx25836/7 video decoder.
Signed-off-by: Scott Alfter <salfter@ssai.us> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-audio.c')
-rw-r--r--drivers/media/video/cx25840/cx25840-audio.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/media/video/cx25840/cx25840-audio.c b/drivers/media/video/cx25840/cx25840-audio.c
index 9a4b813152e5..f035f2b9ffd1 100644
--- a/drivers/media/video/cx25840/cx25840-audio.c
+++ b/drivers/media/video/cx25840/cx25840-audio.c
@@ -31,7 +31,8 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
31 return -EINVAL; 31 return -EINVAL;
32 32
33 /* assert soft reset */ 33 /* assert soft reset */
34 cx25840_and_or(client, 0x810, ~0x1, 0x01); 34 if (!state->is_cx25836)
35 cx25840_and_or(client, 0x810, ~0x1, 0x01);
35 36
36 /* common for all inputs and rates */ 37 /* common for all inputs and rates */
37 /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x10 */ 38 /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x10 */
@@ -46,6 +47,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
46 /* AUX_PLL_FRAC */ 47 /* AUX_PLL_FRAC */
47 cx25840_write4(client, 0x110, 0xee39bb01); 48 cx25840_write4(client, 0x110, 0xee39bb01);
48 49
50 if (state->is_cx25836)
51 break;
52
49 /* src3/4/6_ctl = 0x0801f77f */ 53 /* src3/4/6_ctl = 0x0801f77f */
50 cx25840_write4(client, 0x900, 0x7ff70108); 54 cx25840_write4(client, 0x900, 0x7ff70108);
51 cx25840_write4(client, 0x904, 0x7ff70108); 55 cx25840_write4(client, 0x904, 0x7ff70108);
@@ -59,6 +63,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
59 /* AUX_PLL_FRAC */ 63 /* AUX_PLL_FRAC */
60 cx25840_write4(client, 0x110, 0xd66bec00); 64 cx25840_write4(client, 0x110, 0xd66bec00);
61 65
66 if (state->is_cx25836)
67 break;
68
62 /* src3/4/6_ctl = 0x08016d59 */ 69 /* src3/4/6_ctl = 0x08016d59 */
63 cx25840_write4(client, 0x900, 0x596d0108); 70 cx25840_write4(client, 0x900, 0x596d0108);
64 cx25840_write4(client, 0x904, 0x596d0108); 71 cx25840_write4(client, 0x904, 0x596d0108);
@@ -72,6 +79,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
72 /* AUX_PLL_FRAC */ 79 /* AUX_PLL_FRAC */
73 cx25840_write4(client, 0x110, 0xe5d69800); 80 cx25840_write4(client, 0x110, 0xe5d69800);
74 81
82 if (state->is_cx25836)
83 break;
84
75 /* src3/4/6_ctl = 0x08014faa */ 85 /* src3/4/6_ctl = 0x08014faa */
76 cx25840_write4(client, 0x900, 0xaa4f0108); 86 cx25840_write4(client, 0x900, 0xaa4f0108);
77 cx25840_write4(client, 0x904, 0xaa4f0108); 87 cx25840_write4(client, 0x904, 0xaa4f0108);
@@ -87,6 +97,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
87 /* AUX_PLL_FRAC */ 97 /* AUX_PLL_FRAC */
88 cx25840_write4(client, 0x110, 0x69082a01); 98 cx25840_write4(client, 0x110, 0x69082a01);
89 99
100 if (state->is_cx25836)
101 break;
102
90 /* src1_ctl = 0x08010000 */ 103 /* src1_ctl = 0x08010000 */
91 cx25840_write4(client, 0x8f8, 0x00000108); 104 cx25840_write4(client, 0x8f8, 0x00000108);
92 105
@@ -106,6 +119,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
106 /* AUX_PLL_FRAC */ 119 /* AUX_PLL_FRAC */
107 cx25840_write4(client, 0x110, 0xd66bec00); 120 cx25840_write4(client, 0x110, 0xd66bec00);
108 121
122 if (state->is_cx25836)
123 break;
124
109 /* src1_ctl = 0x08010000 */ 125 /* src1_ctl = 0x08010000 */
110 cx25840_write4(client, 0x8f8, 0xcd600108); 126 cx25840_write4(client, 0x8f8, 0xcd600108);
111 127
@@ -122,6 +138,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
122 /* AUX_PLL_FRAC */ 138 /* AUX_PLL_FRAC */
123 cx25840_write4(client, 0x110, 0xe5d69800); 139 cx25840_write4(client, 0x110, 0xe5d69800);
124 140
141 if (state->is_cx25836)
142 break;
143
125 /* src1_ctl = 0x08010000 */ 144 /* src1_ctl = 0x08010000 */
126 cx25840_write4(client, 0x8f8, 0x00800108); 145 cx25840_write4(client, 0x8f8, 0x00800108);
127 146
@@ -134,7 +153,8 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
134 } 153 }
135 154
136 /* deassert soft reset */ 155 /* deassert soft reset */
137 cx25840_and_or(client, 0x810, ~0x1, 0x00); 156 if (!state->is_cx25836)
157 cx25840_and_or(client, 0x810, ~0x1, 0x00);
138 158
139 state->audclk_freq = freq; 159 state->audclk_freq = freq;
140 160