From: Takashi Iwai Subject: Re: Pulseaudio alsa configure hook Date: Wed, 30 Apr 2008 18:20:40 +0200 Message-ID: References: <20080427203709.GA13496@spring.luon.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id C12FC246B2 for ; Wed, 30 Apr 2008 18:20:44 +0200 (CEST) In-Reply-To: <20080427203709.GA13496@spring.luon.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Sjoerd Simons Cc: pulseaudio-discuss@mail.0pointer.de, alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Sun, 27 Apr 2008 22:37:09 +0200, Sjoerd Simons wrote: > > Hi, > > The attached patch extends the alsa pulse plugin set with a alsa > configuration hook. Allowing one to specify some configuration parameters > that only come into effect when pulseaudio is running. > > For example a configution file like: > > @hooks [ { > func on_pulse_is_running > pcm.!default { type pulse } > ctl.!default { type pulse } > } > ] > > will redirect the default alsa pcm and ctl to pulse iff pulse is running. > (Assuming you defined the hook function correctly ofcourse) > > This is usefull for distributions that don't want to force their users to > switch completely to pulseaudio, but have things a bit more dynamic :) > > The solutions isn't optimal though. It will mean that every program loading > accessing alsa will try to make an (extra) connection to pulse to decide what > to do. But i think it's the best we can do for now (or at least that i can do > with my minimal knowledge of alsa). > > A nicer solution would be a way to always specify the pulse plugin as default > and have a sort of fallback for when that fails. > > Comments on the patch appreciated :) This looks pretty interesting. I forgot that this kind of stuff can be also a plugin :) Applied to HG tree now. Thanks! Takashi