Author Topic: 2 tuner trouble  (Read 1016 times)

RayBe

  • Guru
  • ****
  • Posts: 271
    • View Profile
2 tuner trouble
« on: May 10, 2011, 09:14:16 am »
Hi,

because MythTv is reconfiguring my /dev/video# (when rebooting and sometimes when running) and sometimes 'forgets' my default video-source i am making udev rules for both my 2 tv-tuners and for my usb-webcam.
i succeeded in doing so for the webcam.

i made 2 udev rules for my analog tv-tuners and they show up in the /dev/ but when i point mythtv to them i get no picture.

my udev rules:
for my pvr150 i added the rule: "10-tv-tuner-pvr150.rules" with the line:
Code: [Select]
KERNEL=="video[0-9]*", ATTR{name}=="ivtv0*", SYMLINK+="pvr150"
for my Asus saa7134 i added the rule: "11-tv-tuner-asustv.rules" with the line:
Code: [Select]
KERNEL=="video[0-9]*", ATTR{name}=="saa7134*", SYMLINK+="asustv"
does anybody have a clue why i get no picture using these symlinks?

thanks up front,
br,
Raymond
When you were born, you were crying and everybody else was laughing.
Live your life so when you die, you are laughing and everybody else is crying.

uplink

  • Administrator
  • Guru
  • *****
  • Posts: 191
  • Linux and LinuxMCE witchdoctor
    • View Profile
Re: 2 tuner trouble
« Reply #1 on: July 27, 2011, 01:25:28 pm »
Do the symlinks point to the same devices you'd give MythTV? If yes, does MythTV work when you give it the device names directly but doesn't work when you give it the symlinks? If the second case is true, it is very odd behaviour of symlinks.

RayBe

  • Guru
  • ****
  • Posts: 271
    • View Profile
Re: 2 tuner trouble
« Reply #2 on: July 27, 2011, 04:46:08 pm »
Hi Uplink,
Thanks for helping,

Not entirely shure what you mean but this is what happens:
For the hauppage pvr150,
when i set mythtv to /dev/video1 i get a picture and everything seems to be ok but,
when i set mythtv to /dev/pvr150 it doesn't seem to work.

br,
Raymond
When you were born, you were crying and everybody else was laughing.
Live your life so when you die, you are laughing and everybody else is crying.

uplink

  • Administrator
  • Guru
  • *****
  • Posts: 191
  • Linux and LinuxMCE witchdoctor
    • View Profile
Re: 2 tuner trouble
« Reply #3 on: July 27, 2011, 05:25:39 pm »
Hi Uplink,
Thanks for helping,

Not entirely shure what you mean but this is what happens:
For the hauppage pvr150,
when i set mythtv to /dev/video1 i get a picture and everything seems to be ok but,
when i set mythtv to /dev/pvr150 it doesn't seem to work.

br,
Raymond

What I mean is: can you confirm /dev/pvr150 actually exists and is a symlink to /dev/video1?

Code: [Select]
ls -l /dev/pvr150
this should do it

RayBe

  • Guru
  • ****
  • Posts: 271
    • View Profile
Re: 2 tuner trouble
« Reply #4 on: July 28, 2011, 02:22:35 am »
Uplink this is what i get:
Code: [Select]
lrwxrwxrwx 1 root root 7 2011-07-21 15:04 /dev/pvr150 -> video25
br,
Raymond
When you were born, you were crying and everybody else was laughing.
Live your life so when you die, you are laughing and everybody else is crying.

uplink

  • Administrator
  • Guru
  • *****
  • Posts: 191
  • Linux and LinuxMCE witchdoctor
    • View Profile
Re: 2 tuner trouble
« Reply #5 on: July 28, 2011, 02:11:02 pm »
Uplink this is what i get:
Code: [Select]
lrwxrwxrwx 1 root root 7 2011-07-21 15:04 /dev/pvr150 -> video25
br,
Raymond
So it points to the wrong device. The pvr150 driver exposes three devices. Myth can only use the first one. You probably need to dig some more to see how to tell udev to make the symlink to the first device. I have a non-udev scripted solution somewhere in a long forgotten place (translation: I may not be able to find it) that updates MythTV settings at boot time base on concepts similar to the USB serial ports in LinuxMCE. I can't promise I'll find it, let alone help integrate it - time constraints and all.

RayBe

  • Guru
  • ****
  • Posts: 271
    • View Profile
Re: 2 tuner trouble
« Reply #6 on: July 28, 2011, 03:20:49 pm »
Hi Uplink,

Yes indeed the pvr150 exposes 3 devices, i thought Mythtv wasn't seeing this right (and already i have learned :) )
By digging in deeper what exactly do you mean, what steps can i make?
thanks a lot,

Br,
Raymond
When you were born, you were crying and everybody else was laughing.
Live your life so when you die, you are laughing and everybody else is crying.

uplink

  • Administrator
  • Guru
  • *****
  • Posts: 191
  • Linux and LinuxMCE witchdoctor
    • View Profile
Re: 2 tuner trouble
« Reply #7 on: July 28, 2011, 04:01:21 pm »
Hi Uplink,

Yes indeed the pvr150 exposes 3 devices, i thought Mythtv wasn't seeing this right (and already i have learned :) )
By digging in deeper what exactly do you mean, what steps can i make?
thanks a lot,

Br,
Raymond

Going down the udev route, you'll have to see if there are more parameters you can use to select the device for the symlink. Right now your rule matches all three devices, and it's the last one that gets the symlink. With a bit of luck, there's something that differentiates these three devices and udev use that information. I vaguely remember something called like "kernel parameters" (or something with "parameters" in its name) which would be different for each device and you can use it to narrow down the selection so the symlink points to the right device.