* How to force the device assignment with V4l V2.0?
@ 2008-10-17 13:41 Ian Pickworth
2008-10-17 14:00 ` Pádraig Brady
2008-10-18 4:56 ` Brandon Philips
0 siblings, 2 replies; 5+ messages in thread
From: Ian Pickworth @ 2008-10-17 13:41 UTC (permalink / raw)
To: Linux and Kernel Video
I'm having a play with the latest code from hg on the 2.6.27 kernel,
Gentoo installation. This is triggered by the gspca driver being
absorbed into the main tree (which is a great move by the way).
I have two devices - a CX88 based Hauppauge TV PCI card, and a USB
webcam. In the "old" style drivers, I could force the loading of the two
modules (cx8800 and gspca) in a set sequence, using blacklist and
modules.autoload. This is enough to ensure that cx88 gets /dev/video0,
and the usb webcam gets /dev/video1.
However, when trying a recent hg snapshot, the sequence of loading the
modules does not change what the V4l driver is doing when loaded.
Looking at dmesg, I see that the new drivers are doing quite a lot of
detecting work themselves - it looks like they pick up the USB device
first regardless of the module blacklist/load sequence I have specified.
So, question is: Is there a preferred way of forcing the sequence of
device assignment in V4L these days? I need the cx88 to be /dev/video0
and the USB webcam to be /dev/video1 - otherwise all sorts of programs
get confused.
Many thanks
Regards
Ian
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to force the device assignment with V4l V2.0?
2008-10-17 13:41 How to force the device assignment with V4l V2.0? Ian Pickworth
@ 2008-10-17 14:00 ` Pádraig Brady
2008-10-17 14:09 ` Ian Pickworth
2008-10-18 4:56 ` Brandon Philips
1 sibling, 1 reply; 5+ messages in thread
From: Pádraig Brady @ 2008-10-17 14:00 UTC (permalink / raw)
To: ian; +Cc: Linux and Kernel Video
Ian Pickworth wrote:
> I have two devices - a CX88 based Hauppauge TV PCI card, and a USB
> webcam. In the "old" style drivers, I could force the loading of the two
> modules (cx8800 and gspca) in a set sequence, using blacklist and
> modules.autoload. This is enough to ensure that cx88 gets /dev/video0,
> and the usb webcam gets /dev/video1.
I use udev rules to give persistent names.
Here is my /etc/udev/rules.d/video.rules file,
which creates /dev/webcam and /dev/tvtuner as appropriate.
KERNEL=="video*" SYSFS{name}=="USB2.0 Camera", NAME="video%n", SYMLINK+="webcam"
KERNEL=="video*" SYSFS{name}=="em28xx*", NAME="video%n", SYMLINK+="tvtuner"
To find distinguishing attributes to match on use:
echo /sys/class/video4linux/video* | xargs -n1 udevinfo -a -p
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to force the device assignment with V4l V2.0?
2008-10-17 14:00 ` Pádraig Brady
@ 2008-10-17 14:09 ` Ian Pickworth
2008-10-17 15:51 ` Ian Pickworth
0 siblings, 1 reply; 5+ messages in thread
From: Ian Pickworth @ 2008-10-17 14:09 UTC (permalink / raw)
To: Linux and Kernel Video
Pádraig Brady wrote:
> Ian Pickworth wrote:
>> I have two devices - a CX88 based Hauppauge TV PCI card, and a USB
>> webcam. In the "old" style drivers, I could force the loading of the two
>> modules (cx8800 and gspca) in a set sequence, using blacklist and
>> modules.autoload. This is enough to ensure that cx88 gets /dev/video0,
>> and the usb webcam gets /dev/video1.
>
> I use udev rules to give persistent names.
>
> Here is my /etc/udev/rules.d/video.rules file,
> which creates /dev/webcam and /dev/tvtuner as appropriate.
>
> KERNEL=="video*" SYSFS{name}=="USB2.0 Camera", NAME="video%n", SYMLINK+="webcam"
> KERNEL=="video*" SYSFS{name}=="em28xx*", NAME="video%n", SYMLINK+="tvtuner"
>
> To find distinguishing attributes to match on use:
>
> echo /sys/class/video4linux/video* | xargs -n1 udevinfo -a -p
I did think about that, but the problem is that applications want to see
/dev/video(n) style names. Especially TV Time that (I think) uses
/dev/video - set to link to /dev/video0 by the standard udev rules.
I could be wrong - how does one get these programs to recognize the
custom links created by udev rules? Or, is it possible to get udev to
change /dev/video(n) assignment based on udev rules? I'm thinking not,
since one of the things you can match on is KERNEL.
Regards
Ian
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to force the device assignment with V4l V2.0?
2008-10-17 14:09 ` Ian Pickworth
@ 2008-10-17 15:51 ` Ian Pickworth
0 siblings, 0 replies; 5+ messages in thread
From: Ian Pickworth @ 2008-10-17 15:51 UTC (permalink / raw)
To: Linux and Kernel Video
Ian Pickworth wrote:
> Pádraig Brady wrote:
>
>> Ian Pickworth wrote:
>>
>>> I have two devices - a CX88 based Hauppauge TV PCI card, and a USB
>>> webcam. In the "old" style drivers, I could force the loading of the two
>>> modules (cx8800 and gspca) in a set sequence, using blacklist and
>>> modules.autoload. This is enough to ensure that cx88 gets /dev/video0,
>>> and the usb webcam gets /dev/video1.
>>>
>> I use udev rules to give persistent names.
>>
>> Here is my /etc/udev/rules.d/video.rules file,
>> which creates /dev/webcam and /dev/tvtuner as appropriate.
>>
>> KERNEL=="video*" SYSFS{name}=="USB2.0 Camera", NAME="video%n", SYMLINK+="webcam"
>> KERNEL=="video*" SYSFS{name}=="em28xx*", NAME="video%n", SYMLINK+="tvtuner"
>>
>> To find distinguishing attributes to match on use:
>>
>> echo /sys/class/video4linux/video* | xargs -n1 udevinfo -a -p
>>
>
> I did think about that, but the problem is that applications want to see
> /dev/video(n) style names. Especially TV Time that (I think) uses
> /dev/video - set to link to /dev/video0 by the standard udev rules.
>
A bit more research and I can see how to set TVTIME to use a different
device:
In ~/.tvtime/tvtime.xml set this line:
<option name="V4LDevice" value="/dev/v4l/video0"/>
or whatever the device is you want.
So I can have a go at the udev solution - I'll try it a bit later.
Thanks
Regards
Ian
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to force the device assignment with V4l V2.0?
2008-10-17 13:41 How to force the device assignment with V4l V2.0? Ian Pickworth
2008-10-17 14:00 ` Pádraig Brady
@ 2008-10-18 4:56 ` Brandon Philips
1 sibling, 0 replies; 5+ messages in thread
From: Brandon Philips @ 2008-10-18 4:56 UTC (permalink / raw)
To: ian; +Cc: Linux and Kernel Video
On Fri, Oct 17, 2008 at 6:41 AM, Ian Pickworth <ian@pickworth.me.uk> wrote:
> I'm having a play with the latest code from hg on the 2.6.27 kernel,
> Gentoo installation. This is triggered by the gspca driver being
> absorbed into the main tree (which is a great move by the way).
>
> I have two devices - a CX88 based Hauppauge TV PCI card, and a USB
> webcam. In the "old" style drivers, I could force the loading of the two
> modules (cx8800 and gspca) in a set sequence, using blacklist and
> modules.autoload. This is enough to ensure that cx88 gets /dev/video0,
> and the usb webcam gets /dev/video1.
>
> However, when trying a recent hg snapshot, the sequence of loading the
> modules does not change what the V4l driver is doing when loaded.
> Looking at dmesg, I see that the new drivers are doing quite a lot of
> detecting work themselves - it looks like they pick up the USB device
> first regardless of the module blacklist/load sequence I have specified.
>
> So, question is: Is there a preferred way of forcing the sequence of
> device assignment in V4L these days? I need the cx88 to be /dev/video0
> and the USB webcam to be /dev/video1 - otherwise all sorts of programs
> get confused.
If you have an up to date udev you should have rules that creates
persistent symlinks in /dev/v4l/by-path/
See the patches and rules here:
http://marc.info/?l=linux-video&m=120936768608839&w=2
Cheers,
Brandon
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-18 4:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-17 13:41 How to force the device assignment with V4l V2.0? Ian Pickworth
2008-10-17 14:00 ` Pádraig Brady
2008-10-17 14:09 ` Ian Pickworth
2008-10-17 15:51 ` Ian Pickworth
2008-10-18 4:56 ` Brandon Philips
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox