[pulseaudio-discuss] I added a wiki section for pulse based projects and software

2009-10-29 Thread Matthew Patterson

If you take a look at the bottom of the pulseaudio community page:
http://www.pulseaudio.org/wiki/Community
you will notice a new section for listing projects based on/around 
pulseaudio.


I don't have access to edit the primary wiki index and couldn't really 
think of a better spot to put this section. The community page seems to 
currently be focused on the group of people devving the actual pulse 
project, but I figured an expansion of the definition might work.


Please let me know if you have any complaints/recommendations and I 
would be happy to reformat or move the section.


Matt


___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Sharing the code for a pulseaudio based whole home audio system

2009-10-25 Thread Matthew Patterson
Ok. I have done a LOT of cleanup on the code. Consolidated the numerous 
config files, made the directory structure somewhat logical, etc. I also 
converted to git using git-cvsimport without too much trouble.


So now I have the question, how to I push my repository up to gitorous 
(already have an account) without including the entire history? I have 
cleaned the current tree to not contain any passwords/etc, but previous 
checkins definitely contained that sort of stuff.


It really seems like I should be able to push only the current code 
snapshot and let things progress from there. That way I get to keep my 
history and the server continues from here on out? Is git rebase what I 
am looking for???


Thanks,
Matt



Colin Guthrie wrote:
'Twas brillig, and Matthew Patterson at 14/09/09 16:44 did gyre and 
gimble:
I'll check them out. I've been meaning to switch over to something 
other than CVS for a long time. I primarily use CVS for code 
backup/versioning on personal projects where I am the only developer 
so I have been lazy :).


Yeah I know the feeling... I've still got one personal CVS kicking 
around too laziness wins every time :D


Is there a CVS->GIT conversion tool that will allow me to keep my 
entire revision history?


Sure. There are both cvs and svn tools distributed with git.

With git-svn you can get bi-directional linkage to the subversion 
repository (e.g. for using git locally to work with upstream projects 
that still use subversion) allowing you to rebase your clone on 
upstream commits and also commit your local changes back to subversion 
too. I use it all the time at work and it's awesome.


The cvs module is not bi-directional, but it should work fine for a 
one-off import:


http://www.kernel.org/pub/software/scm/git/docs/git-cvsimport.html


Col

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Sharing the code for a pulseaudio based whole home audio system

2009-09-15 Thread Matthew Patterson
Awesome. Now I just need the time to do the conversion and write a 
little wiki page.


Thanks all!

Matt



Colin Guthrie wrote:
'Twas brillig, and Matthew Patterson at 14/09/09 16:44 did gyre and 
gimble:
I'll check them out. I've been meaning to switch over to something 
other than CVS for a long time. I primarily use CVS for code 
backup/versioning on personal projects where I am the only developer 
so I have been lazy :).


Yeah I know the feeling... I've still got one personal CVS kicking 
around too laziness wins every time :D


Is there a CVS->GIT conversion tool that will allow me to keep my 
entire revision history?


Sure. There are both cvs and svn tools distributed with git.

With git-svn you can get bi-directional linkage to the subversion 
repository (e.g. for using git locally to work with upstream projects 
that still use subversion) allowing you to rebase your clone on 
upstream commits and also commit your local changes back to subversion 
too. I use it all the time at work and it's awesome.


The cvs module is not bi-directional, but it should work fine for a 
one-off import:


http://www.kernel.org/pub/software/scm/git/docs/git-cvsimport.html


Col

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Sharing the code for a pulseaudio based whole home audio system

2009-09-14 Thread Matthew Patterson
I'll check them out. I've been meaning to switch over to something other 
than CVS for a long time. I primarily use CVS for code backup/versioning 
on personal projects where I am the only developer so I have been lazy :).


Is there a CVS->GIT conversion tool that will allow me to keep my entire 
revision history?


Thanks,
Matt



Lennart Poettering wrote:

On Sun, 13.09.09 09:58, Matthew Patterson (m...@v8zman.com) wrote:

  
I can handle that. Any suggestions on where to host the code itself? I  
know there is sourceforge and such. I certainly have no interest in  
hosting the cvs repository off my own server :).



Gitorious is probably the best choice.

Lennart

  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Sharing the code for a pulseaudio based whole home audio system

2009-09-13 Thread Matthew Patterson
I can handle that. Any suggestions on where to host the code itself? I 
know there is sourceforge and such. I certainly have no interest in 
hosting the cvs repository off my own server :).


Matt



Colin Guthrie wrote:
'Twas brillig, and Matthew Patterson at 13/09/09 02:02 did gyre and 
gimble:
I have no real plans at the moment to redo/revamp/cleanup the code as 
everything works well, but I would like to share it in case someone 
else wants to use it. The pulseaudio site does not appear to have a 
place for doing such a thing. What would you all recommend?


Well the site is a wiki, and while it's nice to ask permission etc, 
I'd just go ahead and make a nice little section for yourself.


I was intending eventually to create a "Pulse Recipes" section of the 
site to hold nice examples of use cases etc. so feel free to use that 
terminology and/or search for similar things already there...


Col


___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] Sharing the code for a pulseaudio based whole home audio system

2009-09-12 Thread Matthew Patterson

Hello,

I have posted on this topic before. About a year ago I finished building 
a whole home audio system based on pulseaudio and the module-combine 
features. This enables multiple zones to listen to the same or different 
content all in sync. There is also x10 integration (playback controls 
and amp power controls) as well as a simply alarm clock function. The 
code is rough but the system works very well and is pretty simple to 
use. I have finally gotten around to at least documenting the code 
somewhat and GPL'ing it.


I have no real plans at the moment to redo/revamp/cleanup the code as 
everything works well, but I would like to share it in case someone else 
wants to use it. The pulseaudio site does not appear to have a place for 
doing such a thing. What would you all recommend?


Thanks,
Matt


___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Sending audio from source to multiple sinks dynamically

2009-06-17 Thread Matthew Patterson
I will try and write something up in plain text and then we can decide 
where it is best to place it. Is it possible to get a git tree to dump 
the code in? My code is a very rough proof of concept in that it is 
poorly written and not extensible, BUT it works really well. I would 
love to have the time/help to clean it up with some proper development 
standards (I'm a C/C++/C# coder, I don't even know what the proper 
standards are for python/php :) ) !


Matt


Colin Guthrie wrote:
'Twas brillig, and Matthew Patterson at 16/06/09 04:09 did gyre and 
gimble:
I built exactly what you are asking for about a year ago and have 
been using it A LOT ever since. I currently have 6 zones (5 sets of 
speakers + icecast output) and 4 mpd instances. I also have a very 
rudimentary interface to allow any mpd instance to play its sound out 
of any zone (or multiple zones, synced).


I warn you the code is hacky, but perhaps with someone interested in 
the problem it could be cleaned up and turned into a proper open 
source project. It is also based on 0.9.10 and because it works so 
well (like it has NEVER crashed) I haven't ever upgraded anything 
except MPD to get replaygain support.


Email me directly if you are interested.


For a while now Matt I've been interested in creating a "Recipes" 
section on the PA website so talk about more advanced uses of PA. It 
would be great if you could write up a blog article or similar and 
then we can link it on the PA website. Or feel free to create a page 
directly on the PA website if you like!! If you don't have time, don't 
worry. I completely appreciate the effort involved in writing up these 
things :)


Col


___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Sending audio from source to multiple sinks dynamically

2009-06-15 Thread Matthew Patterson
I built exactly what you are asking for about a year ago and have been 
using it A LOT ever since. I currently have 6 zones (5 sets of speakers 
+ icecast output) and 4 mpd instances. I also have a very rudimentary 
interface to allow any mpd instance to play its sound out of any zone 
(or multiple zones, synced).


I warn you the code is hacky, but perhaps with someone interested in the 
problem it could be cleaned up and turned into a proper open source 
project. It is also based on 0.9.10 and because it works so well (like 
it has NEVER crashed) I haven't ever upgraded anything except MPD to get 
replaygain support.


Email me directly if you are interested.

Matt



Timothy J Massey wrote:

Hello!

