diff options
author | Gerd Knorr <devnull@localhost> | 2004-06-30 14:13:20 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-06-30 14:13:20 +0000 |
commit | 8c71d17e53e261338327fc6892cd0456c19deaa1 (patch) | |
tree | ba487b6c8b6a9e8596835cbda3407b431393c192 /linux/drivers/media | |
parent | e4c22f20c8c6f19fae05ca8c616706964ef8ae1d (diff) | |
download | mediapointer-dvb-s2-8c71d17e53e261338327fc6892cd0456c19deaa1.tar.gz mediapointer-dvb-s2-8c71d17e53e261338327fc6892cd0456c19deaa1.tar.bz2 |
- tda9887: radio afc support by Robert DeLuca.
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/tda9887.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c index cc53fe001..7fbf7c8ff 100644 --- a/linux/drivers/media/video/tda9887.c +++ b/linux/drivers/media/video/tda9887.c @@ -662,6 +662,24 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg) } tda9887_configure(t); } + case VIDIOC_G_TUNER: + { + static int AFC_BITS_2_kHz[] = { + -12500, -37500, -62500, -97500, + -112500, -137500, -162500, -187500, + 187500, 162500, 137500, 112500, + 97500 , 62500, 37500 , 12500 + }; + struct v4l2_tuner* tuner = arg; + + if (t->radio) { + __u8 reg = 0; + tuner->afc=0; + if (1 == i2c_master_recv(&t->client,®,1)) + tuner->afc = AFC_BITS_2_kHz[(reg>>1)&0x0f]; + } + break; + } default: /* nothing */ break; |