Auto switch to A2DP bluetooth device when connected in Ubuntu

Add to /etc/pulse/default.pa to automatically switch pulseaudio sink to Bluez:

 .ifexists module-bluetooth-discover.so
 load-module module-bluetooth-discover
 load-module module-switch-on-connect  # Add this
 .endif

Modify /etc/bluetooth/audio.conf to auto select A2DP profile (instead of HSP/HFP):

 [General]
 Disable=Headset # Add this

Apply changes:

sudo pulseaudio -k # Restarts pulseaudio
sudo restart --system bluetooth # Restarts BT

Streaming audio from Ubuntu Linux to a DLNA player without Rygel

Recently, I became the proud owner of Onkyo TX-NR515 receiver. This device is DLNA MediaRenderer as upnp-inspector says. The A/V receiver is from the 2012 devices family (TX-NR414/TX-NR515/TX-NR616).

Streaming the sound from PC to my DLNA device over wlan was a tough task, but I managed to solve it the way I’ll describe below. The main idea is to pass the alsa/pulseaudio output stream over LAN to DLNA device. There are 2 ways of doing it: with DLNA server or without.

Continue reading