I am trying to build your typical multi-room audio server.  I would like 
to have a single computer with e.g. 4 copies of MPD as 4 sources, and e.g. 
8 USB soundcards, creating 8 sinks.  I would like users to be able to 
select, independently, for each of the sinks the source that it is 
using--without disturbing any of the other sinks.  A single source could 
be played back by any number of sinks independently of each other, and 
each source would be able to select from any of the available sources, 
regardless of who else is using it as well.


>From what I can tell, with PA you can pick only which (single) sink a 
source is connected to.  If you pick a new sink for the source, it is 
removed from whatever sink it was using before.  And AFAICT, if you want 
to have a source play via more than one sink, the only way to do this is 
to create a virtual sink that is a combination of more than one sink.  Is 
this correct?  It's not really practical to create a virtual sink for each 
of the possible combinations of e.g. 8 different sinks...


I'm looking for a more flexible structure.  I would like to be able to 
connect a sink to a source, and leave whatever other sinks that might 
already be playing from that source *alone*.  For example, if I'm 
listening to MPD#1 in the living room, and I start moving between the 
living room and the kitchen, I want to be able to select MPD#1 in the 
kitchen *and* leave it undisturbed in the living room.  Then, if someone 
moves into the living room and switches it to MPD#2, I want my playback in 
the kitchen undisturbed.


What I'm describing is a very typical bus setup that any higher-end 
multi-zone audio (or mixing board) would support.  Each output can 
independently connect to one of a number of available sources without 
affecting any of the other output channels.  The sources don't care which 
channels (if any) are connecting to them, and the sinks don't care what 
the other channels are doing.


I apologize in advance if this is a FAQ:  I'm very willing to RTFM--just 
please tell me which FM to R!  :)  I am open to any suggestions how I 
might be able to accomplish this, including both different Linux 
distributions and different sound management layers (i.e. would Jack be 
better for this?).


Thank you,

Tim Massey

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
  

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] module-remap-sink question

2009-01-16 Thread Matthew Patterson
I'm glad I could help! That bug (feature for most people :) ) bothered 
me for quite a while too.

Matt


Jan Kasprzak wrote:
> Jan Kasprzak wrote:
> : 
> : > I seem to remember (I had this problem before) that pulseaudio by default
> : > applies mixing to a greater than stereo card if a stereo sample is sent
> : > to it. At the time there was a flag or option in the config file that
> : > could be set, but since I didn't end up going that route I don't have
> : > it anymore. I believe it was Lennart who gave me the hint to the issue
> : > (and might have actually fixed my specific issue in the code). This was
> : > back in 9.10, which I am still running.
> : > 
> : > Just another avenue to explore, sometimes that's all you need.
> : 
> : OK, I have found that PA inded does this (see the
> : src/pulsecore/resampler.c:calc_map_table() function).
> : Thanks!
> : 
> : It also explains my observations with special behaviour of the
> : Subwoofer/LFE channel - it is hardcoded for the LFE there).
> : It is apparently driven by the PA_RESAMPLER_NO_REMAP flag,
> : but I have to figure out where can I set this flag and whether it
> : can be done without recompiling PA.
>
>   OK, the "remix=no" on the module-remap-sink did the job.
> I have added the description of this option to the documentation at
>
> http://pulseaudio.org/wiki/Modules
>
>   Also, naming the all channels but the first two "aux0 to aux5"
> instead of "rear-left,rear-right,center,subwoofer,side-left,side-right"
> does the job, because the aux channels are not included in the default
> PA up-mixing. This is even written in the example, I don't know why did
> I overlooked it.
>
> -Yenya
>
>   
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] module-remap-sink question

2009-01-14 Thread Matthew Patterson




I seem to remember (I had this problem before) that pulseaudio by
default applies mixing to a greater than stereo card if a stereo sample
is sent to it. At the time there was a flag or option in the config
file that could be set, but since I didn't end up going that route I
don't have it anymore. I believe it was Lennart who gave me the hint to
the issue (and might have actually fixed my specific issue in the
code). This was back in 9.10, which I am still running.

Just another avenue to explore, sometimes that's all you need.

Matt


Colin Guthrie wrote:

  'Twas brillig, and Jan Kasprzak at 07/01/09 23:43 did gyre and gimble:
  
  
Colin Guthrie wrote:
: My first guess would be to check your alsa switches (alsamixer -c 0) to 
: make sure you've not got some kind of option to "mix front, rear and 
: side channels together in some magic way" turned on.

	I had that magic option in my previous mainboard, but apparently
this one does not have it (see the attached output of "amixer -D hw:0").

  
  
Bummer :s

  
  
Moreover, (as I wrote) when I move the volume slider of a single channel
of the "eightchannel" device in pavucontrol, only a single channel of
a single output jack changes the volume. So I think pulse can see
all eight channels and can control them independently.

  
  
Yeah I figured that each channel may have independent hardware volume 
control, which would have caused this kind of setup but I guess that was 
a dead end :(

I've not got any ideas on this I'm afraid but perhaps some other folks 
on the list do.

Col


(PS Your quoting marker is broken. Just about every mail client in the 
world uses > and this is used to format the output nicely in the UI 
(e.g. with colours or backgrounds etc) to make reading mails easier. If 
you can, can you please try to use a > sign for quote markers. Cheers.)


  



___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] pulseaudio over wifi

2008-06-27 Thread Matthew Patterson
2.31/64 = 0.036
10.8/1032 = 0.0104
153/16392 = 0.009

Preamble size (802.11b, assuming long) 128 bits = 16 bytes.

2.31/(64 + 16) = 0.0289
10.8/(1032 + 16) = 0.0103
153/(16392 + 16) = 0.0093

So it looks to me like there is a bit of overhead involved with smaller 
packets on your device, in general (from the 3 data points) the time per 
bit is pretty linear. So depending on how the algorithm for latency 
calculation is done the size of the packet may be a moot point. With a 
correction factor for the packet overhead and a calculation based on the 
number of bytes in the packet things should be fine. I have not looked 
at the code though, so who knows, maybe it needs some tweaking.

Also, what sort of device are you using? Sending a packet with 16K in it 
seems like you are on a pc with GigE and jumbo frames. I thought 
generally the internal MTU of networks was 1500? If the wireless device 
is not able to handle those jumbo sized frames and that is what pulse is 
sending you may have just found your problem. Wireless devices already 
have the problem of subpacketising things to large for the radios, so 
jumbo packets could well be overloading the processor/buffering 
available in your router. I know my router craps out with large volumes 
of multicast traffic, maybe yours has a different weakness :)

Matt



Russell Strong wrote:
> I have a theory about why I can't get pulse audio to work over wifi ( 
> using tunnel ), however all my attempts to test it have not worked out 
> well ( lack of understanding of the code ).
>
> Please correct any assumptions:
>
> 1. Pulseaudio uses a small packets containing timestamps to measure the 
> round trip time, i.e. the latency.
> 2. The packets used to transfer audio data are considerably larger than 
> this.
> 3. Doing some experiments with ping, I see that latency changes a lot 
> with packet size. See the difference with the 3 packet sizes below.
> 64 bytes from brain.localnet (192.168.42.3): icmp_seq=2 ttl=64 
> time=2.31 ms
> 1032 bytes from brain.localnet (192.168.42.3): icmp_seq=2 ttl=64 
> time=10.8 ms
> 16392 bytes from brain.localnet (192.168.42.3): icmp_seq=1 ttl=64 
> time=153 ms
>
>  From this, I conclude that the measurement of latency, using a small 
> packet, will not indicate the real latency.
>
> To test this I tried to attach a dummy payload to the latency 
> measurement packets, but I keep getting protocol errors where my client 
> get kicked.
>
> Ultimately I'd like to try piggybacking the latency measurements onto 
> the actual audio data transfers, keep a history from which I can 
> calculate the mean and standard deviation, then set the latency to mean 
> + 3*stddev.  However, that is beyond my knowledge of the code, so far.
>
> Here is a patch showing how I tried to beef up the size of the latency 
> measurement packet.  Can anyone tell me where I've gone wrong?
>
> diff -ur ../pulseaudio-0.9.10/src/pulse/stream.c ./src/pulse/stream.c
> --- ../pulseaudio-0.9.10/src/pulse/stream.c2008-03-28 
> 09:29:27.0 +1000
> +++ ./src/pulse/stream.c2008-06-26 11:53:07.0 +1000
> @@ -1140,6 +1140,7 @@
>  pa_tagstruct *t;
>  struct timeval now;
>  int cidx = 0;
> +static uint8_t typical_payload[16384] = {0};
>  
>  pa_assert(s);
>  pa_assert(PA_REFCNT_VALUE(s) >= 1);
> @@ -1162,6 +1163,7 @@
>  &tag);
>  pa_tagstruct_putu32(t, s->channel);
>  pa_tagstruct_put_timeval(t, pa_gettimeofday(&now));
> +pa_tagstruct_put_arbitrary(t, typical_payload);
>  
>  pa_pstream_send_tagstruct(s->context->pstream, t);
>  pa_pdispatch_register_reply(s->context->pdispatch, tag, 
> DEFAULT_TIMEOUT, stream_get_timing_info_callback, pa_operation_ref(o), 
> (pa_free_cb_t) pa_operation_unref);
>
>
>
> Russell Strong
> ___
> pulseaudio-discuss mailing list
> pulseaudio-discuss@mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>   
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] darkice/icecast issue

