From: Takashi Iwai Subject: Re: alsa problems Date: Tue, 28 Mar 2006 15:08:47 +0200 Message-ID: References: <1143547835.13615.25.camel@localhost> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id 32DF31B6 for ; Tue, 28 Mar 2006 15:08:48 +0200 (MEST) In-Reply-To: <1143547835.13615.25.camel@localhost> 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: Johannes Berg Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 28 Mar 2006 14:10:35 +0200, Johannes Berg wrote: > > Hi, > > I continued writing the new driver for the apple machine sound stuff, > and I keep running into alsa bugs which is pretty frustrating. They are no called as bugs. > 1) > #include > doesn't compile because it requires sound/driver.h *before* it. Yes. And what's the point? > 2) > snd_pcm_new_stream doesn't create the pcm devices when the pcm has > already been registered. > Since I don't know a priori which directions (playback/capture) my pcm > will support, I wanted to add the pcm, register it, and then add > substreams to it. No such luck, so now I have to register both > substreams (I can only support one in each direction anyway) without > knowing if they can ever be used... I don't understand what's the problem. You can create an empty PCM via snd_pcm_new(), then add each stream, playback or capture, can be assigned appropriately via snd_pcm_new_stream() later on. If you want to add _substreams_ dynamically, then it's not allowed. It'd be relatively easy to extend it although I rarely see the reason to do it. > 3) > No way to get rid of some kinds of resources, like pcms... It can. Call snd_device_free(). Takashi ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642