Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Udev rules (again)

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


joshoekstra at gmx

Jun 28, 2009, 12:40 PM

Post #1 of 5 (460 views)
Permalink
Udev rules (again)

Hey,

Adding another camera to my backend has forced to use udev-rules to
force the camra's not to take the video-device my PVR normally uses.
I thought it would be as easy as just writing a rule for the cameras,
but it turns out I need to for my PVR as well.

For this I used the following in /etc/udev/rules./10-local.rules:

KERNEL=="video[0-9]*", SUBSYSTEMS=="pci", DRIVERS=="ivtv",
ID=="0000:02:08.0" NAME="video0"
KERNEL=="video[0-9]*", SUBSYSTEMS=="pci", DRIVERS=="ivtv",
ID=="0000:02:09.0" NAME="video1"
KERNEL=="video[0-9]*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d",
ATTRS{idProduct}=="08f0", NAME="video5"
KERNEL=="video[0-9]*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="093a",
ATTRS{idProduct}=="2468", NAME="video6"

This seems to work as well as the videodevices get the right numbers,
the problem is however that recordings made are 'empty' ie just no image
and filesize > 0.

I got the feeling my rules are missing some parts causing them not to
work, but even with the several howto's I can't find it and examples
with a PVR and with NAME="video_n_" seem to benon-existent.

any pointers or examples appreciated,

Jos Hoekstra

_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


lists at the-pearsons

Jun 28, 2009, 9:51 PM

Post #2 of 5 (422 views)
Permalink
Re: Udev rules (again) [In reply to]

