Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using the PulseAudio feature of network sound devices (not Multicast/RTP) to play sound from my netbook on the audio equipment connected to the HTPC when at home. This creates a virtual sound device that I can then use instead of the physical built-in one. Most of the time this works just fine. Sometimes however, the virtual sound device just doesn't appear. Disconnecting from and reconnecting to the network helps sometimes but not always and it's annoying and potentially bad for existing TCP connections.

So my question basically is: Is there some way to tell PulseAudio "Hey, just look again if you really can't find a network sound device."?


Edit: Unloading and reloading the module-zeroconf-discover with pacmd does not help either and it doesn't appear to be an avahi problem per se since avahi-browse -t --all | grep PulseAudio shows lots of right-looking stuff, even when the devices aren't listed in pavucontrol or pacmd list-sinks.


Edit 2: I'm using Ubuntu 12.04 on both boxes for all the difference it might make.

share|improve this question
    
If you're missing any information to provide helpful comments or even an answer, please tell me so. –  Christian Jun 24 '12 at 19:24
add comment

migrated from unix.stackexchange.com Jun 15 '12 at 11:35

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems..

2 Answers

This answer is untested so it might not work, but it may lead you to the right direction.

I can confirm unresolved issues with an Avahi service that sometimes is unable to connect to a PulseAudio server. We may succeed reconnecting by either restarting the network, or the pulseaudio server but alas this does not always work.

To overcome this issue we may try to establish a network audio stream using the native TCP protocol to stream directly to the IP rather than using an Avahi name resolution.

To do so we can tunnel a remote sink by loading the module-tunnel-sink on the receiver side. On the sender we have to enable the native TCP protocol by loading module-native-protocol-tcp.

See also this question for terminology and how to define the PULSE_SERVER variable:

How to automatically set PulseAudio default sink to remote server at boot - Ubuntu 9.04

It is a rather old question for Ubuntu 9.04 but to my knwoledge terminology and procedures have not changed much since then.

Please also follow the PulseAudio Wiki on network connections.

share|improve this answer
    
Thanks for the one link. The solution there actually works in my case, too: sudo service avahi-daemon restart I didn't expect that because avahi-browse sees the devices even before the restart but I guess the restart triggers the callback to be called again which is all that is needed. –  Christian Jun 26 '12 at 7:06
    
@Christian: good it helped. I have given up on Avahi for the time being. –  Takkat Jun 26 '12 at 7:09
    
I'm not sure if I understood your proposition though. Can I use the DNS name resolution or do I have to know the IP? I'd rather not use fixed IPs although you might say in case of the HTPC this is an ok thing to do. –  Christian Jun 26 '12 at 7:09
1  
Yeah, I can understand why. I just wrote my own reply though because for people who stumble on this question because they have the same problem it seems like the simplest solution. –  Christian Jun 26 '12 at 7:11
add comment
up vote 2 down vote accepted

A simple sudo service avahi-daemon restart does the trick, even though avahi-browse sees the devices before that avahi restart. Thanks to Takkat for pointing me in the right direction.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.