[pvrusb2] How to uniquely identify a device
Carsten Meier
cm at trexity.de
Sat Jan 10 17:24:42 CST 2009
Am Sat, 10 Jan 2009 15:36:42 -0600 (CST)
schrieb Mike Isely <isely at isely.net>:
> On Fri, 9 Jan 2009, Carsten Meier wrote:
>
> >
> > OK, then simply report back the serial-number to bus-info. The
> > v4l2-docs explicitly states that this info is intended for users to
> > select between identical devices:
> >
> > quote:------
> > __u8 bus_info[32]:
> > Location of the device in the system, a
> > NUL-terminated ASCII string. For example: "PCI Slot 4". This
> > information is intended for users, to distinguish multiple identical
> > devices. If no such information is available the field may simply
> > count the devices controlled by the driver, or contain the empty
> > string (bus_info[0] = 0).
> > ------------
> >
> > Users should be enabled to select between multiple, identical
> > devices and as a logical consequence, this information should be
> > saveable in some config file. The current bus-info changes even if
> > I my mini-pc changed to standby-mode and woke up again and is
> > therefore useless for that purpose.
> >
> > I hope I convinced you... :)
>
> Not 100%, but it's enough to make me look at this again and
> re-evaluate. I will add this to my growing list of pvrusb2 tasks for
> tomorrow...
>
> -Mike
>
OK, I try to make my point of view a little bit clearer by describing
a use-case. How to associate config-data (e.g. control-settings) with
a video-device? Two possible approaches:
1. Save device-file-name with the config data (e.g. /dev/video1).
This won't work reliably because device-nodes are created dynamicly
2. Save card and bus_info with config data. This is what bus_info was
intended for with statical PCI-cards without serial-numbers in mind.
(Here the reported bus_info is always the same)
The second approach is not possible with the current
pvrusb2's implementation for reporting bus_info. It literally follows
the struct-member name and returns the USB-bus-info, but doesn't
consider its primary intention.
I hope I could make it clear, it's hard for me to explain things in
english. Thanks for re-evaluation. :)
Carsten
More information about the pvrusb2
mailing list