2008-06-25 Thread Matthew Patterson

Ok, I did a bit more investigating and have a solution:

gst-launch-0.10 pulsesrc device=p2.monitor ! 
audio/x-raw-int,rate=44100,depth=16 ! audioconvert ! vorbisenc ! oggmux 
! shout2send ip=127.0.0.1 port=8000 password=network mount=stream.ogg


I needed to specify the format of content coming out of the pulsesrc. 
Now everything works fine. I will say that the cpu usage is quite a bit 
higher with this solution than just having mpd stream straight to the 
shout server, and there is the annoyance that when the stream 
corks/pauses gst-launch exits.


I'm going to play with this more since I would like this to be an extra 
zone for playback.


Thanks for your help Colin.

Matt


Colin Guthrie wrote:

Matthew Patterson wrote:
  

Colin,

I finally got around to trying this technique of sending audio out to a 
shout server. Everything appears to work right from the start. 
gst-launch starts up, the stream appears on my shoutcast server, etc. 
But when I connect to the stream it contains nothing but silence. And 
even more odd is that vlc says the stream is mono when the source 
monitor is definitely stereo. I dug a little deeper with the pulseaudio 
manager and sure enough monitor source is producing stereo and there is 
sound going through it (volume monitor) but the outgoing recording 
stream sets up as mono??? This is the exact line I'm using:


gst-launch-0.10 pulsesrc device=zone5.monitor ! audioconvert ! vorbisenc 
! oggmux ! shout2send ip=127.0.0.1 port=8000 password= mount=stream.ogg


Any ideas?



Well not really TBH. I don't actually use it myself (I just get my 
curiosity piqued easily!)


I'd try replacing the shout2send part of the pipeline with another 
"thingy" (I don't know the term!) perhaps filesink? Slap it to a .ogg 
file and make sure it's OK if it's not then I guess it some other 
part of the pipeline and you can perhaps fiddle with it a bit to try and 
work out what's going on...


Col

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] darkice/icecast issue

2008-06-25 Thread Matthew Patterson

Colin,

I finally got around to trying this technique of sending audio out to a 
shout server. Everything appears to work right from the start. 
gst-launch starts up, the stream appears on my shoutcast server, etc. 
But when I connect to the stream it contains nothing but silence. And 
even more odd is that vlc says the stream is mono when the source 
monitor is definitely stereo. I dug a little deeper with the pulseaudio 
manager and sure enough monitor source is producing stereo and there is 
sound going through it (volume monitor) but the outgoing recording 
stream sets up as mono??? This is the exact line I'm using:


gst-launch-0.10 pulsesrc device=zone5.monitor ! audioconvert ! vorbisenc 
! oggmux ! shout2send ip=127.0.0.1 port=8000 password= mount=stream.ogg


Any ideas?

Matt


Colin Guthrie wrote:

Sebastian Wieseler wrote:
  

Hello guys.

I've got a question about darkice/icecast together with pulseaudio.
How do they work together?

The only result of Google was:
gst-launch-0.10 pulsesrc
device=alsa_output.pci_8086_27d8_alsa_playback_0.monitor ! audioconvert
  ! vorbisenc ! oggmux ! shout2send ip=example.com port=8000
password=hackme mount=stream.ogg 



But
# gst-launch-0.10 pulsesrc
	ERROR: pipeline could not be constructed: no element "pulsesrc". 
failed for me. :-/



In that case, you do not have the gst-pulse package installed.

It may not be called that in your distro... We call it 
gstreamer0.10-pulse in Mandriva for example.


gst-pulse used to be packaged separately 
(http://0pointer.de/lennart/projects/gst-pulse) but is has recently been 
promoted to being included in the default gst-plugins-good 
(http://gstreamer.freedesktop.org/modules/gst-plugins-good.html)


HTHs

Col

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] External Volume Controls

2008-06-24 Thread Matthew Patterson
I can't really help much with the problem, but I thought I would toss in 
a little bit of knowledge. I asked the list about volume control 
range/linearity a few weeks ago because I thought it was software based. 
Lennart replied that whenever possible pulse uses the hardware control 
built into the sound device. Thus you should get better volume control 
than you were thinking just by using the normal controls.


I also thought I would throw in that I have spent the last few months 
assembling a whole home audio system with 5 stereo zones that used pulse 
audio plus some custom python and php code to provide a audio multiplex 
switch. I actually just finished adding the 5th zone and it all scales 
wonderfully (pulse is well built!). I don't think it is really along the 
lines of what you are looking for because all my code just talks to the 
command line interface (like pacmd) but I am perfectly happy to share code?


Colin, Lennart: Is there a place where pulse users can post their open 
source projects based on pulse? That might inspire me to clean up my 
code and make it not horrendous :)


Matt



Colin Guthrie wrote:

Hi,

Jerome Haltom wrote:
  

So the question is has anybody done anything like this? If so, what did
you end up with? Does any existing code exist for something like this?



Not sure to be honest.

  

If not, what pointers do ya'll suggest I use to accomplish it? At most I
am sort of thinking that I'd have to develop a PulseAudio module which
would expose a virtual sink for each real sink, somehow having the
volume adjustment stuff actually manipulate the amp.



Yeah that's probably the right approach. I'm not 100% sure, but I'd 
imagine module-remap-sink would be a good place to start. It just remaps 
channel of an existing sink so I think it would be a good template. I've 
not actually looked at the code tho', so someone more faimilar please 
pipe up if you know better.


You'd probably just have catch the volume control messages in 
sink_process_msg() and do your magic, and pass everything else on to the 
real underlying sink.


  

Perhaps software for virtual sinks already exists, where you can map
channels from one sink to another sink, and do silly stuff like callouts
to external applications for volume adjustment, and I could just wire
that up. Sort of doubt it, though.



Certainly the first part yeah - module-remap-sink :)

AFAIK it can't do callouts for other stuff - you'd have to write that 
in. It would be nicer if it was all self contained tho', shelling out is 
pretty nasty - you'd want some form of non-blocking asynchronous comms 
going on rather than waiting for an external app. I'd say that's more or 
less a requirement. Remap sink would seem to piggy back on to the thread 
of the underlying sink, so if you had no option but to shell out you'll 
have to create a new thread for this with an async message queue (or 
two?) to tell that thread what you want it to do (and to feed back). 
It's all a bit of a headfuk at first (I still don't get it fully!) as 
you have to constantly think about keeping things lock free and 
zero-copy! (tho' the latter shouldn't affect you).


PA.org is down right now as are Lennart's other sites... I guess he has 
some issues right now. I'd point you at the wiki if it was up.


The code for remap-sink can be seen in the meantime on my clone here:
http://colin.guthr.ie/git/pulseaudio/tree/src/modules/module-remap-sink.c

