diff options
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/tda9887.c | 26 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-simple.c | 22 |
2 files changed, 37 insertions, 11 deletions
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c index a6740e025..c944ee24d 100644 --- a/linux/drivers/media/video/tda9887.c +++ b/linux/drivers/media/video/tda9887.c @@ -222,11 +222,22 @@ static struct tvnorm tvnorms[] = { } }; -static struct tvnorm radio = { - .name = "radio", +static struct tvnorm radio_stereo = { + .name = "Radio Stereo", .b = ( cFmRadio | cQSS ), - .c = ( cDeemphasisOFF ), + .c = ( cDeemphasisOFF | + cAudioGain6 ), + .e = ( cAudioIF_5_5 | + cRadioIF_38_90 ), +}; + +static struct tvnorm radio_mono = { + .name = "Radio Mono", + .b = ( cFmRadio | + cQSS ), + .c = ( cDeemphasisON | + cDeemphasis50), .e = ( cAudioIF_5_5 | cRadioIF_38_90 ), }; @@ -363,7 +374,10 @@ static int tda9887_set_tvnorm(struct tda9887 *t, char *buf) int i; if (t->radio) { - norm = &radio; + if (t->radio_mode == V4L2_TUNER_MODE_MONO) + norm = &radio_mono; + else + norm = &radio_stereo; } else { for (i = 0; i < ARRAY_SIZE(tvnorms); i++) { if (tvnorms[i].std & t->std) { @@ -558,10 +572,6 @@ static int tda9887_configure(struct tda9887 *t) buf[1] |= cOutputPort1Inactive; buf[1] |= cOutputPort2Inactive; - if (t->radio && t->radio_mode == V4L2_TUNER_MODE_MONO) { - buf [2] = (cDeemphasisON | cDeemphasis50); - } - if (UNSET != t->pinnacle_id) { tda9887_set_pinnacle(t,buf); } diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c index a43ac3553..e79366b83 100644 --- a/linux/drivers/media/video/tuner-simple.c +++ b/linux/drivers/media/video/tuner-simple.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-simple.c,v 1.20 2005/06/08 01:28:09 mchehab Exp $ + * $Id: tuner-simple.c,v 1.21 2005/06/10 19:53:26 nsh Exp $ * * i2c tv tuner chip device driver * controls all those simple 4-control-bytes style tuners. @@ -247,7 +247,8 @@ static int tuner_getstatus(struct i2c_client *c) #define TUNER_MODE 0x38 #define TUNER_AFC 0x07 -#define TUNER_STEREO 0x04 /* radio mode */ +#define TUNER_STEREO 0x10 /* radio mode */ +#define TUNER_STEREO_MK3 0x04 /* radio mode */ #define TUNER_SIGNAL 0x07 /* radio mode */ static int tuner_signal(struct i2c_client *c) @@ -257,7 +258,22 @@ static int tuner_signal(struct i2c_client *c) static int tuner_stereo(struct i2c_client *c) { - return ((tuner_getstatus (c) & TUNER_SIGNAL) == TUNER_STEREO); + int stereo, status; + struct tuner *t = i2c_get_clientdata(c); + + status = tuner_getstatus (c); + + switch (t->type) { + case TUNER_PHILIPS_FM1216ME_MK3: + case TUNER_PHILIPS_FM1236_MK3: + case TUNER_PHILIPS_FM1256_IH3: + stereo = ((status & TUNER_SIGNAL) == TUNER_STEREO_MK3); + break; + default: + stereo = status & TUNER_STEREO; + } + + return stereo; } #if 0 /* unused */ |