aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tda9887.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tda9887.c')
-rw-r--r--drivers/media/video/tda9887.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c
index a8f773274fe3..aa311e4f1f61 100644
--- a/drivers/media/video/tda9887.c
+++ b/drivers/media/video/tda9887.c
@@ -97,6 +97,8 @@ struct tvnorm {
97#define cAudioIF_6_5 0x03 // bit e0:1 97#define cAudioIF_6_5 0x03 // bit e0:1
98 98
99 99
100#define cVideoIFMask 0x1c // bit e2:4
101/* Video IF selection in TV Mode (bit B3=0) */
100#define cVideoIF_58_75 0x00 // bit e2:4 102#define cVideoIF_58_75 0x00 // bit e2:4
101#define cVideoIF_45_75 0x04 // bit e2:4 103#define cVideoIF_45_75 0x04 // bit e2:4
102#define cVideoIF_38_90 0x08 // bit e2:4 104#define cVideoIF_38_90 0x08 // bit e2:4
@@ -106,6 +108,13 @@ struct tvnorm {
106#define cRadioIF_45_75 0x18 // bit e2:4 108#define cRadioIF_45_75 0x18 // bit e2:4
107#define cRadioIF_38_90 0x1C // bit e2:4 109#define cRadioIF_38_90 0x1C // bit e2:4
108 110
111/* IF1 selection in Radio Mode (bit B3=1) */
112#define cRadioIF_33_30 0x00 // bit e2,4 (also 0x10,0x14)
113#define cRadioIF_41_30 0x04 // bit e2,4
114
115/* Output of AFC pin in radio mode when bit E7=1 */
116#define cRadioAGC_SIF 0x00 // bit e3
117#define cRadioAGC_FM 0x08 // bit e3
109 118
110#define cTunerGainNormal 0x00 // bit e5 119#define cTunerGainNormal 0x00 // bit e5
111#define cTunerGainLow 0x20 // bit e5 120#define cTunerGainLow 0x20 // bit e5
@@ -487,9 +496,13 @@ static int tda9887_set_config(struct tuner *t, char *buf)
487 if (t->tda9887_config & TDA9887_GATING_18) 496 if (t->tda9887_config & TDA9887_GATING_18)
488 buf[3] &= ~cGating_36; 497 buf[3] &= ~cGating_36;
489 498
490 if (t->tda9887_config & TDA9887_GAIN_NORMAL) { 499 if (t->mode == V4L2_TUNER_RADIO) {
491 radio_stereo.e &= ~cTunerGainLow; 500 if (t->tda9887_config & TDA9887_RIF_41_3) {
492 radio_mono.e &= ~cTunerGainLow; 501 buf[3] &= ~cVideoIFMask;
502 buf[3] |= cRadioIF_41_30;
503 }
504 if (t->tda9887_config & TDA9887_GAIN_NORMAL)
505 buf[3] &= ~cTunerGainLow;
493 } 506 }
494 507
495 return 0; 508 return 0;