diff options
author | Mauro Carvalho Chehab <maurochehab@gmail.com> | 2005-06-28 23:45:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-29 00:20:36 -0400 |
commit | 586b0cab2516640fec4dffc3049c4d8bca188f89 (patch) | |
tree | afd2bc01527bfccc3dbaf5c2de7ae52c7f18c2d6 /drivers/media/video/tda8290.c | |
parent | 96b6aba08762f09e5dfa616854cb80ce054a7bf8 (diff) |
[PATCH] v4l: tuner improvements
*tuner-core.c:
- some tuner_info msgs will be generated only if insmod opt
tuner_debug enabled.
- Implemented tuner-core support for VIDIO_S_TUNER to allow
changing mono/stereo mode
- Remove unneeded config options.
- I2C_CLIENT_MULTI option removed.
- support for Philips FMD12ME hybrid tuner
- allow to initialize with another tuner
- Move PHILIPS_FMD initialization code to set_type function,
* tda8290:
- Fix dumb error in tda8290 tunning.
- Radio tuner uses high-precision step instead of 62.5 KHz.
*tea5767.c:
- tuner_info msgs will be generated only if insmod tuner option
tuner_debug enabled.
- some cleanups for better reading.
- Radio tuner uses high-precision step instead of 62.5 KHz.
- Changing radio mode stereo/mono for tea5767 working.
*tuner-simple.c:
- TNF9533-D/IF UHF fixup.
- Radio tuners now uses high-precision step instead of 62.5 KHz.
*mt20xx.c:
- Radio tuner uses high-precision step instead of 62.5 KHz.
*tda9887.c:
- tab and blank spaces corrections.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: Nickolay V Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/tda8290.c')
-rw-r--r-- | drivers/media/video/tda8290.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index b27cc348d95c..f59d4601cc63 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: tda8290.c,v 1.7 2005/03/07 12:01:51 kraxel Exp $ | 2 | * $Id: tda8290.c,v 1.11 2005/06/18 06:09:06 nsh Exp $ |
3 | * | 3 | * |
4 | * i2c tv tuner chip device driver | 4 | * i2c tv tuner chip device driver |
5 | * controls the philips tda8290+75 tuner chip combo. | 5 | * controls the philips tda8290+75 tuner chip combo. |
@@ -69,7 +69,7 @@ static __u8 get_freq_entry( struct freq_entry* table, __u16 freq) | |||
69 | static unsigned char i2c_enable_bridge[2] = { 0x21, 0xC0 }; | 69 | static unsigned char i2c_enable_bridge[2] = { 0x21, 0xC0 }; |
70 | static unsigned char i2c_disable_bridge[2] = { 0x21, 0x80 }; | 70 | static unsigned char i2c_disable_bridge[2] = { 0x21, 0x80 }; |
71 | static unsigned char i2c_init_tda8275[14] = { 0x00, 0x00, 0x00, 0x00, | 71 | static unsigned char i2c_init_tda8275[14] = { 0x00, 0x00, 0x00, 0x00, |
72 | 0x7C, 0x04, 0xA3, 0x3F, | 72 | 0xfC, 0x04, 0xA3, 0x3F, |
73 | 0x2A, 0x04, 0xFF, 0x00, | 73 | 0x2A, 0x04, 0xFF, 0x00, |
74 | 0x00, 0x40 }; | 74 | 0x00, 0x40 }; |
75 | static unsigned char i2c_set_VS[2] = { 0x30, 0x6F }; | 75 | static unsigned char i2c_set_VS[2] = { 0x30, 0x6F }; |
@@ -138,16 +138,24 @@ static int tda8290_tune(struct i2c_client *c) | |||
138 | 138 | ||
139 | static void set_frequency(struct tuner *t, u16 ifc) | 139 | static void set_frequency(struct tuner *t, u16 ifc) |
140 | { | 140 | { |
141 | u32 N = (((t->freq<<3)+ifc)&0x3fffc); | 141 | u32 freq; |
142 | u32 N; | ||
142 | 143 | ||
143 | N = N >> get_freq_entry(div_table, t->freq); | 144 | if (t->mode == V4L2_TUNER_RADIO) |
145 | freq = t->freq / 1000; | ||
146 | else | ||
147 | freq = t->freq; | ||
148 | |||
149 | N = (((freq<<3)+ifc)&0x3fffc); | ||
150 | |||
151 | N = N >> get_freq_entry(div_table, freq); | ||
144 | t->i2c_set_freq[0] = 0; | 152 | t->i2c_set_freq[0] = 0; |
145 | t->i2c_set_freq[1] = (unsigned char)(N>>8); | 153 | t->i2c_set_freq[1] = (unsigned char)(N>>8); |
146 | t->i2c_set_freq[2] = (unsigned char) N; | 154 | t->i2c_set_freq[2] = (unsigned char) N; |
147 | t->i2c_set_freq[3] = 0x40; | 155 | t->i2c_set_freq[3] = 0x40; |
148 | t->i2c_set_freq[4] = 0x52; | 156 | t->i2c_set_freq[4] = 0x52; |
149 | t->i2c_set_freq[5] = get_freq_entry(band_table, t->freq); | 157 | t->i2c_set_freq[5] = get_freq_entry(band_table, freq); |
150 | t->i2c_set_freq[6] = get_freq_entry(agc_table, t->freq); | 158 | t->i2c_set_freq[6] = get_freq_entry(agc_table, freq); |
151 | t->i2c_set_freq[7] = 0x8f; | 159 | t->i2c_set_freq[7] = 0x8f; |
152 | } | 160 | } |
153 | 161 | ||