From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: PCM API questions Date: Mon, 24 Jun 2002 15:01:55 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <200206241248.g5OCm3f17394@post2.fast.net> Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <200206241248.g5OCm3f17394@post2.fast.net> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Paul Davis Cc: Joshua Haberman , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Mon, 24 Jun 2002 08:49:25 -0400, Paul Davis wrote: > > >> 2. How is device selection designed to work with ALSA? My experience > >> with ALSA has been very confusing in this regard. I recall reading at > >> least once that ALSA is not designed to have applications enumerate all > >> the devices; that the correct way is to use ~/.asoundrc to define a > >> hardware device and then supply that name to applications. But is there > >> anything more sophisticated an application can do than to just present > >> the user with a text box? > > > >the pcm name really depends on the driver implementation. > >usually, device #0 is provided for general use. but, for example, the > >implementation of 4-channel sound is driver speicific. > >some driver implements using a control switch and other combines > >multiple pcm streams, etc. > > > >however, there are standard names, too: > >default, front, rear, center_lfe, surround40, surround51, spdif and > >iec958 (identical with spdif). > >it would be nice if users can choose one of them from a list, and > >additionally have an input text field (well, not sophisticated, > >though). > > but there's no straightforward method of determining which names > actually exist. the code in aplay that handles the -L request, for > example, is baroque to the point of extremity. an application could > not just use those standard names, because the audio interface they > have may not support them. yep. that's actually a problem, too. the names above are not defined on all cards (except for default). i think we need a kind of config database for each card. this is useful not only for pcm but also for parsing the mixer structure. > in addition this also doesn't deal with the issue of users with more > than one soundcard installed. this is not difficult, since the card number can be passed via CARD argument. Takashi ------------------------------------------------------- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/