aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
ModeNameSize
-rw-r--r--Kconfig1100logstatsplainblame
-rw-r--r--Makefile533logstatsplainblame
d---------atmel369logstatsplain
d---------au1x256logstatsplain
d---------blackfin861logstatsplain
d---------codecs4367logstatsplain
d---------davinci406logstatsplain
d---------fsl665logstatsplain
d---------imx273logstatsplain
d---------omap680logstatsplain
d---------pxa918logstatsplain
d---------s3c24xx1209logstatsplain
d---------s6000268logstatsplain
d---------sh473logstatsplain
-rw-r--r--soc-cache.c9817logstatsplainblame
-rw-r--r--soc-core.c69456logstatsplainblame
-rw-r--r--soc-dapm.c56711logstatsplainblame
-rw-r--r--soc-jack.c6701logstatsplainblame
-rw-r--r--soc-utils.c1857logstatsplainblame
d---------txx9236logstatsplain
-09 00:37:48 -0500 committer Linus Torvalds <torvalds@g5.osdl.org> 2005-11-09 10:56:21 -0500 [PATCH] v4l: 806: add support for tda8275a' href='/cgit/cgit.cgi/litmus-rt.git/commit/drivers/media/video/tda8290.c?h=wip-kshark&id=de48eebce8b63dbae7272ee80f4fe0eaddb61278'>de48eebce8b6
1da177e4c3f4

de48eebce8b6


























1da177e4c3f4

58ef4f924cf2


















cfeb88398f00
58ef4f924cf2
cfeb88398f00


58ef4f924cf2





cfeb88398f00

58ef4f924cf2



de48eebce8b6

58ef4f924cf2
de48eebce8b6


b208319993ce

58ef4f924cf2


1da177e4c3f4
de48eebce8b6

1da177e4c3f4
de48eebce8b6















9a741ec9b87a
de48eebce8b6
58ef4f924cf2
de48eebce8b6

58ef4f924cf2


de48eebce8b6
58ef4f924cf2



b208319993ce
58ef4f924cf2
de48eebce8b6

58ef4f924cf2

de48eebce8b6
de48eebce8b6

58ef4f924cf2

de48eebce8b6

58ef4f924cf2










de48eebce8b6

58ef4f924cf2


de48eebce8b6

58ef4f924cf2

de48eebce8b6

58ef4f924cf2

de48eebce8b6
793cf9e6a54c
58ef4f924cf2
b208319993ce
de48eebce8b6



1da177e4c3f4

b208319993ce
de48eebce8b6
b208319993ce
de48eebce8b6


1da177e4c3f4
de48eebce8b6
1da177e4c3f4
de48eebce8b6


0157a9cc727d
de48eebce8b6









1da177e4c3f4

de48eebce8b6


1da177e4c3f4
de48eebce8b6
b208319993ce
de48eebce8b6
b208319993ce
de48eebce8b6
0157a9cc727d
de48eebce8b6














9a741ec9b87a
58ef4f924cf2
de48eebce8b6
58ef4f924cf2
de48eebce8b6
0157a9cc727d
de48eebce8b6


b208319993ce
de48eebce8b6


b208319993ce
de48eebce8b6





b208319993ce
de48eebce8b6


58ef4f924cf2














de48eebce8b6
4ac95af9a0bd


de48eebce8b6






4ac95af9a0bd

b208319993ce
de48eebce8b6















1da177e4c3f4
de48eebce8b6
b208319993ce
de48eebce8b6




4ac95af9a0bd
de48eebce8b6




586b0cab2516
de48eebce8b6


1da177e4c3f4

de48eebce8b6

1da177e4c3f4

b208319993ce
4ac95af9a0bd
1da177e4c3f4
b208319993ce
70b6934a6c6b
b208319993ce


4ac95af9a0bd
70b6934a6c6b
b208319993ce

4ac95af9a0bd
70b6934a6c6b
b208319993ce

4ac95af9a0bd
70b6934a6c6b
b208319993ce

4ac95af9a0bd
70b6934a6c6b
b208319993ce

4ac95af9a0bd
70b6934a6c6b
b208319993ce

4ac95af9a0bd
70146cfc84dc
b208319993ce

70146cfc84dc
e65ec752ced1
b208319993ce

e65ec752ced1
70b6934a6c6b
e65ec752ced1
1da177e4c3f4




b208319993ce
1da177e4c3f4

b208319993ce
1da177e4c3f4



de48eebce8b6

1da177e4c3f4











de48eebce8b6

793cf9e6a54c

de48eebce8b6
b208319993ce
de48eebce8b6

0157a9cc727d
b208319993ce
de48eebce8b6

b208319993ce
de48eebce8b6


0157a9cc727d
de48eebce8b6
793cf9e6a54c

de48eebce8b6


58ef4f924cf2
de48eebce8b6
58ef4f924cf2
de48eebce8b6

58ef4f924cf2



de48eebce8b6
de48eebce8b6


1da177e4c3f4

