From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: "default" device. Is there a way to detect if it's a plugin, and if so which one? Date: Mon, 04 Apr 2011 12:57:00 +0200 Message-ID: References: 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 mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 0A046243B4 for ; Mon, 4 Apr 2011 12:57:03 +0200 (CEST) In-Reply-To: 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: Colin Guthrie Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Sun, 03 Apr 2011 13:22:34 +0100, Colin Guthrie wrote: > > Hi, > > If the user opens the "default" device in alsa, is there a way to find > out if that "device" is actually a plugin? > > i.e. is it possible to tell if you have opened the pulseaudio plugin via > alsa? > > There are various hacky ways (e.g. checking hints etc.) but that relies > on downstream packaging which certainly isn't fool proof. There is no clean way, AFAIK. A new API would be needed. For example, something like: snd_pcm_contains_type(pcm, SND_PCM_TYPE_EXTPLUG); But checking whether PA-plugin is used is difficult with the API above because pulse plugin has no unique PCM type but it's a sub-plugin of extplug plugin... Takashi