diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-07-12 16:58:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-12 19:01:06 -0400 |
commit | f7ce3cc67052de63a29bad90110640b687d12058 (patch) | |
tree | f3978eb08434d0e87b2467949bd22513c3535416 /drivers/media/video/tda8290.c | |
parent | ebe4c6fa535b0410e58e9c8352320896d07e2efb (diff) |
[PATCH] v4l: I2C Tuner
- Fixed a trouble on tuner-core that generates erros on computers with more
than one TV card.
- Rename tuner structures fields.
- Tail spaces removed.
- I2C cleanups and converged to a basic reference structure.
- Removed unused structures.
- Fix setting frequency on tda8290.
- Added code for TEA5767 autodetection.
- Standby mode support implemented. It is used to disable
a non used tuner. Currenlty implemented on tea5767.
- New macro: set_type disables other tuner when changing mode.
- Some cleanups.
- Use 50 kHz step when tunning radio for most tuners to improve precision.
Signed-off-by: Fabien Perrot <perrot1983@yahoo.fr>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-By: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
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 | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index f59d4601cc63..a8b6a8df5109 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.11 2005/06/18 06:09:06 nsh Exp $ | 2 | * $Id: tda8290.c,v 1.15 2005/07/08 20:21:33 mchehab 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. |
@@ -136,15 +136,12 @@ static int tda8290_tune(struct i2c_client *c) | |||
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
138 | 138 | ||
139 | static void set_frequency(struct tuner *t, u16 ifc) | 139 | static void set_frequency(struct tuner *t, u16 ifc, unsigned int freq) |
140 | { | 140 | { |
141 | u32 freq; | ||
142 | u32 N; | 141 | u32 N; |
143 | 142 | ||
144 | if (t->mode == V4L2_TUNER_RADIO) | 143 | if (t->mode == V4L2_TUNER_RADIO) |
145 | freq = t->freq / 1000; | 144 | freq = freq / 1000; |
146 | else | ||
147 | freq = t->freq; | ||
148 | 145 | ||
149 | N = (((freq<<3)+ifc)&0x3fffc); | 146 | N = (((freq<<3)+ifc)&0x3fffc); |
150 | 147 | ||
@@ -187,14 +184,14 @@ static void set_tv_freq(struct i2c_client *c, unsigned int freq) | |||
187 | struct tuner *t = i2c_get_clientdata(c); | 184 | struct tuner *t = i2c_get_clientdata(c); |
188 | 185 | ||
189 | set_audio(t); | 186 | set_audio(t); |
190 | set_frequency(t, 864); | 187 | set_frequency(t, 864, freq); |
191 | tda8290_tune(c); | 188 | tda8290_tune(c); |
192 | } | 189 | } |
193 | 190 | ||
194 | static void set_radio_freq(struct i2c_client *c, unsigned int freq) | 191 | static void set_radio_freq(struct i2c_client *c, unsigned int freq) |
195 | { | 192 | { |
196 | struct tuner *t = i2c_get_clientdata(c); | 193 | struct tuner *t = i2c_get_clientdata(c); |
197 | set_frequency(t, 704); | 194 | set_frequency(t, 704, freq); |
198 | tda8290_tune(c); | 195 | tda8290_tune(c); |
199 | } | 196 | } |
200 | 197 | ||