All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carsten Meier <cm@trexity.de>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: video4linux-list@redhat.com
Subject: Re: How to identify USB-video-devices
Date: Thu, 15 Jan 2009 23:55:11 +0100	[thread overview]
Message-ID: <20090115235511.1ea5fdd5@tuvok> (raw)
In-Reply-To: <496FB713.5020609@draigBrady.com>

Am Thu, 15 Jan 2009 22:22:11 +0000
schrieb Pádraig Brady <P@draigBrady.com>:

> Carsten Meier wrote:
> > Storing device-file-names is also not an option because they are
> > created dynamicly.
> 
> You 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
> 
> cheers,
> Pádraig.

This already came up on the pvrusb2-list and someone told me (I don't
know much about udev) that it might cause problems on disconnection of
a device with a file-descriptor open which then gets reconnected
and there are two device-files for it. I also don't like it,
because an average user (including me) usually can't or don't want to
write udev rules. Finally v4l2 already contains a very simple and
reliable mechanism for doing this (bus_info-field) which simply isn't
used correctly by the USB-drivers.

My app should simply scan for /dev/video*-files, read out capabilities
from them, present the user menus to select devices and edit device
settings, save settings to a file and apply them on demand. This would
work fine if bus_info was filled right, without root-privileges,
without special udev rules or other sysfs-magic.

Regards,
Carsten

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  parent reply	other threads:[~2009-01-15 22:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 14:41 How to identify USB-video-devices Carsten Meier
2009-01-15 15:20 ` Markus Rechberger
2009-01-15 15:33   ` Carsten Meier
     [not found]     ` <09CD2F1A09A6ED498A24D850EB10120817E30B7506@Colmatec004.COLMATEC.INT>
2009-01-15 16:51       ` Carsten Meier
2009-01-15 22:22         ` Pádraig Brady
2009-01-15 22:45           ` Markus Rechberger
2009-01-15 22:55           ` Carsten Meier [this message]
2009-01-15 23:40             ` Markus Rechberger
2009-01-16  0:27               ` Carsten Meier
2009-01-16  0:59                 ` Markus Rechberger
2009-01-16  1:55                   ` Carsten Meier
2009-01-16  2:03                     ` Markus Rechberger
2009-01-16  4:14                       ` Mike Isely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090115235511.1ea5fdd5@tuvok \
    --to=cm@trexity.de \
    --cc=P@draigBrady.com \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.