From owner-freebsd-multimedia@FreeBSD.ORG Wed Jan 9 01:39:39 2008 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A551316A46B for ; Wed, 9 Jan 2008 01:39:39 +0000 (UTC) (envelope-from stuartb@4gh.net) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id 4067113C468 for ; Wed, 9 Jan 2008 01:39:39 +0000 (UTC) (envelope-from stuartb@4gh.net) Received: from mr02.lnh.mail.rcn.net ([207.172.157.22]) by smtp02.lnh.mail.rcn.net with ESMTP; 08 Jan 2008 20:10:23 -0500 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr02.lnh.mail.rcn.net (MOS 3.8.6-GA) with ESMTP id OGI63074; Tue, 8 Jan 2008 20:10:22 -0500 (EST) Received: from 216-15-55-245.c3-0.slvr-ubr2.lnh-slvr.md.cable.rcn.com (HELO freeman.4gh.net) ([216.15.55.245]) by smtp01.lnh.mail.rcn.net with ESMTP; 08 Jan 2008 20:09:18 -0500 Received: by freeman.4gh.net (Postfix, from userid 1001) id 9EAB811532; Tue, 8 Jan 2008 20:10:19 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by freeman.4gh.net (Postfix) with ESMTP id 80FEF114FC; Tue, 8 Jan 2008 20:10:19 -0500 (EST) Date: Tue, 8 Jan 2008 20:10:19 -0500 (EST) From: Stuart Barkley To: Chuck Robey In-Reply-To: <478409A4.60709@chuckr.org> Message-ID: <20080108193023.B70212@freeman.4gh.net> References: <478409A4.60709@chuckr.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Junkmail-Status: score=10/50, host=mr02.lnh.mail.rcn.net X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A010208.47841EFE.004A,ss=1,fgs=0, ip=207.172.4.11, so=2007-10-30 19:00:17, dmn=5.4.3/2007-11-16 X-Junkmail-IWF: false Cc: freebsd-multimedia@freebsd.org Subject: Re: sound works, but how? X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2008 01:39:39 -0000 On Tue, 8 Jan 2008 at 18:39 -0500, Chuck Robey wrote: > Anyhow, I have a Motherboard with a AD1988b sound chip (it's > hda/Azalia). I have both the sound, snd_hda, and the oss sound kld'd > in. and an ossinfo seems to like things, Are you trying to use the FreeBSD sound system or the OSS sound system (http://www.opensound.com)? It sounds like you might be using the OSS drivers (from the later reference to /dev/oss/hdaudio0/pcm0). > As a GUI, I run gnome, and things like all the various gnome beeps, > blips and moans come out as designed, so I think that a lot of sound > works. Some of the GUIs will grab /dev/dsp preventing other applications from using it at the same time. Is esound (esd) running? Does anything have /dev/dsp (or /dev/oss/hdaudio0/pcm0) open? You might try: # lsof | egrep -i "dsp|pcm" The FreeBSD drivers now support virtual channels which really helps deal with multiple applications all wanting to bleep and groan. I put the following in /etc/sysctl.conf: hw.snd.maxautovchans=8 hw.snd.targetirqrate=30 hw.snd.verbose=2 I don't know if the OSS drivers support this functionality. > My problem is, no other sound playing works now. For instance, I > used to be able to play mp3's with either xmms or mpg123, but now, > they neither of them work. I've experimented with a pretty wide > array of sound tools, nothing works. The errors come in two flavors > ... mostly, they complain that they weren't able to open the > /dev/dsp0 which seems fine, it's a softlink here to > /dev/oss/hdaudio0/pcm0, Without virtual channel support this is the type of message you will see if something already has the sound device open (under any of its various names). > [...] > > Am I using the right device, which is that dsp0 link, which is > created by the oss driver? is that device able to be opened by both > the GUI and othjer progs at the same time? In general the best device to try is /dev/dsp (even if it doesn't show as a file in /dev). Without the FreeBSD virtual channel support the FreeBSD drivers will only allow a single application to open the device at a time. > Seems stupid not to allow the GUI to share the device, right? It takes something to mediate the various sample rates, data bit depths and mixing the digital data streams from multiple applications. Audiophiles may not like the simple sample rate conversion performed and many prefer not having that behavior on their high end devices. FreeBSD virtual channels does this and doesn't require special support in every application. I've been a much happier camper since this support has stabilized. esound is another thing which attempts to do this, but all applications need to be built against it. It's possible you built some ports before you built gnome and that they didn't all get rebuilt with esound support. > Am I right to run both snd_hda and the oss hda modules both at the > same time? Or should I use oss alone? I suspect you should only be using one or the other. I have not recently tried the OSS drivers. > I've tried this both as a regular user and as root, to get past the > permission problem (I wasn't sure) but could it still, somehow, be a > permission problem? You should also try without any GUI running. Either run from a console window or ssh into the system from another system. mpg123 will run from the command line. With the virtual channel support you should be able to run mpg123 in two different terminal sessions playing two different files. Stuart Barkley http://www.4gh.net/tudor/resume.html -- I've never been lost; I was once bewildered for three days, but never lost! -- Daniel Boone