[mythtv-users] Multiple PVR-250 cards each with different tuner
types
Randy Rossi
randy.rossi at gmail.com
Thu Nov 11 17:53:02 UTC 2004
(BTW: Is there an easier way to use multiple cards with different
tuner types? I would appreciate if anyone has a better solution than
this hack described below)
I purchased a PVR-250 from Staples. I have been using it successfully
with mythtv for months. I liked it so much I purchased two more of
the same model from Future Shop. After plugging in the two new cards,
the ivtv driver detected them but any attempts to watch TV on the new
tuners ended up in a display of snow.
After some digging, I found out that even though the cards are the
same model, they actually use different tuners. The first one I
bought required a tuner type setting of 2 and the two others need a
setting of 39. The problem is that when I modprobe ivtv, it
initializes all 3 cards with the same tuner type at once! When I load
the tuner module with tuner=39, two out of three cards worked but the
other failed. When I loaded with tuner=2, the one worked but the
other two failed. I didn't see any way of telling the tuner or ivtv
modules to give each tuner card a different tuner type setting so I
finally hacked the tuner.c module to accomodate my particular setup.
Here is how I did it if anyone is having the same problem.
I am using kernel source 2.4.26
The kernel source file to hack is: /usr/src/linux/drivers/media/video/tuner.c
Depending on the version of your kernel, you will either see a
set_tuner function or a tuner_command function. At the top of this
function add this line:
static unsigned int counter = 0;
Then, depending on your tuner.c version, replace the line that says
t->type = tuner;
or
t->type = *iarg;
with this block of code (change the numbers to match your setup):
if (counter == 0) {
t->type = 39;
} else if (counter == 1) {
t->type = 2;
} else if (counter == 2) {
t->type = 39;
}
counter++;
if (counter > 2) { counter = 0; }
I know this is the dirtiest of hacks but it gets the right numbers
into the card as the ivtv driver cycles through to initialize them.
If anyone solved this problem without hacking the kernel, I'd like to
know.
(BTW: The tuner.c source mentions something about the tuner option
going away so this hack may not work for other kernel versions)
Randy
More information about the mythtv-users
mailing list