Bug 17042 - HAL ignores video4linux virtual devices (like vivi)
Summary: HAL ignores video4linux virtual devices (like vivi)
Status: REOPENED
Alias: None
Product: hal
Classification: Unclassified
Component: hald (show other bugs)
Version: unspecified
Hardware: Other All
: high major
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-08 16:35 UTC by Ionut Dediu
Modified: 2012-04-17 20:47 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
hald verbose syslog output (70.06 KB, application/x-gzip)
2009-11-04 03:45 UTC, Whoopie
Details
support virtual video4linux devices (1.57 KB, patch)
2010-11-27 08:06 UTC, Whoopie
Details | Splinter Review

Description Ionut Dediu 2008-08-08 16:35:05 UTC
modprobe the sample vivi driver that comes with the kernel: /sbin/modprobe vivi. After this the following entry is created in sysfs: /sys/devices/virtual/video4linux (and also the symlink /sys/class/video4linux/video0 to the first location). udev generates the following events after loading the driver (output of udevmonitor):

UEVENT[1218237884.557131] add      /module/vivi (module)
UDEV  [1218237884.558324] add      /module/vivi (module)
UEVENT[1218237884.559203] add      /devices/virtual/video4linux/video0 (video4linux)
UDEV  [1218237884.573069] add      /devices/virtual/video4linux/video0 (video4linux)


However no entry is created by HAL for vivi when listing with lshal; as a consequence, vivi does not work with cheese. Needles to say vivi works perfectly with gstreamer... Is it any way to make HAL aware of virtual video4linux devices? After all, HAL recognizes sound devices under /sys/devices/virtual, so it should see the video ones too. Can this be enabled by writing an fdi file?
Comment 1 Danny Kukawka 2008-08-10 04:24:42 UTC
What informations are under /devices/virtual/video4linux/video0 ? Could you run:

  grep . /devices/virtual/video4linux/video0/*

and paste the output to the bug?
Comment 2 Ionut Dediu 2008-08-11 00:26:59 UTC
(In reply to comment #1)
> What informations are under /devices/virtual/video4linux/video0 ? Could you
> run:
> 
>   grep . /devices/virtual/video4linux/video0/*
> 
> and paste the output to the bug?
> 

grep . /sys/devices/virtual/video4linux/video0/*
/sys/devices/virtual/video4linux/video0/dev:81:0
/sys/devices/virtual/video4linux/video0/name:vivi (0)
/sys/devices/virtual/video4linux/video0/uevent:MAJOR=81
/sys/devices/virtual/video4linux/video0/uevent:MINOR=0
Comment 3 Ionut Dediu 2008-08-11 02:06:01 UTC
I submitted this bug, because lshal doesn't enumerate the smartcam driver (http://sourceforge.net/projects/smartcam/). SmartCam emulates a bluetooth webcam, allowing a Symbian phone to behave as a wireless webcam; Right now SmartCam does not work with Cheese, and I suspect it doesn't work either with Skype/gstfakevideo because HAL does not enumerate the virtual device associated with it. However, with respect to HAL, the smartcam driver behaves exactly like vivi, a webcam emulation driver that is included in the kernel; so for this bug, vivi can be used for testing, as it is stable and included in the kernel distribution. It would be a shame to cut off such virtual devices from video processing applications using hal for device discovery, just because they are not "real" hardware.

Thanks,
Ionut
Comment 4 Danny Kukawka 2008-10-02 04:34:43 UTC
Please run/start hal in debug mode (hald --daemon=yes --verbose=yes
--use-syslog), check if HAL is ready (check e.g. with lshal) and attach then
the part of /var/log/messages since you started HAL to this bug.
Comment 5 Danny Kukawka 2009-07-28 05:18:58 UTC
No new info since 8 months, close bug now.
Comment 6 Whoopie 2009-11-04 03:45:34 UTC
Created attachment 30955 [details]
hald verbose syslog output

Please find attached the requested hal debug output.

The HAL messages when the smartcam kernel module is loaded are as follows:

Nov  4 12:34:16 x61t hald[12185]: 12:34:16.033 [I] osspec.c:251: SEQNUM=1752, ACTION=add, SUBSYSTEM=module, DEVPATH=/sys/module/videodev, DEVNAME=, IFINDEX=0
Nov  4 12:34:16 x61t kernel: [ 3855.566660] Linux video capture interface: v2.00
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.035 [I] osspec.c:251: SEQNUM=1751, ACTION=add, SUBSYSTEM=module, DEVPATH=/sys/module/v4l1_compat, DEVNAME=, IFINDEX=0
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.035 [I] osspec.c:251: SEQNUM=1753, ACTION=add, SUBSYSTEM=class, DEVPATH=/sys/class/video4linux, DEVNAME=, IFINDEX=0
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.035 [I] hotplug.c:435: checking event /sys/class/video4linux
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.035 [I] device.c:4905: add_dev: subsys=class sysfs_path=/sys/class/video4linux dev= parent_dev=0x00000000
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.035 [D] hotplug.c:453: events queued = 0, events in progress = 0
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.035 [D] hotplug.c:458: Hotplug-queue empty now ... no hotplug events in progress
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.036 [I] osspec.c:251: SEQNUM=1754, ACTION=add, SUBSYSTEM=module, DEVPATH=/sys/module/smartcam, DEVNAME=, IFINDEX=0
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.040 [I] osspec.c:251: SEQNUM=1755, ACTION=add, SUBSYSTEM=video4linux, DEVPATH=/sys/devices/virtual/video4linux/video0, DEVNAME=/dev/video0, IFINDEX=0
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.040 [I] hotplug.c:435: checking event /sys/devices/virtual/video4linux/video0
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.040 [I] hotplug.c:145: /sys/devices/virtual/video4linux/video0 is a device (subsystem)
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.040 [I] device.c:4905: add_dev: subsys=video4linux sysfs_path=/sys/devices/virtual/video4linux/video0 dev=/dev/video0 parent_dev=0x00000000
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.040 [D] hotplug.c:453: events queued = 0, events in progress = 0
Nov  4 12:34:16 x61t hald[12185]: 12:34:16.040 [D] hotplug.c:458: Hotplug-queue empty now ... no hotplug events in progress
Comment 7 Whoopie 2009-11-04 03:46:20 UTC
Reopen bug report as requested logs are attached now.
Comment 8 Whoopie 2010-11-27 08:06:08 UTC
Created attachment 40600 [details] [review]
support virtual video4linux devices

As I'm still running a distribution which is based on HAL, I made a patch for HAL to support virtual video4linux devices.
Comment 9 dE 2012-04-17 20:47:07 UTC
This should be closed now?


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.