From owner-freebsd-multimedia@FreeBSD.ORG Mon Oct 20 10:14:39 2003 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5253616A4B3 for ; Mon, 20 Oct 2003 10:14:39 -0700 (PDT) Received: from freeman.4gh.net (washdc3-ar5-4-33-220-158.washdc3.elnk.dsl.genuity.net [4.33.220.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60AA043FA3 for ; Mon, 20 Oct 2003 10:14:38 -0700 (PDT) (envelope-from stuartb@4gh.net) Received: from localhost (stuartb@localhost) by freeman.4gh.net (8.12.6/8.12.6) with ESMTP id h9KHEXcF097399; Mon, 20 Oct 2003 13:14:37 -0400 (EDT) (envelope-from stuartb@4gh.net) Date: Mon, 20 Oct 2003 13:14:33 -0400 (EDT) From: Stuart Barkley To: "Luis J. Rodriguez" In-Reply-To: <3F8EAD0D.7030204@we.lc.ehu.es> Message-ID: <20031020125141.Y88920@freeman.4gh.net> References: <3F8EAD0D.7030204@we.lc.ehu.es> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-multimedia@freebsd.org Subject: Re: pcm0: fails at recording X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2003 17:14:39 -0000 On Thu, 16 Oct 2003 at 16:37 +0200, Luis J. Rodriguez wrote: > I have a Dell Latitude C640 laptop, with an integrated 16-bits > soundcard, compatible with Soundblaster (Intel 82801CA). It plays > well any kind of sound but it fails at recording. > [...] > it sounds creaky and slow, completely distorted. You don't say what version of FreeBSD, but this has been fixed in some versions. See: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/37831 I've been using a similar patch on my laptop with FreeBSD 4.7 which I pulled directly from -STABLE some time ago: diff -r -u ../src_dist/sys/dev/sound/pcm/feeder.c ./sys/dev/sound/pcm/feeder.c --- ../src_dist/sys/dev/sound/pcm/feeder.c Mon Apr 22 11:49:36 2002 +++ ./sys/dev/sound/pcm/feeder.c Wed Feb 19 03:36:43 2003 @@ -388,6 +388,10 @@ l = min(count, sndbuf_getready(src)); sndbuf_dispose(src, buffer, l); + /* When recording only return as much data as available */ + if (ch->direction == PCMDIR_REC) + return l; + /* if (l < count) printf("appending %d bytes\n", count - l); Stuart -- I've never been lost; I was once bewildered for three days, but never lost! -- Daniel Boone