[pulseaudio-discuss] Getting a null sink to show up as an ALSA device.

Tanu Kaskinen tanuk at iki.fi
Wed Oct 19 23:21:10 PDT 2011


On Wed, 2011-10-19 at 19:56 -0400, Chris wrote:
> OK, in my quest to get the output of one application to be used as the
> input for another, I got module-null-sink all set
> 
> from list short sinks
> 9	vac	module-null-sink.c	s16le 2ch 44100Hz	SUSPENDED
> 
> from list short sources
> 12	vac.monitor	module-null-sink.c	s16le 2ch 44100Hz	SUSPENDED
> 
> My two applications recognize ALSA devices.
> 
> One of them for example sees the following options for output devices
> 
> Audio Output Devices:
> id: 0 -> hw:HDA ATI SB,0
> id: 1 -> hw:HDA ATI SB,1
> id: 2 -> hw:HD-Audio Generic,3
> id: 4 -> hw:USB Audio CODEC,0

Are those all of the options? Those refer only to the raw "hw:" devices,
which are not suitable to be used with Pulseaudio. There should at least
be one option that refers to the device named "default", otherwise I
don't think there's any hope of getting this to work.

In case you are somehow able to use those non-hw devices like "default",
you can define alsa devices yourself. For example, the "default" device
is usually directed to Pulseaudio, and it's defined with a configuration
snippet something like this (should be done by your distribution, but
you can also put this to ~/.asoundrc):

pcm.!default {
    type pulse
}

(That exclamation mark means that this definition will override the
older definition for "default" if it happens to have been defined
already in some other configuration file). That alsa device will use
whatever sink Pulseaudio thinks is best. For making alsa devices for the
null sink and its monitor, this should work:

pcm.vac {
    type pulse
    device vac
}

pcm.vacmonitor {
    type pulse
    device vac.monitor
}

-- 
Tanu



More information about the pulseaudio-discuss mailing list