b208319993ce
de48eebce8b6
9a741ec9b87a
de48eebce8b6
9a741ec9b87a
b208319993ce
c2f6f9d866d3
b208319993ce
de48eebce8b6







1da177e4c3f4
024cf53089f7







7fd8b263678a







de48eebce8b6

b208319993ce
de48eebce8b6





b208319993ce




de48eebce8b6



























95736034df75
01cb9633e1b2
de48eebce8b6



b208319993ce
de48eebce8b6







b208319993ce
de48eebce8b6

b208319993ce
de48eebce8b6
0157a9cc727d
de48eebce8b6
7fd8b263678a

b208319993ce
e65ec752ced1
1da177e4c3f4
de48eebce8b6

1da177e4c3f4


95736034df75

44fd06fa9002



95736034df75















44fd06fa9002
95736034df75


1da177e4c3f4






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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
  


















                                                                       


                           
                         


                                                                            









                                                                            







                     

  































                                                                                                     

  






                                                                          

                                                                      
 
















                                                    
                                                         
                                                                                        
                                                                              


































                                                                
 
                       
                       







                                              
 
                                                
                                            
                                            
                                                                      

                                                    



                                                                            






                      

  


























                                                                                                

  


















                                                                                           
                                
                    


                                                                         





                                                  

                                                                          



                      

                                                                           
                                    


                                                

                                                                                        


                                 
 

                                        
 















                                                                                       
                                               
                                                            
                            

                            


                                          
 



                            
                                                         
                    

                                          

                            
                    

                                          

                                                     

                                          










                                                      

                                          


                                                            

                                          

                            

                                          

                            
                                          
 
                            
                                                         



                                               

                                                
                                            
                                            
                                                                      


                                                    
 
                                                                         
 


                                                               
                                                  









                                              

 


                                                                         
 
                                                
                                            
                                                     
                                                                        
                                                     
                                                     














                                                     
                               
              
 
                                                            
                                         
                                          


                                          
                                                        


                                           
                                           





                                                  
                                   


                                            














                                                                            
                                        


                                                                                   






                                                             

                                                                             
                                                   















                                                                                      
 
                             
                                            




                                                           
                                                                          




                                                           
 


                                          

 

                                                                         

                                      
                                            
                   
 
                                
                                   


                                               
                            
                                         

                                               
                           
                                          

                                               
                            
                                             

                                               
                           
                                          

                                               
                            
                                               

                                               
                           
                                                

                                               
                            
                

                                               
                            
         
                                                          




                                                                
                                            

                     
                                          



                                                                   

                                     











                                                                 

                                                                         

                                         
                                                
                                            

                                                         
                                                         
                                                                                        

                                 
                                   


                                          
                                               
                                               

 


                                                 
                                                
                                                
                                                     

                                                     



                                                   
                                      


                                                    

                                                
                                            
                                                                                   
                                                                                     
                                                                                   
                                                                                     
                                                                   
                                                            
                                   







                                                                         
 







                                                 







                                                    

                                      
                                         





                                                                     




                                                                



























                                                                           
                                                                                           
                                          



                                                                          
                                         







                                                                
                                      

                                                                 
                                      
         
                                                
 

                                                                             
                                
                                       
 

                              


                 

                                       



                                                            















                                                     
                                            


                  






                                                                              
/*

   i2c tv tuner chip device driver
   controls the philips tda8290+75 tuner chip combo.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include <linux/i2c.h>
#include <linux/videodev.h>
#include <linux/delay.h>
#include "tuner-driver.h"

/* ---------------------------------------------------------------------- */

struct tda8290_priv {
	unsigned char tda8290_easy_mode;
	unsigned char tda827x_lpsel;
	unsigned char tda827x_addr;
	unsigned char tda827x_ver;
	unsigned int sgIF;
};

/* ---------------------------------------------------------------------- */

struct tda827x_data {
	u32 lomax;
	u8  spd;
	u8  bs;
	u8  bp;
	u8  cp;
	u8  gc3;
	u8 div1p5;
};

     /* Note lomax entry is lo / 62500 */

