diff options
author | Nickolay V. Shmyrev <devnull@localhost> | 2005-06-10 19:53:26 +0000 |
---|---|---|
committer | Nickolay V. Shmyrev <devnull@localhost> | 2005-06-10 19:53:26 +0000 |
commit | 6bfafe7457958e5204d16694c429472c39fa9d15 (patch) | |
tree | 185133d4013f5b9af28f82fb54e513dacbc8d990 /linux/drivers/media/video/tuner-simple.c | |
parent | d2842f6dd9787dd3369728db1caba2487330ef7d (diff) | |
download | mediapointer-dvb-s2-6bfafe7457958e5204d16694c429472c39fa9d15.tar.gz mediapointer-dvb-s2-6bfafe7457958e5204d16694c429472c39fa9d15.tar.bz2 |
Use audio gain for stereo radio. Correctly check stereo for different
tuner types.
Diffstat (limited to 'linux/drivers/media/video/tuner-simple.c')
-rw-r--r-- | linux/drivers/media/video/tuner-simple.c | 22 |
1 files changed, 19 insertions, 3 deletions
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 */ |