[kde-freebsd] kaffeine-1.0 and webcamd based DVB-T?
Juergen Lock
nox at jelal.kn-bremen.de
Tue Aug 24 22:21:18 CEST 2010
On Mon, Aug 23, 2010 at 09:14:30AM +0200, Hans Petter Selasky wrote:
> > >
> > > I have Cc'd hps, maybe he has an idea how to get the device index
> > >
> > > out of a running webcamd for hal to use... (maybe webcamd should
> > > also do a setproctitle()?)
> >
> > Actually, I'd prefer if there was a file or socket from which I could
> > read to get this data. hps, is this doable? That is, could I have a
> > file or socket that would allow me to map a USB bus/addr to a video (or
> > dvb) device ID?
>
> I think something like this has been discussed before, that perhaps webcamd,
> when it is ready updates hald, if present in the system.
>
> Could you provide me the snprintf() I need and where to send it?
Ok I just got the new kaffeine working for direct dvb (i.e. without
xvdr://) with both the dvb-s2 and dvb-t tuners by invoking
hal-device --add for each dvb device node like below. (well,
ignoring audio issues on dvb-s2 h264 channels but those can't have
anything to do with hal...)
So it seems you can take the udi name that hal uses for the device
(or is that always 'usb_device_<id>_<id>_noserial'?), add a string
to it like '_dvb_<incremented>', use that as arg to 'hal-device --add',
and then give that process mostly static info like mine on stdin
where only dvb.device (the device node) and info.parent (the original
udi name) vary: (Linux also adds linux.device_file, linux.hotplug_type,
linux.subsystem, and linux.sysfs_path as you can see in my Linux
lshal output earlier in this thread,
http://lists.freebsd.org/pipermail/freebsd-multimedia/2010-August/011203.html
but it seems at least kaffeine doesn't need those.)
#! /bin/sh
# add PCTV 452e Sat HDTV Pro USB to hal as /dev/dvb/adapter0
hal-device --add usb_device_2304_21f_noserial_dvb_0 <<EOF
dvb.device = '/dev/dvb/adapter0/demux0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
EOF
hal-device --add usb_device_2304_21f_noserial_dvb_1 <<EOF
dvb.device = '/dev/dvb/adapter0/dvr0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
EOF
hal-device --add usb_device_2304_21f_noserial_dvb_2 <<EOF
dvb.device = '/dev/dvb/adapter0/frontend0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
EOF
and
#! /bin/sh
# add MSI DIGIVOX Duo to hal as /dev/dvb/adapter8 and /dev/dvb/adapter9
hal-device --add usb_device_1462_8801_noserial_dvb_0 <<EOF
dvb.device = '/dev/dvb/adapter8/demux0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
EOF
hal-device --add usb_device_1462_8801_noserial_dvb_1 <<EOF
dvb.device = '/dev/dvb/adapter8/dvr0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
EOF
hal-device --add usb_device_1462_8801_noserial_dvb_2 <<EOF
dvb.device = '/dev/dvb/adapter8/frontend0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
EOF
hal-device --add usb_device_1462_8801_noserial_dvb_3 <<EOF
dvb.device = '/dev/dvb/adapter9/demux0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
EOF
hal-device --add usb_device_1462_8801_noserial_dvb_4 <<EOF
dvb.device = '/dev/dvb/adapter9/dvr0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
EOF
hal-device --add usb_device_1462_8801_noserial_dvb_5 <<EOF
dvb.device = '/dev/dvb/adapter9/frontend0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
EOF
After that lshal has this about them:
udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial'
info.bus = 'usb_device' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_4' (string)
info.product = 'DVB-T 2' (string)
info.subsystem = 'usb_device' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.vendor = 'Afatech' (string)
usb_device.bus_number = 5 (0x5) (int)
usb_device.can_wake_up = false (bool)
usb_device.configuration = '' (string)
usb_device.configuration_value = 1 (0x1) (int)
usb_device.device_class = 0 (0x0) (int)
usb_device.device_protocol = 0 (0x0) (int)
usb_device.device_revision_bcd = 512 (0x200) (int)
usb_device.device_subclass = 0 (0x0) (int)
usb_device.is_self_powered = false (bool)
usb_device.level_number = 2 (0x2) (int)
usb_device.max_power = 500 (0x1f4) (int)
usb_device.num_configurations = 1 (0x1) (int)
usb_device.num_interfaces = 1 (0x1) (int)
usb_device.num_ports = 0 (0x0) (int)
usb_device.port_number = 3 (0x3) (int)
usb_device.product = 'DVB-T 2' (string)
usb_device.product_id = 34817 (0x8801) (int)
usb_device.serial = '' (string)
usb_device.speed = 480.0 (480) (double)
usb_device.speed_bcd = 294912 (0x48000) (int)
usb_device.vendor = 'Afatech' (string)
usb_device.vendor_id = 5218 (0x1462) (int)
usb_device.version = 2.0 (2) (double)
udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_5'
dvb.device = '/dev/dvb/adapter9/frontend0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_5' (string)
udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_4'
dvb.device = '/dev/dvb/adapter9/dvr0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_4' (string)
udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_3'
dvb.device = '/dev/dvb/adapter9/demux0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_3' (string)
udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_2'
dvb.device = '/dev/dvb/adapter8/frontend0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_2' (string)
udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_1'
dvb.device = '/dev/dvb/adapter8/dvr0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_1' (string)
udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_0'
dvb.device = '/dev/dvb/adapter8/demux0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_dvb_0' (string)
udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_if0'
info.bus = 'usb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial' (string)
info.product = 'DVB-T 2' (string)
info.subsystem = 'usb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1462_8801_noserial_if0' (string)
info.vendor = 'Afatech' (string)
usb.bus_number = 5 (0x5) (int)
usb.can_wake_up = false (bool)
usb.configuration = '' (string)
usb.configuration_value = 1 (0x1) (int)
usb.device_class = 0 (0x0) (int)
usb.device_protocol = 0 (0x0) (int)
usb.device_revision_bcd = 512 (0x200) (int)
usb.device_subclass = 0 (0x0) (int)
usb.interface.class = 255 (0xff) (int)
usb.interface.description = '' (string)
usb.interface.number = 0 (0x0) (int)
usb.interface.protocol = 0 (0x0) (int)
usb.interface.subclass = 0 (0x0) (int)
usb.is_self_powered = false (bool)
usb.level_number = 2 (0x2) (int)
usb.max_power = 500 (0x1f4) (int)
usb.num_configurations = 1 (0x1) (int)
usb.num_interfaces = 1 (0x1) (int)
usb.num_ports = 0 (0x0) (int)
usb.port_number = 3 (0x3) (int)
usb.product = 'DVB-T 2' (string)
usb.product_id = 34817 (0x8801) (int)
usb.serial = '' (string)
usb.speed = 480.0 (480) (double)
usb.speed_bcd = 294912 (0x48000) (int)
usb.vendor = 'Afatech' (string)
usb.vendor_id = 5218 (0x1462) (int)
usb.version = 2.0 (2) (double)
udi = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial'
info.bus = 'usb_device' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_4' (string)
info.product = 'PCTV452e' (string)
info.subsystem = 'usb_device' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial' (string)
info.vendor = 'Pinnacle' (string)
usb_device.bus_number = 5 (0x5) (int)
usb_device.can_wake_up = true (bool)
usb_device.configuration = '' (string)
usb_device.configuration_value = 1 (0x1) (int)
usb_device.device_class = 0 (0x0) (int)
usb_device.device_protocol = 0 (0x0) (int)
usb_device.device_revision_bcd = 512 (0x200) (int)
usb_device.device_subclass = 0 (0x0) (int)
usb_device.is_self_powered = false (bool)
usb_device.level_number = 1 (0x1) (int)
usb_device.max_power = 10 (0xa) (int)
usb_device.num_configurations = 1 (0x1) (int)
usb_device.num_interfaces = 1 (0x1) (int)
usb_device.num_ports = 0 (0x0) (int)
usb_device.port_number = 2 (0x2) (int)
usb_device.product = 'PCTV452e' (string)
usb_device.product_id = 543 (0x21f) (int)
usb_device.serial = '' (string)
usb_device.speed = 480.0 (480) (double)
usb_device.speed_bcd = 294912 (0x48000) (int)
usb_device.vendor = 'Pinnacle' (string)
usb_device.vendor_id = 8964 (0x2304) (int)
usb_device.version = 2.0 (2) (double)
udi = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial_dvb_2'
dvb.device = '/dev/dvb/adapter0/frontend0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial_dvb_2' (string)
udi = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial_dvb_1'
dvb.device = '/dev/dvb/adapter0/dvr0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial_dvb_1' (string)
udi = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial_dvb_0'
dvb.device = '/dev/dvb/adapter0/demux0' (string)
info.capabilities = {'dvb'} (string list)
info.category = 'dvb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial' (string)
info.product = 'DVB Device' (string)
info.subsystem = 'dvb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial_dvb_0' (string)
udi = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial_if0'
info.bus = 'usb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial' (string)
info.product = 'PCTV452e' (string)
info.subsystem = 'usb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial_if0' (string)
info.vendor = 'Pinnacle' (string)
usb.bus_number = 5 (0x5) (int)
usb.can_wake_up = true (bool)
usb.configuration = '' (string)
usb.configuration_value = 1 (0x1) (int)
usb.device_class = 0 (0x0) (int)
usb.device_protocol = 0 (0x0) (int)
usb.device_revision_bcd = 512 (0x200) (int)
usb.device_subclass = 0 (0x0) (int)
usb.interface.class = 255 (0xff) (int)
usb.interface.description = '' (string)
usb.interface.number = 0 (0x0) (int)
usb.interface.protocol = 0 (0x0) (int)
usb.interface.subclass = 0 (0x0) (int)
usb.is_self_powered = false (bool)
usb.level_number = 1 (0x1) (int)
usb.max_power = 10 (0xa) (int)
usb.num_configurations = 1 (0x1) (int)
usb.num_interfaces = 1 (0x1) (int)
usb.num_ports = 0 (0x0) (int)
usb.port_number = 2 (0x2) (int)
usb.product = 'PCTV452e' (string)
usb.product_id = 543 (0x21f) (int)
usb.serial = '' (string)
usb.speed = 480.0 (480) (double)
usb.speed_bcd = 294912 (0x48000) (int)
usb.vendor = 'Pinnacle' (string)
usb.vendor_id = 8964 (0x2304) (int)
usb.version = 2.0 (2) (double)
HTH, :)
Juergen
More information about the kde-freebsd
mailing list