Hope this helps (and is vaguely correct!)


Col

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Sink volume linearity

2008-06-15 Thread Matthew Patterson
Thanks for the info Lennart. I assumed it had to be something hardware 
because a software control wouldn't work too well, just end up loosing 
information.


I just got a new sound card, so I will play around and see if things are 
different.


Matt


Lennart Poettering wrote:

On Wed, 04.06.08 21:14, Matthew Patterson ([EMAIL PROTECTED]) wrote:

  

Hello everyone,

I have been playing around with the volume control on my whole home 
audio system trying to make it nonlinear so we are able to fine tune the 
volumes we listen at most. Unfortunately it appears that the sink volume 
controls do not allow enough range (I think this would be dynamic range 
in audio terms). Basically, if I set the system up so 100% volume is as 
loud as I want things to go, 1% is not quiet enough. I have tried 
setting the sink volumes using pacmd where the range of volumes is 
1-65535. A value of 0 is muted, but 1 is quite loud.


Any thoughts/experiences on this?

I'm contemplating setting both the stream and sink volumes so I can have 
more granularity of control.



PA tries to use the sound card volume control if possible. However
most sound cards only a allow a limited range of volume control. With
many sound cards the lower volume boundary does not result in total
silence. 


I will eventually add support to PA that we can extend the volume
range to the same dB range on all machines, regardless of what the
hardware provides. We can do this if ALSA exports dB information to us.

Of course, each sound card as a maximum gain for the output. We cannot
go higher than this, regardless whatever we try, unless we resort to
dirty stuff like doing the amplification in software, which is most
likely not what you want on 16 bit audio.

May be some of the auxiliary controls of your sound card mixer also
influence the final volume of your audio? You might want to play
around with your ALSA mixer with alsamixer -c0.

Lennart

  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] remap-sink reproduces sound on more than the target channels

2008-06-13 Thread Matthew Patterson
Ok, fixed. The issue was indeed the remixing, but oddly I could not 
disable it by setting the value in /etc/pulse/daemon.conf. I do not have 
a daemon.conf in my ~/.pulse/ folder, but it still wouldn't read the 
global one. When I copied the file into my profile it worked fine and 
everything was good.


I also tried the route specified in the wiki where I made all the 
channels in the channel map "aux0", etc. This did indeed prevent the 
remixing, but certainly didn't have the desired effect. When I did this 
all my outputs for all remapped sinks output from the side-right 
speaker? I have no idea why this is, but it is just another data point.


I now have up to 8 zones in my whole home audio matrix switch. We'll see 
how my design scales. I'll let you all know.


Thanks for your help Tanu!

Matt



Tanu Kaskinen wrote:

On Thu, Jun 12, 2008 at 11:01:45AM -0700, Matt Patterson wrote:
  

Is that what I was seeing during my startup process:

D: resampler.c: Channel matrix:
D: resampler.c:I00   I01
D: resampler.c: +
D: resampler.c: O00 | 1.000 0.000
D: resampler.c: O01 | 0.000 1.000
D: resampler.c: O02 | 1.000 0.000
D: resampler.c: O03 | 0.000 1.000
D: resampler.c: O04 | 0.500 0.500
D: resampler.c: O05 | 0.500 0.500
D: resampler.c: O06 | 1.000 0.000
D: resampler.c: O07 | 0.000 1.000



Yes, it's exactly that.

  
I thought I tried disabling the remixing in daemon.conf without  
improvement, but I will try again. If I start pulseaudio with the -C  
command to get a command line interface will the settings in daemon.conf  
take effect since I am not creating a daemon? Or is the daemon still  
created and a pacmd instance is started right after?



The daemon is created, and daemon.conf is read. Make sure
you edit the correct daemon.conf - if ~/.pulse/daemon.conf
exists, /etc/pulse/daemon.conf doesn't have any effect. Also
note that the semicolon in the beginning of the line is a
comment character, so remove it.

  
I also noticed that I can produce 2 two channel alsa sinks by pointing  
them at front:1 and rear:1. Are there equivalent values for side:1 and  
center/lfe:1? I tried side:1 without avail so that can't be it.



I don't know about that.

  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] remap-sink reproduces sound on more than the target channels

2008-06-12 Thread Matthew Patterson
I have an update on this front. I downloaded a 8 channel wave file, and 
when I play it via the 8 channel sink I get perfect channel seperation. 
If I play the same file via one of the 2 channel sinks then I get the 
sound reproduced on outputs other than what that sink is tied to BUT the 
volumes are different making me think this is some kind of virtual 
surround. Does ALSA or pulse have the ability to cause this, or is this 
basically the sound card being annoying?

Matt



