From: Takashi Iwai Subject: Re: View alsa-lib plugins setup for any app? Date: Wed, 22 Oct 2008 07:58:45 +0200 Message-ID: References: <48FD3070.7080406@audioscience.com> <200810220955.01218.linux@audioscience.com> 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 (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id BA1502442E for ; Wed, 22 Oct 2008 07:59:02 +0200 (CEST) In-Reply-To: <200810220955.01218.linux@audioscience.com> 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: Eliot Blennerhassett Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 22 Oct 2008 09:55:01 +1300, Eliot Blennerhassett wrote: > > On Tuesday 21 October 2008 19:34:49 Takashi Iwai wrote: > > Sorry, I don't understand well your question. Do you want to see the > > alsa-plugin chain of a running application from the outside, > > Yes. Basically see something that looks like the result of "aplay -v", but for > a running app from the outside. > > E.g. to see if the app is using dmix, plughw etc, what parameters the app sees > vs how the card is accessed. > > Best if this info was available like the proc files for the driver, but if it > required running the app in a special context (debugger-like or LD_PRELOAD) > that would probably still be useful. > > The app should not have to be recompiled. Well, right now it's almost impossible because the alsa-lib stuff is purely a user-space thing and not exposed to anywhere else. An easy hack is to add snd_pcm_dump() to snd_pcm_hw_params() in alsa-lib (better with a conditional check, such as a certain environment variable). But this function may be called recursively, it should have a certain re-entrace check. Takashi