Nicolay,
Nickolay V. Shmyrev wrote:
>Hi Mauro
>
>I am looking at patch you've comitted, actually it looks strange. We
>have highly customizable tuner code that allows handling of different
>tuner types. What was the reason of introducing changes in this code
>and changes that are only oriented to one card type. Moreover, in such
>changes have new config value. I believe there is better way for doing
>things.
>
>
Thanks for your help, but may be there are some aspects that you
didn't notice.
There's a hack on tuner-core.c code that doesn't allow to have more
than one I2C device plugged on the I2C bus. The original code was:
static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
{
struct tuner *t;
if (this_adap > 0)
return -1;
this_adap++;
.....
There are some cards that have two I2C tuners on the bus. One for TV
and another for radio. That's the case, for example, of most of
PixelView (all?) cards (BTxxx and CX88xx) and TV@nywhere Master
(according with a post on this list, it uses a TEA5767 chip for Radio on
0xC0 and TV on 0XC2). For these cards, until this patch, you have to
choose if you want TV (I2C 0x61) or Radio (I2C 0x60), by adding the
address option when modprobing the tuner.
On the other hand, by eliminating this hack, every call to
i2c_clients_command goes to every I2C device. What the patch on
tuner-core does is to eliminate this hack, providing a way to support
multiple I2C devices on tuner bus, without requiring to change tuner
clients. If the board have only one I2C device, it work with the same
behavor. If not, the CHECK_ADDR and CHECK_MODE macros will send the
command only to the right tuner device. It is generic and only adds a
missing feature on the tuner-core.c.
Please note that my first hack to TVF5533MF allow only to tune the
device, by hacking the I2C address before sending the command to
cx88-i2c but doesn't provide correct support (and it is not possible
without having to hack tuner-core.c or without the two I2C mapped on
tuner-core). It doesn't allow, for example, to get any status from the
tune.
Another option was to duplicate tuner-core.c (tuner-core-multi.c,
for example), with very same code, but with multiple I2C chips. Bad Idea
to maintain two such similar codes.
The last option to avoid all this code is to change
i2c_clients_command for a call that calls only one device, then changing
every code that calls tuner_command function. It will require lot of
work and could produce instable versions until the rest of the code
gets fixed. Also, I couldn't find a kernel call for that.
Finally, I believe that, after this patch, lots of cards with the
same trouble may finally have Radio Tuner working as well.
--
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
[Home]
[Older V4L]
[Linux DVB]
[Video Disk Recorder]
[Video Technology]
[Asterisk]
[Photo]
[DCCP]
[Netdev]
[Plasma TVs]
[Video Projectors]
[PDAs]
[Xorg]
[Util Linux NG]
[Xfree86]
[Devices]
[Big List of Linux Books]
[Free Photo Albums]
[LCD TVs]
[Fedora Users]
[Webcams]
[Fedora Women]
[HDTV]
[ALSA Users]
[ALSA Devel]
[Stuff]
[SSH]
[Linux USB]