Matthew Patterson wrote:
> Hello all,
>
> Today I got a new sound card (Diamon XtremeSound 7.1, CMI8768 chip) so 
> that I could have more zones in my whole home audio system. I started by 
> installing the card and running "speaker-test" on it to validate that 
> all the outputs work, which they do. I then updated my pulseaudio config:
>
> load-module module-alsa-sink device_id=1 channels=8 sink_name=xtreme
>
> for the new card, and added a bunch of remapped sinks which serve as the 
> various playback zones:
>
> load-module module-remap-sink sink_name=zone1 master=xtreme channels=2 
> channel_map=front-left,front-right master_channel_map=front-left,front-right
> load-module module-remap-sink sink_name=zone2 master=xtreme channels=2 
> channel_map=front-left,front-right master_channel_map=rear-left,rear-right
> load-module module-remap-sink sink_name=zone3 master=xtreme channels=2 
> channel_map=front-left,front-right master_channel_map=front-center,lfe
> load-module module-remap-sink sink_name=zone4 master=xtreme channels=2 
> channel_map=front-left,front-right master_channel_map=side-left,side-right
>
> So now I would think that I could play sound out of zone1 and I would 
> only hear sound out of the front speakers, but alas this is not the 
> case. This is what I get:
>
> Play through zone1:
> All speakers play sound
>
> Play through zone2:
> All speakers play sound
>
> Play through zone3:
> front-center,lfe,side-left,side-right play sound
>
> Play through zone4:
> front-center,lfe,side-left,side-right play sound
>
>
> Does this make sense to anyone? Here is what pulse spews when I start it 
> with verbose output and my config file:
>
> pulseaudio -n -C -F config.pa -vv
> I: main.c: We're in the group 'pulse-rt', allowing real-time and 
> high-priority scheduling.
> I: core-util.c: Successfully gained nice level -11.
> W: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
> W: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
> I: main.c: This is PulseAudio 0.9.10
> I: main.c: Page size is 4096 bytes
> I: main.c: Fresh high-resolution timers available! Bon appetit!
> I: client.c: Created 0 "STDIN/STDOUT client"
> I: module.c: Loaded "module-cli" (index: #0; argument: "exit_on_eof=1").
> D: alsa-util.c: Trying surround71:1...
> I: module-alsa-sink.c: Successfully opened device surround71:1.
> I: module-alsa-sink.c: Successfully enabled mmap() mode.
> ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL surround71:1
> I: alsa-util.c: Unable to attach to mixer surround71:1: No such file or 
> directory
> I: alsa-util.c: Successfully attached to mixer 'hw:1'
> I: alsa-util.c: Using mixer control "Master".
> I: sink.c: Created sink 0 "xtreme" with sample spec "s16le 8ch 44100Hz"
> I: source.c: Created source 0 "xtreme.monitor" with sample spec "s16le 
> 8ch 44100Hz"
> I: module-alsa-sink.c: Using 3 fragments of size 17632 bytes.
> I: alsa-util.c: ALSA device lacks separate volumes control for channel 
> 'rear-left', falling back to software volume control.
> D: module-alsa-sink.c: Thread starting up
> D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+29
> I: module-alsa-sink.c: Starting playback.
> I: module.c: Loaded "module-alsa-sink" (index: #1; argument: 
> "device_id=1 channels=8 sink_name=xtreme").
> I: sink.c: Created sink 1 "zone1" with sample spec "s16le 2ch 44100Hz"
> I: source.c: Created source 1 "zone1.monitor" with sample spec "s16le 
> 2ch 44100Hz"
> I: resampler.c: Forcing resampler 'copy', because of fixed, identical 
> sample rates.
> D: resampler.c: Channel matrix:
> D: resampler.c:I00   I01
> D: resampler.c: +
> D: resampler.c: O00 | 1.000 0.000
> D: resampler.c: O01 | 0.000 1.000
> D: resampler.c: O02 | 1.000 0.000
> D: resampler.c: O03 | 0.000 1.000
> D: resampler.c: O04 | 0.500 0.500
> D: resampler.c: O05 | 0.500 0.500
> D: resampler.c: O06 | 1.000 0.000
> D: resampler.c: O07 | 0.000 1.000
> I: resampler.c: Using resampler 'copy'
> I: resampler.c: Using s16le as work

[pulseaudio-discuss] remap-sink reproduces sound on more than the target channels

2008-06-12 Thread Matthew Patterson
Hello all,

Today I got a new sound card (Diamon XtremeSound 7.1, CMI8768 chip) so 
that I could have more zones in my whole home audio system. I started by 
installing the card and running "speaker-test" on it to validate that 
all the outputs work, which they do. I then updated my pulseaudio config:

load-module module-alsa-sink device_id=1 channels=8 sink_name=xtreme

for the new card, and added a bunch of remapped sinks which serve as the 
various playback zones:

load-module module-remap-sink sink_name=zone1 master=xtreme channels=2 
channel_map=front-left,front-right master_channel_map=front-left,front-right
load-module module-remap-sink sink_name=zone2 master=xtreme channels=2 
channel_map=front-left,front-right master_channel_map=rear-left,rear-right
load-module module-remap-sink sink_name=zone3 master=xtreme channels=2 
channel_map=front-left,front-right master_channel_map=front-center,lfe
load-module module-remap-sink sink_name=zone4 master=xtreme channels=2 
channel_map=front-left,front-right master_channel_map=side-left,side-right

So now I would think that I could play sound out of zone1 and I would 
only hear sound out of the front speakers, but alas this is not the 
case. This is what I get:

Play through zone1:
All speakers play sound

Play through zone2:
All speakers play sound

Play through zone3:
front-center,lfe,side-left,side-right play sound

Play through zone4:
front-center,lfe,side-left,side-right play sound


Does this make sense to anyone? Here is what pulse spews when I start it 
with verbose output and my config file:

pulseaudio -n -C -F config.pa -vv
I: main.c: We're in the group 'pulse-rt', allowing real-time and 
high-priority scheduling.
I: core-util.c: Successfully gained nice level -11.
W: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
W: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
I: main.c: This is PulseAudio 0.9.10
I: main.c: Page size is 4096 bytes
I: main.c: Fresh high-resolution timers available! Bon appetit!
I: client.c: Created 0 "STDIN/STDOUT client"
I: module.c: Loaded "module-cli" (index: #0; argument: "exit_on_eof=1").
D: alsa-util.c: Trying surround71:1...
I: module-alsa-sink.c: Successfully opened device surround71:1.
I: module-alsa-sink.c: Successfully enabled mmap() mode.
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL surround71:1
I: alsa-util.c: Unable to attach to mixer surround71:1: No such file or 
directory
I: alsa-util.c: Successfully attached to mixer 'hw:1'
I: alsa-util.c: Using mixer control "Master".
I: sink.c: Created sink 0 "xtreme" with sample spec "s16le 8ch 44100Hz"
I: source.c: Created source 0 "xtreme.monitor" with sample spec "s16le 
8ch 44100Hz"
I: module-alsa-sink.c: Using 3 fragments of size 17632 bytes.
I: alsa-util.c: ALSA device lacks separate volumes control for channel 
'rear-left', falling back to software volume control.
D: module-alsa-sink.c: Thread starting up
D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+29
I: module-alsa-sink.c: Starting playback.
I: module.c: Loaded "module-alsa-sink" (index: #1; argument: 
"device_id=1 channels=8 sink_name=xtreme").
I: sink.c: Created sink 1 "zone1" with sample spec "s16le 2ch 44100Hz"
I: source.c: Created source 1 "zone1.monitor" with sample spec "s16le 
2ch 44100Hz"
I: resampler.c: Forcing resampler 'copy', because of fixed, identical 
sample rates.
D: resampler.c: Channel matrix:
D: resampler.c:I00   I01
D: resampler.c: +
D: resampler.c: O00 | 1.000 0.000
D: resampler.c: O01 | 0.000 1.000
D: resampler.c: O02 | 1.000 0.000
D: resampler.c: O03 | 0.000 1.000
D: resampler.c: O04 | 0.500 0.500
D: resampler.c: O05 | 0.500 0.500
D: resampler.c: O06 | 1.000 0.000
D: resampler.c: O07 | 0.000 1.000
I: resampler.c: Using resampler 'copy'
I: resampler.c: Using s16le as working format.
I: sink-input.c: Created input 0 "Remapped Stream" on xtreme with sample 
spec s16le 2ch 44100Hz and channel map front-left,front-right
I: module.c: Loaded "module-remap-sink" (index: #2; argument: 
"sink_name=zone1 master=xtreme channels=2 
channel_map=front-left,front-right 
master_channel_map=front-left,front-right").
I: sink.c: Created sink 2 "zone2" with sample spec "s16le 2ch 44100Hz"
I: source.c: Created source 2 "zone2.monitor" with sample spec "s16le 
2ch 44100Hz"
I: resampler.c: Forcing resampler 'copy', because of fixed, identical 
sample rates.
D: resampler.c: Channel matrix:
D: resampler.c:I00   I01
D: resampler.c: +
D: resampler.c: O00 | 1.000 0.000
D: resampler.c: O01 | 0.000 1.000
D: resampler.c: O02 | 1.000 0.000
D: resampler.c: O03 | 0.000 1.000
D: resampler.c: O04 | 0.500 0.500
D: resampler.c: O05 | 0.500 0.500
D: resampler.c: O06 | 1.000 0.000
D: resampler.c: O07 | 0.000 1.000
I: resampler.c: Using resampler 'copy'
I: resampler.c: Using s16le as working format.
I: sink-input.c: Created input 1 "Remapped Stream" on xtreme with sample 
spec s16le 2ch 44100Hz and channel map rear-l

[pulseaudio-discuss] Sink volume linearity

2008-06-04 Thread Matthew Patterson
Hello everyone,

I have been playing around with the volume control on my whole home 
audio system trying to make it nonlinear so we are able to fine tune the 
volumes we listen at most. Unfortunately it appears that the sink volume 
controls do not allow enough range (I think this would be dynamic range 
in audio terms). Basically, if I set the system up so 100% volume is as 
loud as I want things to go, 1% is not quiet enough. I have tried 
setting the sink volumes using pacmd where the range of volumes is 
1-65535. A value of 0 is muted, but 1 is quite loud.

Any thoughts/experiences on this?

I'm contemplating setting both the stream and sink volumes so I can have 
more granularity of control.

Matt

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] Shoutcast/Icecast sink for pulseaudio

2008-05-08 Thread Matthew Patterson
Hey everyone,

In my quest to further expand my whole home audio solution I was 
thinking about the options for piping the music to non pulse supporting 
devices like my internet tablet and cell phones. Right now I stream to 
these devices simply by giving them playlists that target my webserver, 
but I have tried in the past icecast2. This has the added benefit of 
normalizing the stream bitrate for the lower bandwidth of the cell phone 
(and is essential now that I am moving to flac as my primary format).

Has anybody worked on a solution for pulseaudio -> shoutcast/icecast? I 
realize icecast only takes mp3/ogg streams, so the raw pcm data would 
have to be piped through an encoder on the fly, then shipped to the 
icecast server. I also realize synchronization would be lost, but 
wouldn't this be a cool addition!

Any ideas?

Matt


___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] rtp-send questions

2008-04-19 Thread Matthew Patterson
Otherwise wouldn't you have problems maintaining sync and buffering on 
the network? "Muted" just means silent PCM audio, not that no audio 
flows. One could probably implement "silence compression" such that a 
minimal timing stream flowed during mute periods, but that sounds like a 
lower priority issue, and they tend to get cut :)


