public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Carsten Meier <cm@trexity.de>
To: "Markus Rechberger" <mrechberger@gmail.com>
Cc: video4linux-list@redhat.com
Subject: Re: How to identify USB-video-devices
Date: Thu, 15 Jan 2009 16:33:48 +0100	[thread overview]
Message-ID: <20090115163348.5da9932a@tuvok> (raw)
In-Reply-To: <d9def9db0901150720n53ca549dobaa0034b9a21072a@mail.gmail.com>

Am Thu, 15 Jan 2009 16:20:23 +0100
schrieb "Markus Rechberger" <mrechberger@gmail.com>:

> On Thu, Jan 15, 2009 at 3:41 PM, Carsten Meier <cm@trexity.de> wrote:
> > Hello list,
> >
> > we recently had a discussion on the pvrusb2-list on how to identify
> > a video-device connected via USB from an userspace app. (Or more
> > precisely on how to associate config-data with a particular
> > device). This led to a patch which returned the device's serial-no.
> > in v4l2_capability's bus_info field. This one has been rejected,
> > but I really feel that this is the right way to go. Here's the
> > thread:
> > http://www.isely.net/pipermail/pvrusb2/2009-January/002091.html
> >
> > I think the meaning of the bus_info-field should be modified
> > slightly for USB-devices to reflect its dynamic nature. At least a
> > string that won't change on dis-/reconnect and
> > standby/wake-up-cycles should be returned. If a device has a unique
> > serial-no. it is a perfect candidate for this, if not, some
> > USB-port-info should be returned that won't change if the device is
> > connected to the same port through the same hub.
> >
> > What do you think?
> > (BTW: I'm not a kernel-hacker, I'm writing this from the
> > perspective of an app-developer)
> >
> 
> write a few shellscripts and parse sysfs, or attach your application
> to sysfs that it will
> be notified if a device gets added. dbus is also a tip. no need to
> hook up drivers
> with some special things there.
> 
> regards,
> Markus

But according to the docs, the bus_info-field is intended for the
purpose of identifying particular devices. Other solutions may be
possible, but they are much more complex and much more sensible to
other kernel-changes. By using bus_info, there is a simple and clean
solution that only depends on the V4L2-API and it also reflects the
primary intention of the field.

Other USB-device-drivers aren't required to change to the new policy,
their current bus_info-string (if implemented like in pvrusb2) changes
on every reconnect and standby/wake-up-cycle and is of no use anyway
for any app.

I really think that current behaviour is broken.

Regards,
Carsten

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

  reply	other threads:[~2009-01-15 15:34 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 [this message]
     [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
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=20090115163348.5da9932a@tuvok \
    --to=cm@trexity.de \
    --cc=mrechberger@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox