aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-av-audio.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-12-20 21:26:38 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:39:23 -0500
commit57e24b629a5282bee24aaff44977270a3e462041 (patch)
tree6e2206b9162162dfa540527426d9d49b351294e3 /drivers/media/video/cx18/cx18-av-audio.c
parent15029b39bb95a765b57ad81f5062718b10422072 (diff)
V4L/DVB (9936): cx18: Disable locking of Video and Audio PLL for analog captures
Disable AV_LOCK, locking of audio PLL to video PLL in the cx18-av-core for analog captures. It seems to have adverse effects on captures from SVideo and CVBS sources with current clock & crystal settings in the driver. Many thanks to Jeff Campbell and Mike Bradley for reporting this problem, and suggesting the solution and performing extensive testing to support their suggestion. Reported-by: Jeff Campbell <jac1dlists@gmail.com> Reported-by: Mike Bradley <mike.bradley@incanetworks.com> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-av-audio.c')
-rw-r--r--drivers/media/video/cx18/cx18-av-audio.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/video/cx18/cx18-av-audio.c b/drivers/media/video/cx18/cx18-av-audio.c
index fd85b9b2d241..148f710974d5 100644
--- a/drivers/media/video/cx18/cx18-av-audio.c
+++ b/drivers/media/video/cx18/cx18-av-audio.c
@@ -57,11 +57,11 @@ static int set_audclk_freq(struct cx18 *cx, u32 freq)
57 cx18_av_write4(cx, 0x12c, 0x11202fff); 57 cx18_av_write4(cx, 0x12c, 0x11202fff);
58 58
59 /* 59 /*
60 * EN_AV_LOCK = 1 60 * EN_AV_LOCK = 0
61 * VID_COUNT = 0x0d2ef8 = 107999.000 * 8 = 61 * VID_COUNT = 0x0d2ef8 = 107999.000 * 8 =
62 * ((8 samples/32,000) * (13,500,000 * 8) * 4 - 1) * 8 62 * ((8 samples/32,000) * (13,500,000 * 8) * 4 - 1) * 8
63 */ 63 */
64 cx18_av_write4(cx, 0x128, 0xa10d2ef8); 64 cx18_av_write4(cx, 0x128, 0xa00d2ef8);
65 break; 65 break;
66 66
67 case 44100: 67 case 44100:
@@ -82,11 +82,11 @@ static int set_audclk_freq(struct cx18 *cx, u32 freq)
82 cx18_av_write4(cx, 0x12c, 0x112092ff); 82 cx18_av_write4(cx, 0x12c, 0x112092ff);
83 83
84 /* 84 /*
85 * EN_AV_LOCK = 1 85 * EN_AV_LOCK = 0
86 * VID_COUNT = 0x1d4bf8 = 239999.000 * 8 = 86 * VID_COUNT = 0x1d4bf8 = 239999.000 * 8 =
87 * ((49 samples/44,100) * (13,500,000 * 8) * 2 - 1) * 8 87 * ((49 samples/44,100) * (13,500,000 * 8) * 2 - 1) * 8
88 */ 88 */
89 cx18_av_write4(cx, 0x128, 0xa11d4bf8); 89 cx18_av_write4(cx, 0x128, 0xa01d4bf8);
90 break; 90 break;
91 91
92 case 48000: 92 case 48000:
@@ -107,11 +107,11 @@ static int set_audclk_freq(struct cx18 *cx, u32 freq)
107 cx18_av_write4(cx, 0x12c, 0x11205fff); 107 cx18_av_write4(cx, 0x12c, 0x11205fff);
108 108
109 /* 109 /*
110 * EN_AV_LOCK = 1 110 * EN_AV_LOCK = 0
111 * VID_COUNT = 0x1193f8 = 143999.000 * 8 = 111 * VID_COUNT = 0x1193f8 = 143999.000 * 8 =
112 * ((4 samples/48,000) * (13,500,000 * 8) * 16 - 1) * 8 112 * ((4 samples/48,000) * (13,500,000 * 8) * 16 - 1) * 8
113 */ 113 */
114 cx18_av_write4(cx, 0x128, 0xa11193f8); 114 cx18_av_write4(cx, 0x128, 0xa01193f8);
115 break; 115 break;
116 } 116 }
117 } else { 117 } else {
@@ -141,11 +141,11 @@ static int set_audclk_freq(struct cx18 *cx, u32 freq)
141 cx18_av_write4(cx, 0x12c, 0x11201fff); 141 cx18_av_write4(cx, 0x12c, 0x11201fff);
142 142
143 /* 143 /*
144 * EN_AV_LOCK = 1 144 * EN_AV_LOCK = 0
145 * VID_COUNT = 0x0d2ef8 = 107999.000 * 8 = 145 * VID_COUNT = 0x0d2ef8 = 107999.000 * 8 =
146 * ((8 samples/32,000) * (13,500,000 * 8) * 4 - 1) * 8 146 * ((8 samples/32,000) * (13,500,000 * 8) * 4 - 1) * 8
147 */ 147 */
148 cx18_av_write4(cx, 0x128, 0xa10d2ef8); 148 cx18_av_write4(cx, 0x128, 0xa00d2ef8);
149 break; 149 break;
150 150
151 case 44100: 151 case 44100:
@@ -170,11 +170,11 @@ static int set_audclk_freq(struct cx18 *cx, u32 freq)
170 cx18_av_write4(cx, 0x12c, 0x112061ff); 170 cx18_av_write4(cx, 0x12c, 0x112061ff);
171 171
172 /* 172 /*
173 * EN_AV_LOCK = 1 173 * EN_AV_LOCK = 0
174 * VID_COUNT = 0x1d4bf8 = 239999.000 * 8 = 174 * VID_COUNT = 0x1d4bf8 = 239999.000 * 8 =
175 * ((49 samples/44,100) * (13,500,000 * 8) * 2 - 1) * 8 175 * ((49 samples/44,100) * (13,500,000 * 8) * 2 - 1) * 8
176 */ 176 */
177 cx18_av_write4(cx, 0x128, 0xa11d4bf8); 177 cx18_av_write4(cx, 0x128, 0xa01d4bf8);
178 break; 178 break;
179 179
180 case 48000: 180 case 48000:
@@ -199,11 +199,11 @@ static int set_audclk_freq(struct cx18 *cx, u32 freq)
199 cx18_av_write4(cx, 0x12c, 0x11203fff); 199 cx18_av_write4(cx, 0x12c, 0x11203fff);
200 200
201 /* 201 /*
202 * EN_AV_LOCK = 1 202 * EN_AV_LOCK = 0
203 * VID_COUNT = 0x1193f8 = 143999.000 * 8 = 203 * VID_COUNT = 0x1193f8 = 143999.000 * 8 =
204 * ((4 samples/48,000) * (13,500,000 * 8) * 16 - 1) * 8 204 * ((4 samples/48,000) * (13,500,000 * 8) * 16 - 1) * 8
205 */ 205 */
206 cx18_av_write4(cx, 0x128, 0xa11193f8); 206 cx18_av_write4(cx, 0x128, 0xa01193f8);
207 break; 207 break;
208 } 208 }
209 } 209 }