From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: HW mix Date: Tue, 19 Apr 2005 10:14:58 +0200 Message-ID: References: <20050419060647.GG6018@zewt.org> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20050419060647.GG6018@zewt.org> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Glenn Maynard Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Tue, 19 Apr 2005 02:06:47 -0400, Glenn Maynard wrote: > > On Mon, Apr 18, 2005 at 12:06:54PM +0200, Jaroslav Kysela wrote: > > On Mon, 18 Apr 2005, Clemens Ladisch wrote: > > > > > Dino wrote: > > > > i want to mix some pcm streams using hardware (where possible). One process > > > > with some thread witch want to play with one device (hw:0,0). Actually i simply > > > > open the device as it can (32 at max for me) with snd_pcm_open() and hw:0,0 as > > > > the device. It's seems to work but i don't know if it's the rigth way. > > > > > > "hw:0,0" will fail if another program has already opened it. > > > Use "hw:0" which instructs ALSA to open the first available subdevice. > > > > Nope, hw:0,0 is correct (CARD,DEVICE). You meant probably hw:0,0,0 > > (CARD,DEVICE,SUBDEVICE). > > Is there anything wrong with using "hw:0" instead of "hw:0,0", or are they > equivalent? It's what I've always used, without issue. "hw:0" is equal with "hw:0,0", but not with "hw:0,0,0". The default subdevice argument is -1, i.e. "hw:0,0,-1". The -1 means the auto-allocation as described above. When you pass 0 explicitly there, only the substream 0 is opened, and failed if it's already occupied. Takashi ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728