Jos Hoekstra wrote:
> Hey,
>
> Adding another camera to my backend has forced to use udev-rules to
> force the camra's not to take the video-device my PVR normally uses.
> I thought it would be as easy as just writing a rule for the cameras,
> but it turns out I need to for my PVR as well.
>
> For this I used the following in /etc/udev/rules./10-local.rules:
>
> KERNEL=="video[0-9]*", SUBSYSTEMS=="pci", DRIVERS=="ivtv",
> ID=="0000:02:08.0" NAME="video0"
> KERNEL=="video[0-9]*", SUBSYSTEMS=="pci", DRIVERS=="ivtv",
> ID=="0000:02:09.0" NAME="video1"
> KERNEL=="video[0-9]*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d",
> ATTRS{idProduct}=="08f0", NAME="video5"
> KERNEL=="video[0-9]*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="093a",
> ATTRS{idProduct}=="2468", NAME="video6"
>
> This seems to work as well as the videodevices get the right numbers,
> the problem is however that recordings made are 'empty' ie just no
> image and filesize > 0.
>
> I got the feeling my rules are missing some parts causing them not to
> work, but even with the several howto's I can't find it and examples
> with a PVR and with NAME="video_n_" seem to benon-existent.
>
> any pointers or examples appreciated,
>
> Jos Hoekstra
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users[at]mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
This is the contect of my custom rules to allow me to fix the device
names of my PVR250 and a BT878 device (which I don't use in myth):

KERNEL=="video[0-9]", SYSFS{name}=="BT878*", SYMLINK+="BT878"
KERNEL=="video[0-9]", SYSFS{name}=="ivtv*", SYMLINK+="PVR250"

then in mythtv-setup I specify /dev/PVR250 in the devoce name instead of
/dev/video0

Regards,
Dave.
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


drescherjm at gmail

Jun 28, 2009, 10:03 PM

Post #3 of 5 (423 views)
Permalink
Re: Udev rules (again) [In reply to]

On Sun, Jun 28, 2009 at 3:40 PM, Jos Hoekstra<joshoekstra[at]gmx.net> wrote:
> Hey,
>
> Adding another camera to my backend has forced to use udev-rules to force
> the camra's not to take the video-device my PVR normally uses.
> I thought it would be as easy as just writing a rule for the cameras, but it
> turns out I need to for my PVR as well.
>
> For this I used the following in /etc/udev/rules./10-local.rules:
>
> KERNEL=="video[0-9]*", SUBSYSTEMS=="pci", DRIVERS=="ivtv",
> ID=="0000:02:08.0" NAME="video0"
> KERNEL=="video[0-9]*", SUBSYSTEMS=="pci", DRIVERS=="ivtv",
> ID=="0000:02:09.0" NAME="video1"
> KERNEL=="video[0-9]*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d",
> ATTRS{idProduct}=="08f0", NAME="video5"
> KERNEL=="video[0-9]*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="093a",
> ATTRS{idProduct}=="2468", NAME="video6"
>
> This seems to work as well as the videodevices get the right numbers, the
> problem is however that recordings made are 'empty' ie just no image and
> filesize > 0.
>
> I got the feeling my rules are missing some parts causing them not to work,
> but even with the several howto's I can't find it and examples with a PVR
> and with NAME="video_n_" seem to benon-existent.
>

Here is what I have for my pvr500.

jmd0 ~ # cat /etc/udev/rules.d/60-ivtv.rules
#DRIVER=="ivtv",KERNELS=="0000:02:08.0", SYMLINK+="pvr_150"

ATTR{name}=="ivtv0 encoder MPG", SYMLINK+="pvr_150"
KERNEL=="video?",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv0 encoder
MPG", SYMLINK+="v4l/video0"
KERNEL=="video?",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv1 encoder
MPG", SYMLINK+="v4l/video1"
KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv0 encoder
PCM", SYMLINK+="v4l/video24"
KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv1 encoder
PCM", SYMLINK+="v4l/video25"
KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv0 encoder
YUV", SYMLINK+="v4l/video32"
KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv1 encoder
YUV", SYMLINK+="v4l/video33"

I also have a kworld115 in the master backend but I am only using the
dvb input of that so I do not care about the analog portion of that
card. /dev/video0 or /dev/video2 depending on if the ivtv card loaded
first. With the symlink the I just use /dev/v4l/video0 and
/dev/v4l/video1 for my 2 ivtv devices. I could have given them more
descriptive names but this worked so I stuck with it.

John
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


joshoekstra at gmx

Jul 3, 2009, 5:14 AM

Post #4 of 5 (340 views)
Permalink
Re: Udev rules (again) [In reply to]

John Drescher schreef op 29-6-2009 7:03:
> Here is what I have for my pvr500.
>
> jmd0 ~ # cat /etc/udev/rules.d/60-ivtv.rules
> #DRIVER=="ivtv",KERNELS=="0000:02:08.0", SYMLINK+="pvr_150"
>
> ATTR{name}=="ivtv0 encoder MPG", SYMLINK+="pvr_150"
> KERNEL=="video?",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv0 encoder
> MPG", SYMLINK+="v4l/video0"
> KERNEL=="video?",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv1 encoder
> MPG", SYMLINK+="v4l/video1"
> KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv0 encoder
> PCM", SYMLINK+="v4l/video24"
> KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv1 encoder
> PCM", SYMLINK+="v4l/video25"
> KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv0 encoder
> YUV", SYMLINK+="v4l/video32"
> KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv1 encoder
> YUV", SYMLINK+="v4l/video33"
>
> I also have a kworld115 in the master backend but I am only using the
> dvb input of that so I do not care about the analog portion of that
> card. /dev/video0 or /dev/video2 depending on if the ivtv card loaded
> first. With the symlink the I just use /dev/v4l/video0 and
> /dev/v4l/video1 for my 2 ivtv devices. I could have given them more
> descriptive names but this worked so I stuck with it.
>
> John

Just for the user wrestling with the same thing: this one works, just
start using it from the first line that starts with KERNEL==.

Thanks for the help!

Jos Hoekstra
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


drescherjm at gmail

Jul 3, 2009, 6:56 AM

Post #5 of 5 (338 views)
Permalink
Re: Udev rules (again) [In reply to]

On Fri, Jul 3, 2009 at 8:14 AM, Jos Hoekstra<joshoekstra[at]gmx.net> wrote:
> John Drescher schreef op 29-6-2009 7:03:
>  > Here is what I have for my pvr500.
>>
>> jmd0 ~ # cat /etc/udev/rules.d/60-ivtv.rules
>> #DRIVER=="ivtv",KERNELS=="0000:02:08.0", SYMLINK+="pvr_150"
>>
>> ATTR{name}=="ivtv0 encoder MPG", SYMLINK+="pvr_150"
>> KERNEL=="video?",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv0 encoder
>> MPG", SYMLINK+="v4l/video0"
>> KERNEL=="video?",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv1 encoder
>> MPG", SYMLINK+="v4l/video1"
>> KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv0 encoder
>> PCM", SYMLINK+="v4l/video24"
>> KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv1 encoder
>> PCM", SYMLINK+="v4l/video25"
>> KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv0 encoder
>> YUV", SYMLINK+="v4l/video32"
>> KERNEL=="video??",SUBSYSTEM=="video4linux",ATTR{name}=="ivtv1 encoder
>> YUV", SYMLINK+="v4l/video33"
>>
>> I also have a kworld115 in the master backend but I am only using the
>> dvb input of that so I do not care about the analog portion of that
>> card. /dev/video0 or /dev/video2 depending on if the ivtv card loaded
>> first. With the symlink the I just use /dev/v4l/video0 and
>> /dev/v4l/video1 for my 2 ivtv devices. I could have given them more
>> descriptive names but this worked so I stuck with it.
>>
>> John
>
> Just for the user wrestling with the same thing: this one works, just start
> using it from the first line that starts with KERNEL==.
>

You are correct. The other part was the original version that did not work...

John
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.