From owner-freebsd-multimedia@FreeBSD.ORG Wed Jul 16 18:32:40 2014 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FF106A1 for ; Wed, 16 Jul 2014 18:32:40 +0000 (UTC) Received: from quine.pinyon.org (quine.pinyon.org [65.101.5.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 265B9254A for ; Wed, 16 Jul 2014 18:32:39 +0000 (UTC) Received: by quine.pinyon.org (Postfix, from userid 122) id EF52C160413; Wed, 16 Jul 2014 11:32:32 -0700 (MST) Received: from feyerabend.n1.pinyon.org (feyerabend.n1.pinyon.org [10.0.10.6]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by quine.pinyon.org (Postfix) with ESMTPSA id E74831600DF for ; Wed, 16 Jul 2014 11:32:30 -0700 (MST) Message-ID: <53C6C53E.6000002@pinyon.org> Date: Wed, 16 Jul 2014 11:32:30 -0700 From: "Russell L. Carter" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-multimedia@freebsd.org Subject: Re: audacity crashes recording References: <53BDD5CE.50903@pinyon.org> <53BDDA33.5000802@selasky.org> <53BDE2D3.5050100@pinyon.org> In-Reply-To: <53BDE2D3.5050100@pinyon.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 18:32:40 -0000 On 07/09/14 17:48, Russell L. Carter wrote: > > > On 07/09/14 17:11, Hans Petter Selasky wrote: >> On 07/10/14 01:52, Russell L. Carter wrote: > >>> Anybody got audacity working with OSS? Possibly with >>> snd_uaudio? >>> >> >> Yes, it works, but you need to compile it with possibly another audio >> backend. > I got a reply off-list of "My Audacity is using portaudio, and that seems to work." So I did some digging, and for the benefit of others who do not already know the last 20 years of sound subsystems history, here is what I have found so far (probably some mistakes; I'd appreciate corrections). First, there are two different OSS implementations: 1. audio/oss: opensound.com OSS, currently at version 4.2. I got OSS v4.2 loaded but it doesn't see my USB sound device. 2. Native FreeBSD OSS, which is apparently a complete rewrite of opensound.com OSS v3, documented in http://www.opensound.com/pguide/oss.pdf. In what follows, I'm going to label native FreeBSD OSS "OSS-FreeBSD". My USB device is uaudio0: Sound output works great on OSS-FreeBSD. # cat /dev/sndstat Installed devices: pcm0: (play/rec) default There are two portaudio ports: 1. audio/portaudio, which is actually portaudio 1.8, and apparently has support for OSS-FreeBSD. It has no support for alsa. 2. audio/portaudio2 which is actually portaudio 1.9, and apparently has no support for OSS-FreeBSD. It does have robust support for alsa. Now audio/audacity also includes portaudio 1.9, which is always enabled. So, first tip, don't bother with installing either of the audio/portaudio ports to support audacity. So apparently I need to get alsa working. Alsa has a plugin, installed by audio/alsa-plugins: libasound_module_pcm_oss.so. This enables alsa to talk to OSS-FreeBSD. (I am guessing) So audacity is going to talk to our sound devices by traversing the following compatibility layers: audacity <-> portaudio-1.9 <-> alsa <-> OSS-FreeBSD <-> sound device Seems suboptimal, but heh. If it works, great! However, audacity doesn't see my recording device, and indeed # arecord -l arecord: device_list:279: no soundcards found... # arecord -L null Discard all samples (playback) or generate zero samples (capture) My /usr/local/etc/asound.conf is copied from the distribution version of asound.conf.sample installed by audio/alsa-lib. I haven't got google to cough up any examples of modifying it, though it's not clear that it's the problem. My sound device is /dev/dsp0.0. Any ideas on how to get alsa to recognize the rec device? Thanks, Russell