static struct tda827x_data tda827x_analog[] = {
	{ .lomax =   992, .spd = 3, .bs = 2, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 1}, /*  62 MHz */
	{ .lomax =  1056, .spd = 3, .bs = 3, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 1}, /*  66 MHz */
	{ .lomax =  1216, .spd = 3, .bs = 1, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 0}, /*  76 MHz */
	{ .lomax =  1344, .spd = 3, .bs = 2, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 0}, /*  84 MHz */
	{ .lomax =  1488, .spd = 3, .bs = 2, .bp = 0, .cp = 0, .gc3 = 1, .div1p5 = 0}, /*  93 MHz */
	{ .lomax =  1568, .spd = 3, .bs = 3, .bp = 0, .cp = 0, .gc3 = 1, .div1p5 = 0}, /*  98 MHz */
	{ .lomax =  1744, .spd = 3, .bs = 3, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 0}, /* 109 MHz */
	{ .lomax =  1968, .spd = 2, .bs = 2, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 1}, /* 123 MHz */
	{ .lomax =  2128, .spd = 2, .bs = 3, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 1}, /* 133 MHz */
	{ .lomax =  2416, .spd = 2, .bs = 1, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 0}, /* 151 MHz */
	{ .lomax =  2464, .spd = 2, .bs = 2, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 0}, /* 154 MHz */
	{ .lomax =  2896, .spd = 2, .bs = 2, .bp = 1, .cp = 0, .gc3 = 0, .div1p5 = 0}, /* 181 MHz */
	{ .lomax =  2960, .spd = 2, .bs = 2, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, /* 185 MHz */
	{ .lomax =  3472, .spd = 2, .bs = 3, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, /* 217 MHz */
	{ .lomax =  3904, .spd = 1, .bs = 2, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 1}, /* 244 MHz */
	{ .lomax =  4240, .spd = 1, .bs = 3, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 1}, /* 265 MHz */
	{ .lomax =  4832, .spd = 1, .bs = 1, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, /* 302 MHz */
	{ .lomax =  5184, .spd = 1, .bs = 2, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, /* 324 MHz */
	{ .lomax =  5920, .spd = 1, .bs = 2, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 0}, /* 370 MHz */
	{ .lomax =  7264, .spd = 1, .bs = 3, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 0}, /* 454 MHz */
	{ .lomax =  7888, .spd = 0, .bs = 2, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 1}, /* 493 MHz */
	{ .lomax =  8480, .spd = 0, .bs = 3, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 1}, /* 530 MHz */
	{ .lomax =  8864, .spd = 0, .bs = 1, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 0}, /* 554 MHz */
	{ .lomax =  9664, .spd = 0, .bs = 1, .bp = 4, .cp = 0, .gc3 = 0, .div1p5 = 0}, /* 604 MHz */
	{ .lomax = 11088, .spd = 0, .bs = 2, .bp = 4, .cp = 0, .gc3 = 0, .div1p5 = 0}, /* 696 MHz */
	{ .lomax = 11840, .spd = 0, .bs = 2, .bp = 4, .cp = 1, .gc3 = 0, .div1p5 = 0}, /* 740 MHz */
	{ .lomax = 13120, .spd = 0, .bs = 3, .bp = 4, .cp = 0, .gc3 = 0, .div1p5 = 0}, /* 820 MHz */
	{ .lomax = 13840, .spd = 0, .bs = 3, .bp = 4, .cp = 1, .gc3 = 0, .div1p5 = 0}, /* 865 MHz */
	{ .lomax =     0, .spd = 0, .bs = 0, .bp = 0, .cp = 0, .gc3 = 0, .div1p5 = 0}  /* End      */
};

static void tda827x_tune(struct i2c_client *c, u16 ifc, unsigned int freq)
{
	unsigned char tuner_reg[8];
	unsigned char reg2[2];
	u32 N;
	int i;
	struct tuner *t = i2c_get_clientdata(c);
	struct tda8290_priv *priv = t->priv;
	struct i2c_msg msg = {.addr = priv->tda827x_addr, .flags = 0};

	if (t->mode == V4L2_TUNER_RADIO)
		freq = freq / 1000;

	N = freq + ifc;
	i = 0;
	while (tda827x_analog[i].lomax < N) {
		if(tda827x_analog[i + 1].lomax == 0)
			break;
		i++;
	}

	N = N << tda827x_analog[i].spd;

	tuner_reg[0] = 0;
	tuner_reg[1] = (unsigned char)(N>>8);
	tuner_reg[2] = (unsigned char) N;
	tuner_reg[3] = 0x40;
	tuner_reg[4] = 0x52 + (priv->tda827x_lpsel << 5);
	tuner_reg[5] = (tda827x_analog[i].spd   << 6) + (tda827x_analog[i].div1p5 <<5) +
		       (tda827x_analog[i].bs     <<3) +  tda827x_analog[i].bp;
	tuner_reg[6] = 0x8f + (tda827x_analog[i].gc3 << 4);
	tuner_reg[7] = 0x8f;

	msg.buf = tuner_reg;
	msg.len = 8;
	i2c_transfer(c->adapter, &msg, 1);

	msg.buf= reg2;
	msg.len = 2;
	reg2[0] = 0x80;
	reg2[1] = 0;
	i2c_transfer(c->adapter, &msg, 1);

	reg2[0] = 0x60;
	reg2[1] = 0xbf;
	i2c_transfer(c->adapter, &msg, 1);

	reg2[0] = 0x30;
	reg2[1] = tuner_reg[4] + 0x80;
	i2c_transfer(c->adapter, &msg, 1);

	msleep(1);
	reg2[0] = 0x30;
	reg2[1] = tuner_reg[4] + 4;
	i2c_transfer(c->adapter, &msg, 1);

	msleep(1);
	reg2[0] = 0x30;
	reg2[1] = tuner_reg[4];
	i2c_transfer(c->adapter, &msg, 1);

	msleep(550);
	reg2[0] = 0x30;
	reg2[1] = (tuner_reg[4] & 0xfc) + tda827x_analog[i].cp ;