<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">OK so I figured out the error of my ways, but I have to say this list is pretty unresponsive in helping the community so I have to ask myself "is pulse is a sensible choice for audio development today"? &nbsp; Particularly since there is little in the way of useful setup documentation for actually using the library on a programatic way, the error messages from the library and utilities are not particularly helpful and so on.&nbsp;<div><br></div><div>What I need to be able to do is route audio around. &nbsp;I suspect write a module for pulse that will look at the alsa stream class and based on that use the input index to set the sick for that stream. &nbsp;It would be nice to have a feature whereby I can rout all output sent to a particular sink, to another sink. &nbsp;I guess what I'd like to do is be able to create virtual devices whose output can be changed on the fly. &nbsp;So for example I could define an mp3 output that I can switch between headphone output and speaker output depending on a system setting. &nbsp;Or between one speaker output and another. &nbsp;If pulse has a means to do this already I'd appreciate someone pointing me in the direction that can help.</div><div><br></div><div>It seems ALSA will do most of this and the ALSA list seems to be a lot more&nbsp;active, so maybe I was mistaken in thinking that Pulse would really be a useful addition to our audio stack,&nbsp;particularly&nbsp;since on an embedded system it consume&nbsp;disproportionate&nbsp;resources for the benefit it provides.</div><div><br></div><div>Also where is the mixer implemented and how is it controlled. &nbsp;Or is the mixer just a dumb "you have 3 streams coming in and I will make them one" type deal. &nbsp;In other words is there bussing or output switching in the mixer. &nbsp;If not, is this planned?<br><div><br></div><div>Anyway, in case this helps anyone else, the sources that are listed by list-sources are not really sources to pulse. &nbsp;So trying to move them around will not work. &nbsp;Here's something I wrote up on the subject:</div><div><br></div><div><span class="Apple-style-span" style="font-size: 13px; line-height: 17px; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">To see the output devices we have created use the list-sinks command&nbsp;</p><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;<br class="webkit-block-placeholder"></div><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">>>> list-sinks<br style="line-height: 1.22em; ">2 sink(s) available.<br style="line-height: 1.22em; ">&nbsp; * index: 0<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name: &lt;usbAudio><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; driver: &lt;modules/module-alsa-sink.c><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags: LATENCY HARDWARE<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state: IDLE<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; volume: &lt;0: 100% 1: 100%><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mute: &lt;0><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; latency: &lt;97959 usec><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; monitor source: &lt;0><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sample spec: &lt;s16le 2ch 44100Hz><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel map: &lt;front-left,front-right><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; used by: &lt;0><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; linked by: &lt;0><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; module: &lt;0><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description: &lt;ALSA PCM on usbLexiconAlpha (USB Audio) via DMA><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp; index: 1<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name: &lt;hdaAudio><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; driver: &lt;modules/module-alsa-sink.c><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags: LATENCY HARDWARE<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state: IDLE<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; volume: &lt;0: 100% 1: 100%><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mute: &lt;0><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; latency: &lt;75827 usec><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; monitor source: &lt;1><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sample spec: &lt;s16le 2ch 44100Hz><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel map: &lt;front-left,front-right><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; used by: &lt;0><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; linked by: &lt;0><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; module: &lt;1><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description: &lt;ALSA PCM on intelHDA (ALC883 Analog) via DMA></p></div></div><br clear="all" style="line-height: 1.22em; "><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Currently no sound is playing, so if you look to see the sink inputs, you'll see that none have currently been created:</p><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;<br class="webkit-block-placeholder"></div><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">>>> list-sink-inputs<br style="line-height: 1.22em; ">0 sink input(s) available.</p></div></div><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Play a file in a different terminal window (or using your preferred method to make sound).&nbsp; For this experiment I used paplay:<br style="line-height: 1.22em; ">&nbsp;&nbsp;</p><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">nick@nick-desktop:~$ paplay -v&nbsp; Sony\ CD-ROM\ Test\ Disk\ Type\ 3.0/14\ Cantibile\ Op.\ 17.wav<br style="line-height: 1.22em; ">Using sample spec 's16le 2ch 44100Hz'<br style="line-height: 1.22em; ">Connection established.<br style="line-height: 1.22em; ">Stream successfully created</p></div></div><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">I used the -v option to get verbose output from the command, which has no bearing on this experiment.</p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Now if you look at the sink inputs you can see that one has been created for the stream we are currently rendering.</p><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;<br class="webkit-block-placeholder"></div><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">>>> list-sink-inputs<br style="line-height: 1.22em; ">1 sink input(s) available.<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp; index: 9<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name: &lt;Sony CD-ROM Test Disk Type 3.0/14 Cantibile Op. 17.wav><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; driver: &lt;pulsecore/protocol-native.c><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags:<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state: RUNNING<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sink: &lt;0> 'usbAudio'<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; volume: &lt;0: 100% 1: 100%><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mute: &lt;0><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; latency: &lt;500000 usec><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sample spec: &lt;s16le 2ch 44100Hz><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel map: &lt;front-left,front-right><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resample method: auto<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; module: &lt;3><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client: &lt;7> 'paplay'</p></div></div><br clear="all" style="line-height: 1.22em; "><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">By inspection it can be seen that this stream is being rendered on the "usbAudio" device.&nbsp; To switch this stream to the built-in audio source is a straightforward operation, use the move-sync-input command in pacmd.&nbsp; We can see from the output above that the stream index is 9 (note that the index is incremented for each time a new stream is created, so it has to be determined for each stream).</p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;<br style="line-height: 1.22em; "></p><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">>>> move-sink-input 9 hdaAudio</p></div></div><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Now if the sink inputs are listed again you can see the output sink has changed, verifying this by listening, the output does indeed get switched.</p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;<br style="line-height: 1.22em; "></p><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">>>> list-sink-inputs<br style="line-height: 1.22em; ">1 sink input(s) available.<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp; index: 9<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name: &lt;Sony CD-ROM Test Disk Type 3.0/14 Cantibile Op. 17.wav><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; driver: &lt;pulsecore/protocol-native.c><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags:<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state: RUNNING<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sink: &lt;1> 'hdaAudio'<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; volume: &lt;0: 100% 1: 100%><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mute: &lt;0><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; latency: &lt;500000 usec><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sample spec: &lt;s16le 2ch 44100Hz><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel map: &lt;front-left,front-right><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resample method: auto<br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; module: &lt;3><br style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client: &lt;7> 'paplay'<br style="line-height: 1.22em; ">&nbsp;</p></div></div><br clear="all" style="line-height: 1.22em; "><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">The api routines for this are in the file /pulseaudio-0.9.8/src/pulse/introspect.c</p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Look at these routines:</p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;<br style="line-height: 1.22em; "></p><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; "><b style="line-height: 1.22em; ">int &nbsp;&nbsp; &nbsp;pa_stream_connect_playback (pa_stream *s,const char *dev, const pa_buffer_attr *attr, pa_stream_flags_t flags, pa_cvolume *volume, pa_stream *sync_stream)</b></p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; "><em style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp;&nbsp; Connect the stream to a sink.</em></p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; "><b style="line-height: 1.22em; ">int &nbsp;&nbsp; &nbsp;pa_stream_connect_record (pa_stream *s, const char *dev, const pa_buffer_attr *attr, pa_stream_flags_t flags)</b></p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; "><em style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp; &nbsp;Connect the stream to a source.</em><br clear="all" style="line-height: 1.22em; "><b style="line-height: 1.22em; ">int &nbsp;&nbsp; &nbsp;pa_stream_disconnect (pa_stream *s)</b></p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; "><em style="line-height: 1.22em; ">&nbsp;&nbsp;&nbsp; &nbsp;Disconnect a stream from a source/sink.</em><br style="line-height: 1.22em; ">&nbsp;<br style="line-height: 1.22em; ">&nbsp;</p></div></div><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br></div></span></div><div><br></div><div><div><div>On May 1, 2008, at 11:14 AM, Nick Thompson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi there,<div><br></div><div>I have a system where I need to move sources to different sinks according to a policy. &nbsp;I thought I'd try this out using pacmd before I &nbsp;start trying to code this up with pulse, put pacmd does not behave as expected (by me :).<div><br></div><div>I tried the following command in pacmd:</div><div><br></div><div><span class="Apple-style-span" style="font-family: Verdana; ">>>> move-sink-input 0 hdaAudio.monitor<br>No sink input found with this index.<br></span></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">When I list the sinks and sources I get the output listed below.</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">Is anyone familiar with pacmd. &nbsp;According to the help, this looks as if it should work.</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">Eventually I want to publish several virtual devices, route them to a mixer (possibly via an SRC) and route the mixer output to a specific ALSA sink. &nbsp;I need two instances of mixers so that I can mix some streams to one output device and some streams to another. &nbsp;I need to be able to&nbsp;dynamically&nbsp;rout the entire output to another ALSA sink depending on the policy set. &nbsp;I'd also like to rout sources to the different mixer instances as required. &nbsp;If I can do routing within a single mixer instance, so much the better. &nbsp;Is Pulse capable of this or do I need to find another route to&nbsp;implement&nbsp;this.</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">Thanks for any advice,</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">Nick</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">here is the output of list for sources and sinks:</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><!--StartFragment--><font face="Verdana, Helvetica, Arial"><span style="font-size:12.0px">>>> list-sources<br> 3 source(s) available.<br> &nbsp;&nbsp;&nbsp;&nbsp;index: 0<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: &lt;usbAudio.monitor><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;driver: &lt;modules/module-alsa-sink.c><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state: IDLE<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;volume: &lt;0: 100% 1: 100%><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mute: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latency: &lt;0 usec><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sample spec: &lt;s16le 2ch 44100Hz><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel map: &lt;front-left,front-right><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;used by: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;linked by: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;monitor_of: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description: &lt;Monitor Source of ALSA PCM on usbLexiconAlpha (USB Audio) via DMA><br> &nbsp;&nbsp;&nbsp;&nbsp;index: 1<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: &lt;hdaAudio.monitor><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;driver: &lt;modules/module-alsa-sink.c><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state: IDLE<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;volume: &lt;0: 100% 1: 100%><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mute: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latency: &lt;0 usec><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sample spec: &lt;s16le 2ch 44100Hz><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel map: &lt;front-left,front-right><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;used by: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;linked by: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;monitor_of: &lt;1><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module: &lt;1><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description: &lt;Monitor Source of ALSA PCM on intelHDA (ALC883 Analog) via DMA><br> &nbsp;&nbsp;* index: 2<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: &lt;alsa_input.hw_0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;driver: &lt;modules/module-alsa-source.c><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags: HW_VOLUME_CTRL LATENCY HARDWARE<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state: IDLE<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;volume: &lt;0: &nbsp;&nbsp;0% 1: &nbsp;&nbsp;0%><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mute: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latency: &lt;23219 usec><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sample spec: &lt;s16le 2ch 44100Hz><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel map: &lt;front-left,front-right><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;used by: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;linked by: &lt;0><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module: &lt;2><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description: &lt;ALSA PCM on hw:0 (ALC883 Analog) via DMA><br>>>><br> <br> </span></font> <!--EndFragment--> </div></div></div>_______________________________________________<br>pulseaudio-discuss mailing list<br><a href="mailto:pulseaudio-discuss@mail.0pointer.de">pulseaudio-discuss@mail.0pointer.de</a><br>https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss<br></blockquote></div><br></div></div></body></html>