Multiple video devices with udev?

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read this

Multiple video devices with udev?

Postby Bernini on Fri Aug 14, 2009 7:40 am

so i recently bought a a logitech quickcam E 2500 (webcam) and although its not a very linux friendly camera according to searches i did find that gspca modules will work with this webcam... so i followed the forum thread i found and was able to compile that module to work with linux mint 6... then i believe the problem that arose was the webcam and my tvcard were both being setup by default as /dev/video0.... so upon researching this i found the recommended solution would be to add a rules file to udev....

so under etc/udev/rules.d i created the file 25-name-video-devices.rules
which simply contains:

SUBSYSTEM=="v4l2", BUS=="usb", SYSFS{idvendor}=="046d", SYSFS{idProduct}=="089d", NAME="video1"

im using v4l2 (video 4 linux 2) since according to threads this will work better with the gspca module... everything else i pulled from lsusb so that should be the correct idvendor and idproduct ... the name video1 i would prefer to use 'webcam' not sure if that would make any difference...

this might be where im not properly understanding what i need to do im not sure if the rules file needs more lines than this... i cant find anything saying that it does but just this alone hasnt been successful... the multimedia test under control panel, now gives an error since it cant find /dev/video0 anymore as does camorama... and cheese still only /dev/video0 which just gives a black screen(the green power light on the webcam has never turned on to show use... although i have tested this cam under windows with my dual boot and the cam isnt defective)...

so my first question is with multiple video devices in udev would i need to specify both if i specify one... if so this is what lspci shows for my tvcard:

00:0b.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01)

and im not really sure how to add this device to udev either...

ive tried to give as much information as possible here... but since im obviously missing something any help would be greatly appreciated... as always thanks
Bernini
Level 1
Level 1
 
Posts: 38
Joined: Fri May 22, 2009 2:55 pm

Linux Mint is funded by ads and donations.
 

Re: Multiple video devices with udev?

Postby Bernini on Sat Aug 15, 2009 10:49 pm

So with udevinfo -a -p $(udevinfo -q path -n /dev/webcam*) i get:

looking at device '/devices/virtual/video4linux/video0':
KERNEL=="video0"
SUBSYSTEM=="video4linux"
DRIVER==""
ATTR{name}=="GSPCA USB Camera"
ATTR{index}=="0"
ATTR{stream_id}=="JPEG"
ATTR{model}=="Logitech QuickCam E2500"
ATTR{pictsetting}=="force_rgb=0, gamma=1, OffRed=0, OffBlue=0, OffGreen=0, GRed=256, GBlue=256, GGreen= 256 "

looking at parent device '/devices/virtual/video4linux':
KERNELS=="video4linux"
SUBSYSTEMS==""
DRIVERS==""

looking at parent device '/devices/virtual':
KERNELS=="virtual"
SUBSYSTEMS==""
DRIVERS==""

and with udevinfo -a -p $(udevinfo -q path -n /dev/tvtuner*) i get:

looking at device '/devices/pci0000:00/0000:00:0b.0/video4linux/video1':
KERNEL=="video1"
SUBSYSTEM=="video4linux"
DRIVER==""
ATTR{name}=="saa7134[0] video (UNKNOWN/GENER"
ATTR{index}=="0"

looking at parent device '/devices/pci0000:00/0000:00:0b.0/video4linux':
KERNELS=="video4linux"
SUBSYSTEMS==""
DRIVERS==""

looking at parent device '/devices/pci0000:00/0000:00:0b.0':
KERNELS=="0000:00:0b.0"
SUBSYSTEMS=="pci"
DRIVERS=="saa7134"
ATTRS{vendor}=="0x1131"
ATTRS{device}=="0x7134"
ATTRS{subsystem_vendor}=="0x17de"
ATTRS{subsystem_device}=="0x7128"
ATTRS{class}=="0x048000"
ATTRS{irq}=="10"
ATTRS{local_cpus}=="ffffffff,ffffffff"
ATTRS{local_cpulist}=="0-63"
ATTRS{modalias}=="pci:v00001131d00007134sv000017DEsd00007128bc04sc80i00"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""

looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""

so ive been working with udev trying to write this out a little better here is my new udev rules file... etc/udev/rules.d/10.local.rules

# This is the rule for the logitech webcam

KERNEL=="video0", SUBSYSTEM=="video4linux", ATTR{model}=="Logitech QuickCam E2500", NAME="webcam%k"

# This should be the rule for the tvcard

KERNEL=="video1", SUBSYSTEMS=="pci", ATTRS{vendor}=="0x1131", ATTRS{device}=="0x7134", NAME="tvtuner%k"

ok so now im not 100% sure that gspca module is working with the webcam... but cheese is definantly trying to use the tvtuner as opposed to the cam, since when i go under preferences in cheese it now uses the tvtuner in the name(theres no denying its using the wrong device at this point)... the gspca is loaded, but with lsmod it says no devices are using this module... although this module is supposed to have support for this particular model webcam it doesnt appear the cam is using it now that i have learned more... but the webcam is there and the module is there, and i feel as though im getting closer to solving the problem... does anyone have any suggestions as to how i should proceed with this?
Bernini
Level 1
Level 1
 
Posts: 38
Joined: Fri May 22, 2009 2:55 pm


Return to Hardware Support

Who is online

Users browsing this forum: grichiec and 9 guests