From owner-freebsd-bugs@FreeBSD.ORG Sat Jul 16 18:00:18 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81F55106566C for ; Sat, 16 Jul 2011 18:00:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 492A88FC0A for ; Sat, 16 Jul 2011 18:00:18 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p6GI0Isq072410 for ; Sat, 16 Jul 2011 18:00:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p6GI0Irn072409; Sat, 16 Jul 2011 18:00:18 GMT (envelope-from gnats) Resent-Date: Sat, 16 Jul 2011 18:00:18 GMT Resent-Message-Id: <201107161800.p6GI0Irn072409@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitry Pryanishnikov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65DC4106566B for ; Sat, 16 Jul 2011 17:54:12 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2778FC0A for ; Sat, 16 Jul 2011 17:54:12 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p6GHsBfs005075 for ; Sat, 16 Jul 2011 17:54:11 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p6GHsBnl005063; Sat, 16 Jul 2011 17:54:11 GMT (envelope-from nobody) Message-Id: <201107161754.p6GHsBnl005063@red.freebsd.org> Date: Sat, 16 Jul 2011 17:54:11 GMT From: Dmitry Pryanishnikov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/158979: snd_uaudio fails to initialize built-in microphone in Logitech Webcam C160 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2011 18:00:18 -0000 >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@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: at usbus4 Jul 16 20:26:03 lynx kernel: uaudio0: 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: 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: