Lines Matching full:cx
13 static int set_audclk_freq(struct cx18 *cx, u32 freq)
15 struct cx18_av_state *state = &cx->av_state;
63 cx18_av_write4(cx, 0x108, 0x200d040f);
67 cx18_av_write4(cx, 0x10c, 0x002be2fe);
71 cx18_av_write4(cx, 0x110, 0x0176740c);
75 cx18_av_write4(cx, 0x900, 0x0801f77f);
76 cx18_av_write4(cx, 0x904, 0x0801f77f);
77 cx18_av_write4(cx, 0x90c, 0x0801f77f);
80 cx18_av_write(cx, 0x127, 0x60);
83 cx18_av_write4(cx, 0x12c, 0x11202fff);
90 cx18_av_write4(cx, 0x128, 0xa00d2ef8);
98 cx18_av_write4(cx, 0x108, 0x180e040f);
102 cx18_av_write4(cx, 0x10c, 0x002be2fe);
106 cx18_av_write4(cx, 0x110, 0x0062a1f2);
110 cx18_av_write4(cx, 0x900, 0x08016d59);
111 cx18_av_write4(cx, 0x904, 0x08016d59);
112 cx18_av_write4(cx, 0x90c, 0x08016d59);
115 cx18_av_write(cx, 0x127, 0x58);
118 cx18_av_write4(cx, 0x12c, 0x112092ff);
125 cx18_av_write4(cx, 0x128, 0xa01d4bf8);
133 cx18_av_write4(cx, 0x108, 0x160e040f);
137 cx18_av_write4(cx, 0x10c, 0x002be2fe);
141 cx18_av_write4(cx, 0x110, 0x005227ad);
145 cx18_av_write4(cx, 0x900, 0x08014faa);
146 cx18_av_write4(cx, 0x904, 0x08014faa);
147 cx18_av_write4(cx, 0x90c, 0x08014faa);
150 cx18_av_write(cx, 0x127, 0x56);
153 cx18_av_write4(cx, 0x12c, 0x11205fff);
160 cx18_av_write4(cx, 0x128, 0xa01193f8);
170 cx18_av_write4(cx, 0x108, 0x300d040f);
174 cx18_av_write4(cx, 0x10c, 0x002be2fe);
178 cx18_av_write4(cx, 0x110, 0x0176740c);
182 cx18_av_write4(cx, 0x8f8, 0x08010000);
186 cx18_av_write4(cx, 0x900, 0x08020000);
187 cx18_av_write4(cx, 0x904, 0x08020000);
188 cx18_av_write4(cx, 0x90c, 0x08020000);
191 cx18_av_write(cx, 0x127, 0x70);
194 cx18_av_write4(cx, 0x12c, 0x11201fff);
201 cx18_av_write4(cx, 0x128, 0xa00d2ef8);
209 cx18_av_write4(cx, 0x108, 0x240e040f);
213 cx18_av_write4(cx, 0x10c, 0x002be2fe);
217 cx18_av_write4(cx, 0x110, 0x0062a1f2);
221 cx18_av_write4(cx, 0x8f8, 0x080160cd);
225 cx18_av_write4(cx, 0x900, 0x08017385);
226 cx18_av_write4(cx, 0x904, 0x08017385);
227 cx18_av_write4(cx, 0x90c, 0x08017385);
230 cx18_av_write(cx, 0x127, 0x64);
233 cx18_av_write4(cx, 0x12c, 0x112061ff);
240 cx18_av_write4(cx, 0x128, 0xa01d4bf8);
248 cx18_av_write4(cx, 0x108, 0x200d040f);
252 cx18_av_write4(cx, 0x10c, 0x002be2fe);
256 cx18_av_write4(cx, 0x110, 0x0176740c);
260 cx18_av_write4(cx, 0x8f8, 0x08018000);
264 cx18_av_write4(cx, 0x900, 0x08015555);
265 cx18_av_write4(cx, 0x904, 0x08015555);
266 cx18_av_write4(cx, 0x90c, 0x08015555);
269 cx18_av_write(cx, 0x127, 0x60);
272 cx18_av_write4(cx, 0x12c, 0x11203fff);
279 cx18_av_write4(cx, 0x128, 0xa01193f8);
289 void cx18_av_audio_set_path(struct cx18 *cx)
291 struct cx18_av_state *state = &cx->av_state;
295 v = cx18_av_read(cx, 0x803) & ~0x10;
296 cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
299 v = cx18_av_read(cx, 0x810) | 0x01;
300 cx18_av_write_expect(cx, 0x810, v, v, 0x0f);
303 cx18_av_write(cx, 0x8d3, 0x1f);
307 cx18_av_write4(cx, 0x8d0, 0x01011012);
314 cx18_av_write4(cx, 0x8d0, 0x1f063870);
317 set_audclk_freq(cx, state->audclk_freq);
320 v = cx18_av_read(cx, 0x810) & ~0x01;
321 cx18_av_write_expect(cx, 0x810, v, v, 0x0f);
326 v = cx18_av_read(cx, 0x803) | 0x10;
327 cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
331 static void set_volume(struct cx18 *cx, int volume)
344 cx18_av_write(cx, 0x8d4, 228 - (vol * 2));
347 static void set_bass(struct cx18 *cx, int bass)
350 cx18_av_and_or(cx, 0x8d9, ~0x3f, 48 - (bass * 48 / 0xffff));
353 static void set_treble(struct cx18 *cx, int treble)
356 cx18_av_and_or(cx, 0x8db, ~0x3f, 48 - (treble * 48 / 0xffff));
359 static void set_balance(struct cx18 *cx, int balance)
364 cx18_av_and_or(cx, 0x8d5, 0x7f, 0x80);
366 cx18_av_and_or(cx, 0x8d5, ~0x7f, bal & 0x7f);
369 cx18_av_and_or(cx, 0x8d5, 0x7f, 0x00);
371 cx18_av_and_or(cx, 0x8d5, ~0x7f, 0x80 - bal);
375 static void set_mute(struct cx18 *cx, int mute)
377 struct cx18_av_state *state = &cx->av_state;
385 v = cx18_av_read(cx, 0x803);
389 cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
390 cx18_av_write(cx, 0x8d3, 0x1f);
394 cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
398 cx18_av_and_or(cx, 0x8d3, ~0x2, mute ? 0x02 : 0x00);
404 struct cx18 *cx = v4l2_get_subdevdata(sd);
405 struct cx18_av_state *state = &cx->av_state;
410 v = cx18_av_read(cx, 0x803) & ~0x10;
411 cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
412 cx18_av_write(cx, 0x8d3, 0x1f);
414 v = cx18_av_read(cx, 0x810) | 0x1;
415 cx18_av_write_expect(cx, 0x810, v, v, 0x0f);
417 retval = set_audclk_freq(cx, freq);
419 v = cx18_av_read(cx, 0x810) & ~0x1;
420 cx18_av_write_expect(cx, 0x810, v, v, 0x0f);
422 v = cx18_av_read(cx, 0x803) | 0x10;
423 cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
431 struct cx18 *cx = v4l2_get_subdevdata(sd);
435 set_volume(cx, ctrl->val);
438 set_bass(cx, ctrl->val);
441 set_treble(cx, ctrl->val);
444 set_balance(cx, ctrl->val);
447 set_mute(cx, ctrl->val);