• Home
  • Raw
  • Download

Lines Matching refs:cx

27 static int set_audclk_freq(struct cx18 *cx, u32 freq)  in set_audclk_freq()  argument
29 struct cx18_av_state *state = &cx->av_state; in set_audclk_freq()
77 cx18_av_write4(cx, 0x108, 0x200d040f); in set_audclk_freq()
81 cx18_av_write4(cx, 0x10c, 0x002be2fe); in set_audclk_freq()
85 cx18_av_write4(cx, 0x110, 0x0176740c); in set_audclk_freq()
89 cx18_av_write4(cx, 0x900, 0x0801f77f); in set_audclk_freq()
90 cx18_av_write4(cx, 0x904, 0x0801f77f); in set_audclk_freq()
91 cx18_av_write4(cx, 0x90c, 0x0801f77f); in set_audclk_freq()
94 cx18_av_write(cx, 0x127, 0x60); in set_audclk_freq()
97 cx18_av_write4(cx, 0x12c, 0x11202fff); in set_audclk_freq()
104 cx18_av_write4(cx, 0x128, 0xa00d2ef8); in set_audclk_freq()
112 cx18_av_write4(cx, 0x108, 0x180e040f); in set_audclk_freq()
116 cx18_av_write4(cx, 0x10c, 0x002be2fe); in set_audclk_freq()
120 cx18_av_write4(cx, 0x110, 0x0062a1f2); in set_audclk_freq()
124 cx18_av_write4(cx, 0x900, 0x08016d59); in set_audclk_freq()
125 cx18_av_write4(cx, 0x904, 0x08016d59); in set_audclk_freq()
126 cx18_av_write4(cx, 0x90c, 0x08016d59); in set_audclk_freq()
129 cx18_av_write(cx, 0x127, 0x58); in set_audclk_freq()
132 cx18_av_write4(cx, 0x12c, 0x112092ff); in set_audclk_freq()
139 cx18_av_write4(cx, 0x128, 0xa01d4bf8); in set_audclk_freq()
147 cx18_av_write4(cx, 0x108, 0x160e040f); in set_audclk_freq()
151 cx18_av_write4(cx, 0x10c, 0x002be2fe); in set_audclk_freq()
155 cx18_av_write4(cx, 0x110, 0x005227ad); in set_audclk_freq()
159 cx18_av_write4(cx, 0x900, 0x08014faa); in set_audclk_freq()
160 cx18_av_write4(cx, 0x904, 0x08014faa); in set_audclk_freq()
161 cx18_av_write4(cx, 0x90c, 0x08014faa); in set_audclk_freq()
164 cx18_av_write(cx, 0x127, 0x56); in set_audclk_freq()
167 cx18_av_write4(cx, 0x12c, 0x11205fff); in set_audclk_freq()
174 cx18_av_write4(cx, 0x128, 0xa01193f8); in set_audclk_freq()
184 cx18_av_write4(cx, 0x108, 0x300d040f); in set_audclk_freq()
188 cx18_av_write4(cx, 0x10c, 0x002be2fe); in set_audclk_freq()
192 cx18_av_write4(cx, 0x110, 0x0176740c); in set_audclk_freq()
196 cx18_av_write4(cx, 0x8f8, 0x08010000); in set_audclk_freq()
200 cx18_av_write4(cx, 0x900, 0x08020000); in set_audclk_freq()
201 cx18_av_write4(cx, 0x904, 0x08020000); in set_audclk_freq()
202 cx18_av_write4(cx, 0x90c, 0x08020000); in set_audclk_freq()
205 cx18_av_write(cx, 0x127, 0x70); in set_audclk_freq()
208 cx18_av_write4(cx, 0x12c, 0x11201fff); in set_audclk_freq()
215 cx18_av_write4(cx, 0x128, 0xa00d2ef8); in set_audclk_freq()
223 cx18_av_write4(cx, 0x108, 0x240e040f); in set_audclk_freq()
227 cx18_av_write4(cx, 0x10c, 0x002be2fe); in set_audclk_freq()
231 cx18_av_write4(cx, 0x110, 0x0062a1f2); in set_audclk_freq()
235 cx18_av_write4(cx, 0x8f8, 0x080160cd); in set_audclk_freq()
239 cx18_av_write4(cx, 0x900, 0x08017385); in set_audclk_freq()
240 cx18_av_write4(cx, 0x904, 0x08017385); in set_audclk_freq()
241 cx18_av_write4(cx, 0x90c, 0x08017385); in set_audclk_freq()
244 cx18_av_write(cx, 0x127, 0x64); in set_audclk_freq()
247 cx18_av_write4(cx, 0x12c, 0x112061ff); in set_audclk_freq()
254 cx18_av_write4(cx, 0x128, 0xa01d4bf8); in set_audclk_freq()
262 cx18_av_write4(cx, 0x108, 0x200d040f); in set_audclk_freq()
266 cx18_av_write4(cx, 0x10c, 0x002be2fe); in set_audclk_freq()
270 cx18_av_write4(cx, 0x110, 0x0176740c); in set_audclk_freq()
274 cx18_av_write4(cx, 0x8f8, 0x08018000); in set_audclk_freq()
278 cx18_av_write4(cx, 0x900, 0x08015555); in set_audclk_freq()
279 cx18_av_write4(cx, 0x904, 0x08015555); in set_audclk_freq()
280 cx18_av_write4(cx, 0x90c, 0x08015555); in set_audclk_freq()
283 cx18_av_write(cx, 0x127, 0x60); in set_audclk_freq()
286 cx18_av_write4(cx, 0x12c, 0x11203fff); in set_audclk_freq()
293 cx18_av_write4(cx, 0x128, 0xa01193f8); in set_audclk_freq()
303 void cx18_av_audio_set_path(struct cx18 *cx) in cx18_av_audio_set_path() argument
305 struct cx18_av_state *state = &cx->av_state; in cx18_av_audio_set_path()
309 v = cx18_av_read(cx, 0x803) & ~0x10; in cx18_av_audio_set_path()
310 cx18_av_write_expect(cx, 0x803, v, v, 0x1f); in cx18_av_audio_set_path()
313 v = cx18_av_read(cx, 0x810) | 0x01; in cx18_av_audio_set_path()
314 cx18_av_write_expect(cx, 0x810, v, v, 0x0f); in cx18_av_audio_set_path()
317 cx18_av_write(cx, 0x8d3, 0x1f); in cx18_av_audio_set_path()
321 cx18_av_write4(cx, 0x8d0, 0x01011012); in cx18_av_audio_set_path()
328 cx18_av_write4(cx, 0x8d0, 0x1f063870); in cx18_av_audio_set_path()
331 set_audclk_freq(cx, state->audclk_freq); in cx18_av_audio_set_path()
334 v = cx18_av_read(cx, 0x810) & ~0x01; in cx18_av_audio_set_path()
335 cx18_av_write_expect(cx, 0x810, v, v, 0x0f); in cx18_av_audio_set_path()
340 v = cx18_av_read(cx, 0x803) | 0x10; in cx18_av_audio_set_path()
341 cx18_av_write_expect(cx, 0x803, v, v, 0x1f); in cx18_av_audio_set_path()
345 static int get_volume(struct cx18 *cx) in get_volume() argument
351 int vol = 228 - cx18_av_read(cx, 0x8d4); in get_volume()
356 static void set_volume(struct cx18 *cx, int volume) in set_volume() argument
369 cx18_av_write(cx, 0x8d4, 228 - (vol * 2)); in set_volume()
372 static int get_bass(struct cx18 *cx) in get_bass() argument
377 int bass = cx18_av_read(cx, 0x8d9) & 0x3f; in get_bass()
382 static void set_bass(struct cx18 *cx, int bass) in set_bass() argument
385 cx18_av_and_or(cx, 0x8d9, ~0x3f, 48 - (bass * 48 / 0xffff)); in set_bass()
388 static int get_treble(struct cx18 *cx) in get_treble() argument
393 int treble = cx18_av_read(cx, 0x8db) & 0x3f; in get_treble()
398 static void set_treble(struct cx18 *cx, int treble) in set_treble() argument
401 cx18_av_and_or(cx, 0x8db, ~0x3f, 48 - (treble * 48 / 0xffff)); in set_treble()
404 static int get_balance(struct cx18 *cx) in get_balance() argument
409 int balance = cx18_av_read(cx, 0x8d5) & 0x7f; in get_balance()
411 if ((cx18_av_read(cx, 0x8d5) & 0x80) == 0) in get_balance()
418 static void set_balance(struct cx18 *cx, int balance) in set_balance() argument
423 cx18_av_and_or(cx, 0x8d5, 0x7f, 0x80); in set_balance()
425 cx18_av_and_or(cx, 0x8d5, ~0x7f, bal & 0x7f); in set_balance()
428 cx18_av_and_or(cx, 0x8d5, 0x7f, 0x00); in set_balance()
430 cx18_av_and_or(cx, 0x8d5, ~0x7f, 0x80 - bal); in set_balance()
434 static int get_mute(struct cx18 *cx) in get_mute() argument
437 return cx18_av_read(cx, 0x8d3) & 0x2 ? 1 : 0; in get_mute()
440 static void set_mute(struct cx18 *cx, int mute) in set_mute() argument
442 struct cx18_av_state *state = &cx->av_state; in set_mute()
450 v = cx18_av_read(cx, 0x803); in set_mute()
454 cx18_av_write_expect(cx, 0x803, v, v, 0x1f); in set_mute()
455 cx18_av_write(cx, 0x8d3, 0x1f); in set_mute()
459 cx18_av_write_expect(cx, 0x803, v, v, 0x1f); in set_mute()
463 cx18_av_and_or(cx, 0x8d3, ~0x2, mute ? 0x02 : 0x00); in set_mute()
467 int cx18_av_audio(struct cx18 *cx, unsigned int cmd, void *arg) in cx18_av_audio() argument
469 struct cx18_av_state *state = &cx->av_state; in cx18_av_audio()
478 v = cx18_av_read(cx, 0x803) & ~0x10; in cx18_av_audio()
479 cx18_av_write_expect(cx, 0x803, v, v, 0x1f); in cx18_av_audio()
480 cx18_av_write(cx, 0x8d3, 0x1f); in cx18_av_audio()
482 v = cx18_av_read(cx, 0x810) | 0x1; in cx18_av_audio()
483 cx18_av_write_expect(cx, 0x810, v, v, 0x0f); in cx18_av_audio()
485 retval = set_audclk_freq(cx, *(u32 *)arg); in cx18_av_audio()
487 v = cx18_av_read(cx, 0x810) & ~0x1; in cx18_av_audio()
488 cx18_av_write_expect(cx, 0x810, v, v, 0x0f); in cx18_av_audio()
490 v = cx18_av_read(cx, 0x803) | 0x10; in cx18_av_audio()
491 cx18_av_write_expect(cx, 0x803, v, v, 0x1f); in cx18_av_audio()
499 ctrl->value = get_volume(cx); in cx18_av_audio()
502 ctrl->value = get_bass(cx); in cx18_av_audio()
505 ctrl->value = get_treble(cx); in cx18_av_audio()
508 ctrl->value = get_balance(cx); in cx18_av_audio()
511 ctrl->value = get_mute(cx); in cx18_av_audio()
521 set_volume(cx, ctrl->value); in cx18_av_audio()
524 set_bass(cx, ctrl->value); in cx18_av_audio()
527 set_treble(cx, ctrl->value); in cx18_av_audio()
530 set_balance(cx, ctrl->value); in cx18_av_audio()
533 set_mute(cx, ctrl->value); in cx18_av_audio()