Matt



Jim Duda wrote:
I think I understand #2.  I believe all behave the same, the fact that I 
have multiple systems sending RTP was causing confusion.


The only real question is:

Is is unreasonable to expect the RTP traffic to be silent when an RTP 
source is muted?


Jim

Jim Duda wrote:
  

I have 4 linux machines on my local network using pulse audio.
All of which are running pulseaudio 0.9.8.

Each has rtp-send and rtp-recv installed.
By default, each rtp-send is muted.

Question #1:  rtp-send mute

When rtp-send is muted, I expect that no rtp traffic will be sent.
Is this a correct assumption?

This doesn't appear true, and I am surprised by this.   I have one 
machine with a combined-sink, with one out being rtp-send.  When playing 
any audio to this combined-sink, I get a constant stream of network 
bandwidth on the order of 192K bytes/second.  When I stop the audio, the 
network bandwidth goes down into the noise level.


The default.pa for this machine is:

This machine is a server which runs with --system mode.

load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
load-module module-hal-detect
load-module module-cli-protocol-tcp
load-module module-http-protocol-tcp
load-module module-esound-protocol-unix
load-module module-native-protocol-unix auth-anonymous=1
load-module module-native-protocol-tcp auth-anonymous=1
load-module module-zeroconf-publish
load-module module-null-sink sink_name=sphinx_record description="Sphinx 
Recording Source"
load-module module-null-sink sink_name=sphinx_playback 
description="Sphinx Playback Source"

load-module module-rtp-recv
load-module module-null-sink sink_name=rtp format=s16le channels=2 
rate=44100 description="RTP Multicast Sink"

load-module module-rtp-send source=rtp.monitor
load-module module-combine sink_name=combined 
master=alsa_output.pci_1274_5880_alsa_playback_0 
slaves=alsa_output.pci_8086_24d5_alsa_playback_0,rtp,sphinx_playback

load-module module-volume-restore
load-module module-default-device-restore
load-module module-rescue-streams
load-module module-suspend-on-idle
load-module module-gconf
set-default-sink combined
set-default-source alsa_input.pci_1274_5880_alsa_capture_0
set-sink-mute rtp 1

Question #2: one machine acts different

One machine appears to be sending rtp traffic when rtp-send is 
included., even when no audio is playing.  When this one machine has 
rtp-send installed, and muted, and no audio is plaing, I see a constant 
stream of network traffic on the order of 192K bytes/second.


This machine is a standard desktop which doesn't run with --system

What could be causing this condition, independent of question #1 above?

I have confirmed that no streams are playing on this machine, but yet, I 
see the 192K bytes of traffic.  The traffic comes and goes as a function 
of including rtp-send on this machine.


The default.pa for this machine is:

load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
load-module module-hal-detect
load-module module-esound-protocol-unix
load-module module-native-protocol-unix auth-anonymous=1
load-module module-native-protocol-tcp auth-anonymous=1
load-module module-http-protocol-tcp
load-module module-zeroconf-publish
load-module module-null-sink sink_name=rtp format=s16le channels=2 
rate=44100 description="RTP Multicast Sink"

load-module module-rtp-send source=rtp.monitor
load-module module-rtp-recv
load-module module-volume-restore
load-module module-default-device-restore
load-module module-rescue-streams
load-module module-suspend-on-idle
load-module module-x11-publish
load-module module-gconf
set-sink-mute rtp 1

Thanks for any insight.

Jim



___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] rtp-send questions

2008-04-19 Thread Matthew Patterson
I have no good ideas for question 2. I have seen the same behavior for 
question 1.

Matt


Jim Duda wrote:
> I have 4 linux machines on my local network using pulse audio.
> All of which are running pulseaudio 0.9.8.
>
> Each has rtp-send and rtp-recv installed.
> By default, each rtp-send is muted.
>
> Question #1:  rtp-send mute
>
> When rtp-send is muted, I expect that no rtp traffic will be sent.
> Is this a correct assumption?
>
> This doesn't appear true, and I am surprised by this.   I have one 
> machine with a combined-sink, with one out being rtp-send.  When playing 
> any audio to this combined-sink, I get a constant stream of network 
> bandwidth on the order of 192K bytes/second.  When I stop the audio, the 
> network bandwidth goes down into the noise level.
>
> The default.pa for this machine is:
>
> This machine is a server which runs with --system mode.
>
> load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
> load-module module-hal-detect
> load-module module-cli-protocol-tcp
> load-module module-http-protocol-tcp
> load-module module-esound-protocol-unix
> load-module module-native-protocol-unix auth-anonymous=1
> load-module module-native-protocol-tcp auth-anonymous=1
> load-module module-zeroconf-publish
> load-module module-null-sink sink_name=sphinx_record description="Sphinx 
> Recording Source"
> load-module module-null-sink sink_name=sphinx_playback 
> description="Sphinx Playback Source"
> load-module module-rtp-recv
> load-module module-null-sink sink_name=rtp format=s16le channels=2 
> rate=44100 description="RTP Multicast Sink"
> load-module module-rtp-send source=rtp.monitor
> load-module module-combine sink_name=combined 
> master=alsa_output.pci_1274_5880_alsa_playback_0 
> slaves=alsa_output.pci_8086_24d5_alsa_playback_0,rtp,sphinx_playback
> load-module module-volume-restore
> load-module module-default-device-restore
> load-module module-rescue-streams
> load-module module-suspend-on-idle
> load-module module-gconf
> set-default-sink combined
> set-default-source alsa_input.pci_1274_5880_alsa_capture_0
> set-sink-mute rtp 1
>
> Question #2: one machine acts different
>
> One machine appears to be sending rtp traffic when rtp-send is 
> included., even when no audio is playing.  When this one machine has 
> rtp-send installed, and muted, and no audio is plaing, I see a constant 
> stream of network traffic on the order of 192K bytes/second.
>
> This machine is a standard desktop which doesn't run with --system
>
> What could be causing this condition, independent of question #1 above?
>
> I have confirmed that no streams are playing on this machine, but yet, I 
> see the 192K bytes of traffic.  The traffic comes and goes as a function 
> of including rtp-send on this machine.
>
> The default.pa for this machine is:
>
> load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
> load-module module-hal-detect
> load-module module-esound-protocol-unix
> load-module module-native-protocol-unix auth-anonymous=1
> load-module module-native-protocol-tcp auth-anonymous=1
> load-module module-http-protocol-tcp
> load-module module-zeroconf-publish
> load-module module-null-sink sink_name=rtp format=s16le channels=2 
> rate=44100 description="RTP Multicast Sink"
> load-module module-rtp-send source=rtp.monitor
> load-module module-rtp-recv
> load-module module-volume-restore
> load-module module-default-device-restore
> load-module module-rescue-streams
> load-module module-suspend-on-idle
> load-module module-x11-publish
> load-module module-gconf
> set-sink-mute rtp 1
>
> Thanks for any insight.
>
> Jim
>
> ___
> pulseaudio-discuss mailing list
> pulseaudio-discuss@mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>   
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Network Audio with Pulse

2008-04-08 Thread Matthew Patterson
I'm sorry, I think I mispoke in the last email, I meant combine sink. 
Here's some sample config:


When simulating my matrix switch idea, before I got the multiple sound 
cards I used remap to make it seem like I had 4 stereo sound cards. You 
can use this same idea to make one 6 channel card appear as 3 stereo cards:


# remap things so it seems like we have 4 stereo zones
load-module module-remap-sink sink_name=zone1 
master=alsa_output.pci_8086_2668_alsa_playback_0 channels=2 
master_channel_map=front-left,front-right channel_map=front-left,front-right
load-module module-remap-sink sink_name=zone2 
master=alsa_output.pci_8086_2668_alsa_playback_0 channels=2 
master_channel_map=front-left,front-right channel_map=front-left,front-right
load-module module-remap-sink sink_name=zone3 
master=alsa_output.pci_8086_2668_alsa_playback_0 channels=2 
master_channel_map=front-left,front-right channel_map=front-left,front-right
load-module module-remap-sink sink_name=zone4 
master=alsa_output.pci_8086_2668_alsa_playback_0 channels=2 
master_channel_map=front-left,front-right channel_map=front-left,front-right


