kern/158979: snd_uaudio fails to initialize built-in microphone in
Logitech Webcam C160
Dmitry Pryanishnikov
lynx.ripe at gmail.com
Sat Jul 16 18:00:18 UTC 2011
>Number: 158979
>Category: kern
>Synopsis: snd_uaudio fails to initialize built-in microphone in Logitech Webcam C160
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Jul 16 18:00:17 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Dmitry Pryanishnikov
>Release: RELENG_8 (also tried on fresh CURRENT)
>Organization:
Home
>Environment:
FreeBSD lynx.homenet 8.2-STABLE FreeBSD 8.2-STABLE #0: Thu Jun 30 02:18:39 EEST 2011 dmitry at lynx.homenet:/databig/obj/databig/ftp/RELENG_8/src.110630/sys/lynx amd64
>Description:
I'm unable to record via the Logitech Webcam C160 built-in microphone. The webcam (including the mic) gets detected by the kernel:
Jul 16 20:26:03 lynx kernel: ugen4.2: <vendor 0x046d> at usbus4
Jul 16 20:26:03 lynx kernel: uaudio0: <vendor 0x046d product 0x0824, class 239/2, rev 2.00/0.10, addr 2> on usbus4
Jul 16 20:26:03 lynx kernel: uaudio0: No playback!
Jul 16 20:26:03 lynx kernel: uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format
Jul 16 20:26:03 lynx kernel: uaudio0: No midi sequencer
Jul 16 20:26:03 lynx kernel: pcm3: <USB audio> on uaudio0
and a picture is visible via pwcview. But the microphone doesn't record and causes timeout:
AUDIODEV='/dev/dsp3' rec -c 1 -t wav - | AUDIODEV='/dev/dsp0' play -t wav -
sox: `/dev/dsp3' lsx_readbuf: Invalid argument
Kernel timeout message:
pcm3: chn_read(): pcm3:virtual:dsp3.vr0: record interrupt timeout, channel dead
The problem can also be confirmed by the lack of voice recording in the Skype. Tried this both on RELENG_8 (sources are csupped 2011-06-30) and on CURRENT (sources 2011-07-15), results are the same.
OTOH, the microphone works quite well under Xubuntu 11.04 (Linux kernel 2.6.38-8 x86_64). Also, I've found non-trivial workaround procedure (tried under RELENG_8), see 'Fix' section, after which the microphone IS usable under the FreeBSD (including Skype)!
>How-To-Repeat:
>Fix:
Under RELENG_8 with the virtualbox-ose-4.0.10 installed:
0) plug the camera, check that recording times out;
1) service devd stop
2) kldunload snd_uaudio
3) attach the camera to the VirtualBox instance with the running Xubuntu 11.04 (Linux kernel 2.6.38-8 x86_64). Don't run the utilities there, just observe in the logfile that Linux kernel has seen the device. A couple of seconds later, detach the camera from the VirtualBox instance.
4) service devd start
(this could fail with the message "devd already running, pid: XXXX" - confirm that process pid=XXXX does NOT exist and do 'rm /var/run/devd.pid; service devd start' - apparently a buglet in the devd).
After this, both the 'rec | play' command above and Skype start to work correctly (until the camera detachment). So it looks like some bit of device initialization that Linux kernel does but snd_uaudio doesn't.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list