Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jul 2014 17:55:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 191781] [patch] multimedia/webcamd - much improved rc.d script
Message-ID:  <bug-191781-13-9Ivjwg8Vht@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-191781-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-191781-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D191781

--- Comment #7 from dreamcat4@gmail.com ---
I have just had yet another idea for improvement. If you guys are interested
please say so:

Can be added a feature to auto-resolve any connected devices which match a
specific USB vendor id string. This is useful, as I noticed the device numb=
er
change from 7.3 -> 7.2 on reboot. Not even re-pluggin it then (because was =
some
previous some hot-plugging in the same uptime session, the first 7.2 slot w=
as
not re-used).

rc.d script can be programmed to search the USB vendor id string from gripp=
ing
the output of 'usbconfig' command:

$usbconfig
...
ugen2.2: <Acer Crystal Eye webcam SuYin> at usbus2, cfg=3D0 md=3DHOST spd=
=3DHIGH
(480Mbps) pwr=3DON (500mA)
...
ugen7.2: <SCEH-0036 SONY> at usbus7, cfg=3D0 md=3DHOST spd=3DHIGH (480Mbps)=
 pwr=3DON
(500mA)

If the user want to set in rc.conf:

webcamd_device_0_name=3D"Acer Crystal Eye webcam SuYin"
webcamd_device_1_name=3D"SCEH-0036 SONY"
etc=E2=80=A6
webcamd_device_$n_name=3D

This would be the list of device names to recognise. If found multiple
identical device models, all will be loaded on match the same USB vendor id
string (since no way to distinguish, unless USB each has some serial number=
, i
don't know).

It can be in addition to the other ways already provided. So the previous w=
ays
still remain too.

I can get the rc.d script to grep usbconfig command, extract the "ugen2.2" =
and
"ugen7.2" field which match the grep command. Then that is enough informati=
on
to launch instances in a new 3rd loop (similar way like is previously alrea=
dy
done for a similar mechanism).

This also mean that if someone want to setup devd to automatically restart
webcamd on hot-plugging USB events, then the new "ugen" device numbers will=
 be
found correctly on next restart, since the number isn't required to be
hard-coded.

What to you guys think about that?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-191781-13-9Ivjwg8Vht>