DeviceAdded question

Gilles GIGAN gilles.gigan at gmail.com
Tue May 27 19:09:43 PDT 2008


Further to my previous post, I ran udevmonitor and plugged in both webcams
in turns.
For the Creative NX webcam, udev sends:
UEVENT[1211938254.674635] add      /devices/pci0000:00/0000:00:1d.2/usb5/5-2
(usb)
UDEV  [1211938254.679570] add      /devices/pci0000:00/0000:00:1d.2/usb5/5-2
(usb)
UEVENT[1211938254.679599] add
/devices/pci0000:00/0000:00:1d.2/usb5/5-2/5-2:1.0 (usb)
UDEV  [1211938254.693902] add
/devices/pci0000:00/0000:00:1d.2/usb5/5-2/usb_endpoint/usbdev5.8_ep00
(usb_endpoint)
UDEV  [1211938254.776316] add
/devices/pci0000:00/0000:00:1d.2/usb5/5-2/5-2:1.0 (usb)
UEVENT[1211938254.866628] add
/devices/pci0000:00/0000:00:1d.2/usb5/5-2/5-2:1.0/usb_endpoint/usbdev5.8_ep81
(usb_endpoint)
UEVENT[1211938254.866660] add
/devices/pci0000:00/0000:00:1d.2/usb5/5-2/5-2:1.0/usb_endpoint/usbdev5.8_ep82
(usb_endpoint)
UEVENT[1211938254.866742] add
/devices/pci0000:00/0000:00:1d.2/usb5/5-2/video4linux/video1 (video4linux)
UDEV  [1211938254.873827] add
/devices/pci0000:00/0000:00:1d.2/usb5/5-2/5-2:1.0/usb_endpoint/usbdev5.8_ep81
(usb_endpoint)
UDEV  [1211938254.875099] add
/devices/pci0000:00/0000:00:1d.2/usb5/5-2/5-2:1.0/usb_endpoint/usbdev5.8_ep82
(usb_endpoint)
UDEV  [1211938254.876226] add
/devices/pci0000:00/0000:00:1d.2/usb5/5-2/video4linux/video1 (video4linux)
(this is the one where a video4linux HAL object is created)

for the Logitech Quickcam:
UEVENT[1211938261.097625] add      /devices/pci0000:00/0000:00:1a.0/usb1/1-1
(usb)
UEVENT[1211938261.098128] add
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/usb_endpoint/usbdev1.5_ep00
(usb_endpoint)
UDEV  [1211938261.099268] add      /devices/pci0000:00/0000:00:1a.0/usb1/1-1
(usb)
UDEV  [1211938261.100519] add
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/usb_endpoint/usbdev1.5_ep00
(usb_endpoint)
UEVENT[1211938261.100614] add
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0 (usb)
UEVENT[1211938261.102634] add
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0/usb_endpoint/usbdev1.5_ep81
(usb_endpoint)
UEVENT[1211938261.102702] add
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0/usb_endpoint/usbdev1.5_ep82
(usb_endpoint)
UEVENT[1211938261.108634] add      /devices/virtual/video4linux/video2
(video4linux)
UDEV  [1211938261.110296] add      /devices/virtual/video4linux/video2
(video4linux)
UDEV  [1211938261.151902] add
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0 (usb)
UDEV  [1211938261.153254] add
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0/usb_endpoint/usbdev1.5_ep81
(usb_endpoint)
UDEV  [1211938261.154323] add
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0/usb_endpoint/usbdev1.5_ep82
(usb_endpoint)
(for this webcam, no video4linux HAL object is created)
In the first instance the video4linux device is a child kobject of the USB
connection kobject. Whereas in the second case, the video4linux kobject ends
up in /devices/virtual instead, which is the location for devices that dont
have a real parent kobject (AFAIK). I suspect this is why the HAL
video4linux object is not created in the second case. Can someone confirm ?
Checking the contents of /sys/devices/virtual shows a lot of kobjects,
including some that are properly reported by HAL. On my computer, ' lshal |
grep "/virtual" ' shows event-input objects and ALSA objects (sequencer,
timer), all with "linux.sysfs_path" pointing somewhere in
/sys/devices/virtual and linux.device_file pointing to a device file in /dev
Which brings me back to that question: why isnt the Quickcam also detected
and reported ?

cheers,
Gilles

On Mon, May 26, 2008 at 9:49 AM, Gilles GIGAN <gilles.gigan at gmail.com>
wrote:

> Hi all,
> When I connect a USB webcam, org.freedesktop.Hal.Manager generates a couple
> of DeviceAdded signals for the newly created HAL objects. One of these
> objects usually has the 'Video4Linux' capability. These are the HAL objects
> created when I plug in a Creative NX webcam (no microphone):
> /org/freedesktop/Hal/devices/usb_device_41e_401c_noserial
> /org/freedesktop/Hal/devices/usb_device_ffffffff_ffffffff_noserial
> /org/freedesktop/Hal/devices/usb_device_41e_401c_noserial_video4linux
> The last one in this case holds the information about V4L and is easily
> identifiable by checking at least "info.category" and "info.capabilities".
> However, when I connect an old Logitech Quickcam express (qc-usb driver),
> no V4L-related object is created and I only get:.
> /org/freedesktop/Hal/devices/usb_device_46d_840_noserial
> /org/freedesktop/Hal/devices/usb_device_46d_840_noserial_if0
> grep'ping syslog shows the webcam has been detected and the device file
> created.
>
> Is this HAL-related or driver-related ?
> If it is driver-related, which step (specifically which function call)
> usually notifies HAL that a new V4L object has been added ? is it tied to
> one of the sysfs routines ?
> Thanks,
> Gilles
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/hal/attachments/20080528/1e698099/attachment.html 


More information about the hal mailing list