Then I used the combine module to join all the zones together 4 times so 
there would be four inputs per zone, which can be muted to control what 
is heard:


# we leave only one of the outputs unmuted at startup, that is our 
player selection
load-module module-combine sink_name=p1 master=zone1 
slaves=zone2,zone3,zone4

#set-sink-input-mute 4 1
set-sink-input-mute 5 1
set-sink-input-mute 6 1
set-sink-input-mute 7 1
load-module module-combine sink_name=p2 master=zone1 
slaves=zone2,zone3,zone4

set-sink-input-mute 8 1
#set-sink-input-mute 9 1
set-sink-input-mute 10 1
set-sink-input-mute 11 1
load-module module-combine sink_name=p3 master=zone1 
slaves=zone2,zone3,zone4

set-sink-input-mute 12 1
set-sink-input-mute 13 1
#set-sink-input-mute 14 1
set-sink-input-mute 15 1
load-module module-combine sink_name=p4 master=zone1 
slaves=zone2,zone3,zone4

set-sink-input-mute 16 1
set-sink-input-mute 17 1
set-sink-input-mute 18 1
#set-sink-input-mute 19 1

Does that help?

Matt




Jim Duda wrote:

Matt,
 
I don't understand how the remap_sink module helps (or works for that 
matter).  I'm having trouble getting my head around the inputs and 
outputs of this module.
 
Would you mind posting an example of how you use remap_sink?
 
Thanks,
 
Jim
 


"Matt Patterson" <[EMAIL PROTECTED] > wrote
in message news:[EMAIL PROTECTED]
Yeah, sounds like you have the rtp thing. I assume you realize you
can have multiple multicast addresses so there can be simultaneous
streams that don't collide/get mixed.

I don't think there is a way you can avoid the mesh (multicast is
basically a mesh, just for free) unless you designate a server
machine. In which case you could set up a single tunnel sink to
each client machine and then have all the switching happen on that
machine. I use the remap module to split each sink into 4 inputs
(could be a tunnel sink), then connect each input to a different
mpd instance, and control what is heard out each device by muting
3 of the 4 inputs. I end up with 16 remapped sinks in this case (4
output devices * 4 remapped sinks each). I will be adding a 5th
zone to my whole home audio soon, so that will make it 25. The 16
sinks/streams seems to cause no undue load on the system (Core 2
Duo 2180), we'll see how 25 does :)

I haven't played with the tunnel sink module.

Matt


Jim Duda wrote:

Matt,

Thanks for the feedback.

I understand your point about using the command line interface module. 
I actually would end up using the socket approach from perl once I had 
it all working properly.


I believe I understand how the rtp approach would work. I think what you 
are doing is as follows.  All stream senders would send on the rtp_send 
side, connecting the rtp_send.monitor to the default alsa sink (for 
local sound).  All other machines would have an rtp_recv, and send the 
output of rtp_recv to the default alsa sink.  Each of these rtp_recv 
would be muted by default.  If machine B wants to join in, machine B 
would unmute it's rtp_recv and thereby get the stream.  Do I have a 
basic understanding of how this approach would work?  I have played with 
this to some degree, so I think I understand.


I assume using the tunnels would work in a similar fashion.  However, 
you need to build a mesh of tunnel connections.  In my case, with 4 
nodes, the mesh is 3 tunnels for each mode, 4*3=12 tunnels in total. 
Each receiving node would then mute each tunnel by default, turning on 
the one it wants.  The annoying part of this approach is that you have 
to decide which source you want to connect to, whereas, with the rtp 
approach, you simply join the "collective".


I have played with the combined_sinks somewhat too.  Ho

Re: [pulseaudio-discuss] [ANNOUNCE] PulseAudio 0.9.10

2008-04-01 Thread Matthew Patterson
On my ubuntu 7.10 machine this translated into installing libcap-dev. 
Unfortunately I also had to do a ./configure and fresh make to have the 
change take effect. Then it compiled cleanly.


Now to install and configure it!

Matt


Lennart Poettering wrote:

On Tue, 01.04.08 14:27, Wouter de Geus ([EMAIL PROTECTED]) wrote:

  

Hej,

Just trying to compile the 0.9.10 release on several machines.
Works fine for my headless server, but on my workstation running 
slackware-current
I ran into this error:

gcc -DHAVE_CONFIG_H -I. -I..-I../src -I../src/modules -I../src/modules/rtp -I../src/modules/gconf -pthread 
-D_POSIX_PTHREAD_SEMANTICS-DPA_DLSEARCHPATH=\"/usr/lib/pulse-0.9/modules/\" 
-DPA_DEFAULT_CONFIG_DIR=\"/etc/pulse\" -DPA_BINARY=\"/usr/bin/pulseaudio\" 
-DPA_SYSTEM_RUNTIME_PATH=\"/var/run/pulse\" -DAO_REQUIRE_CAS '-DDEBUG_TRAP=__asm__("int $3")' 
-I/usr/include/liboil-0.3  -I/usr/include/liboil-0.3   -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include-g -O2 
-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal 
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels 
-Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math -MT pulseaudio-caps.o -MD -MP -MF 
.deps/pulseaudio-caps.Tpo -c -o pulseaudio-caps.o `test -f 'daemon/caps.c' || echo './'`daemon/caps.c
daemon/caps.c:134: error: conflicting types for 'pa_drop_caps'
daemon/caps.h:28: error: previous declaration of 'pa_drop_caps' was here

If I change the prototype back to a void function it compiles for me.
Is this the correct solution?



No, the correct solution is to compile PA with capability support.

Install libcaps-devel.

Lennart

  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] pavucontrol -- server selection?

2008-02-24 Thread Matthew Patterson
I believe you can just specify the environment variables and then run 
the app. So try this:

export PULSE_SERVER=xxx.xxx.xxx.xxx

Another variable option is PULSE_SINK. I forget where I found this 
little tidbit, but it works for me!

Matt



Paul Fox wrote:
> can pavucontrol be used to control the volume or streams of a
> remote server?  if so, how does one specify the server?  there's
> no usage message, and PULSE_SERVER doesn't seem to be honored.
>
> so, assuming it must be local, i still can't get it to work.  when
> i run it on the same machine as the server,  i get a "Connection
> failed:  invalid server" error.
>
> any ideas?  (i'm on ubuntu, so the version is 0.9.6)
>
> paul
> p.s.  is there more documentation planned for the pulseaudio
> utilities and commands?  honestly, a statement (quoting from
> the website) like "There is not much to say.  Just run
> pavucontrol and see for yourself." is kind of insulting to a
> user looking for help -- why have a documentation link at all? 
> even a usage message in the program saying "there are no options"
> would be more useful.
>
> =-
>  paul fox, [EMAIL PROTECTED] (arlington, ma, where it's 31.5 degrees)
> ___
> pulseaudio-discuss mailing list
> pulseaudio-discuss@mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>   
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Root ownership on /tmp/pulse-$USER (a warning to packagers)

2008-02-21 Thread Matthew Patterson
I have noticed this behavior on occasion as well. It has caused far too 
many "sudo killall -9 pulseaudio" calls!


On my system I always know because it warns about being unable to access 
my output device and then fails to run.


Which distrib's are you packaging for again?

Matt



CJ van den Berg wrote:

On Thu, Feb 21, 2008 at 12:18:46AM +, Colin Guthrie wrote:
  

Anyway, to cut a long story short, I eventually found that it was
actually libesound that was starting this process. If you run an
application as root (e.g. firestarter - a gtk firewall thingy) that used
libesound it would go through some code that checked for the existence
of /etc/esd.conf. If this file did not exist, the bahaviour is such that
the library will try to *autospawn "esd" by default*. This is in
contrast to the default esd.conf shipped with esound which has
auto_spawn=0 specified in it. Go figure!

So to fix this problem I simply ship an /etc/esd.conf with the
pulseaudio-esound-compat package. The alternative is to patch libesound
to not do the auto spawn by default thing but this seemed cleaner.

I hope this helps someone not go insane as I nearly did :)



Very good-to-know info. Thanks for saving us from taking the same
horrible journey! :-D

  



___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Controlling where module-rtp-send sends multicast packets?

2008-02-20 Thread Matthew Patterson
I just thought I would check back on this. Last night I reworked my 
control app and pulse configuration. Now I can use either rtp or the 
combine module to perform the audio matrix switching. There is 
definitely more load on the system, even when using the combine module 
with the default resampling. The syncing is definitely better than the 
rtp method, but only marginally. When I change to a better syncing alg I 
can't really test anything because my system screeches to a halt with so 
much cpu load! I am working on a slower laptop for dev so that is not 
surprising.


The important part is my router doesn't puke on all the multicast data, 
so I think I will stick with this for the moment.


In case anyone was curious, here's a snippet for my default config. I 
remap my 8 channel audio card to 4 stereo cards, naming each one a 
zone#. Then I combine everything and perform the mute adjustments from 
my python/php app.


# we leave only one of the outputs unmuted at startup, that is our 
player selection
load-module module-combine sink_name=p1 master=zone1 
slaves=zone2,zone3,zone4

#set-sink-input-mute 4 1
set-sink-input-mute 5 1
set-sink-input-mute 6 1
set-sink-input-mute 7 1
load-module module-combine sink_name=p2 master=zone1 
slaves=zone2,zone3,zone4

set-sink-input-mute 8 1
#set-sink-input-mute 9 1
set-sink-input-mute 10 1
set-sink-input-mute 11 1
load-module module-combine sink_name=p3 master=zone1 
slaves=zone2,zone3,zone4

set-sink-input-mute 12 1
set-sink-input-mute 13 1
#set-sink-input-mute 14 1
set-sink-input-mute 15 1
load-module module-combine sink_name=p4 master=zone1 
slaves=zone2,zone3,zone4

set-sink-input-mute 16 1
set-sink-input-mute 17 1
set-sink-input-mute 18 1
#set-sink-input-mute 19 1


Thanks for your help Tanu!

Matt



Tanu Kaskinen wrote:

On Fri, Feb 15, 2008 at 08:27:39AM -0800, Matt Patterson wrote:
  
I thought about this route, but the issue is I don't want interruptions  
in the rooms already listening to music. Maybe if feed all four input  
sources into split out sinks (splitting each input into 4 null-sink  
outputs in the end), I could then attach the final sound card outputs on  
demand without interruption to the other rooms listening... I'm not  
quite sure how the layout would work.


You may be on to something here! Let me look at this and do some  
investigation.



Fun little exercise! Maybe you already solved it yourself,
but if not, here's a spoiler:

Create one tunnel sink per machine. Create one combined sink
per stream, each using all four tunnels.

Now each combined sink has four streams, each going to one
tunnel. That means 16 streams (plus the 4 mpd streams). By
muting these 16 streams as needed you have full control over
what goes where, without any drop-outs.

  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Controlling where module-rtp-send sends multicast packets?

2008-02-15 Thread Matthew Patterson

Ah, where to start:

Yes, the energy costs are part of my issue here. I just got through with 
building a hi efficiency core2 duo based machine that is my always on 
ubuntu server, so that was the reason I was trying to do it all on the 
PC. I figure I have plenty of extra processor cycles, and half the 
reason that machine is up is to store/stream my media content to other 
pc's in the house and my phone and work computers. Building this machine 
has saved me $28 a month on electricity, so you get the idea what sort 
of beast I had before :)


In order to keep the signals for each room as synced as possible I was 
going to do all the outputs (4 zones) by just getting a single high end 
7.1 audio card and using the remap module to create 4 stereo outputs, 
all on the same crystal to boot! From there I thought about running line 
level wires throughout the house, but don't want to pay for the high end 
balanced leads I would need to get quality, and the girlfriend wants as 
little intrusion into each room as possible. So I figured I would put a 
rack of amps right next to my pc, control them via 12v triggering/audio 
triggering (or maybe a pc controlled power switch), and run powered 
leads through the attic/crawlspace to all the rooms. For control I was 
going to buy a few touchscreen internet tablets like the noki 810's and 
place them in each room.


I already have a super simple web interface that allows my phone to 
stream my content down, so I figured I would expand it a little to make 
control of the various zones possible and more useable on a touchscreen 
device. In the meantime though I have written the python/php piece that 
allows me to select which zone connects to which music stream, and then 
I am running 4 instances of mpd which provide the playback for the zones.


As for why I am using multicast, it is because that seemed like the only 
way I could replicate streams to more than one sink. Please fill me in 
if I'm wrong since it seemed like a little overkill. I would before a 
simple copy stream module. This allows any single room to connect to any 
other room's currently playing audio on demand.



Your project looks awesome Jon! I am wondering what your BOM cost is for 
the end units that have both processing and amplification? Also, what 
are the specs on the audio codecs/dacs used in the boards, and what are 
the performance numbers on the amp units? I am a bit of an audiophile so 
stuff like that is important to me (although the girlfriend would never 
notice). I have been buying up NHT speakers and NAD/Carver amps for this 
project. Also, what sort of device/device synchronization accuracy are 
you getting? I was going to toss the outputs of my system on my scope 
and see just how good the syncing is, I'm just curious to see how the 
truly seperate device solution plays out.



So coming at this from another angle, since some of you are obviously 
going to be spewing multicast onto your networks and your routers don't 
complain, what make models do you guys have? All I need is the basic 4 
port 10/100 switch/wireless ap/firewall box.


The on PC firewall sounds interesting, and that is what I was going for 
by changing the kernel routing tables. I would prefer something more 
elegant though. I'm not afraid of the code either. If someone gives me a 
pointer to where to look in the code, where network device binding 
happens, etc. I might be able to add a parameter or something that 
allows device selection manually.


Matt





Jon Smirl wrote:

On 2/15/08, Chris Ribe <[EMAIL PROTECTED]> wrote:
  


You can also use x86 boxes but they are more expensive
  

Not if you already have them lying around :)  If I wanted to splurge on
dedicated hardware for whole house audio, there are already a number of
options out there.  The Sonos, Squeezebox, and Airport Express/Apple TV
(just to name a few)  are all pretty cheap and work wirelessly.

I'm more intrigued by the possibility of turning my dumpster bound PC
hardware into something useful using PulseAudio.



Work out the electricity and AC costs and you won't think they are so cheap.

  

-chris


--
TV/IT Engineer
WCJB-TV Gainesville, FL
(352) 416 0648
 [EMAIL PROTECTED]
___
 pulseaudio-discuss mailing list
 pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss






  
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] Controlling where module-rtp-send sends multicast packets?

2008-02-14 Thread Matthew Patterson
Hello all,

I just discovered PulseAudio about 2 weeks ago and was struck by how 
applicable it could be in creating a whole home audio solution where 
each room can subscribe to the same or a different audio stream as 
another room. To create this I setup 4 mpd instances, each talking to a 
different rtp-send module. Then on the playback side there are 4 
rtp-recv modules that can connect to each of the multicast streams. I 
have all of this functioning and have written a small python app to 
configure the modules via the unix socket cli connection. All of this is 
implemented on one machine so I have the rtp-send modules looping back 
the data.

Now for my question: This implementation obviously spews a lot of 
multicast traffic onto my network. I didn't think this would be a 
problem, but my router/ap/switch seems to crap out when it gets hammered 
with all the traffic. Is there any way that I can specify which 
interface pulesaudio sends its multicast packets on? Or even more 
ideally, can I disable all outgoing multicast traffic and just have the 
local loopback happening?

I have attempted to configure the kernel routing tables on my ubuntu 
(7.10) install, but with no change. I still see all the multicast 
packets going out the interface (using ethereal on another machine to 
check).

I have pulseaudio version 0.9.9 that I compiled myself.

Thank you to the authors of this awesome software package!

Matt


P.S. If anyone is interested in my little whole home audio project I am 
perfectly happy to share my rather hackish python/php code and maybe get 
a little help.
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss