INTERACT FORUM

More => Old Versions => JRiver Media Center 27 for Linux => Topic started by: jlee700 on May 05, 2022, 06:54:48 pm

Title: Need help using pulseaudio
Post by: jlee700 on May 05, 2022, 06:54:48 pm
Hello,

I need some help on my mostly-working system. I have a raspberry pi 4 with hifiberry digi-pro hat connected to an external dac. System is debian bullseye with kernel from raspberry pi OS 5.15.32-v8+. Mediacenter27 is of version 27.0.88-arm64.

At the moment, mediacenter is working fabulous, using sound card option hw: which is direct ALSA with no software conversion. I am trying to use pulseaudio, to enable bluetooth and airplay (via shairport-sync). The direct ALSA option tends to grab full control on the sound card and do not let it be used by those other options...

I can connect my phone using bluetooth and play music through pulseaudio, so pulseaudio is working fine too. The last piece of the puzzle is to make mediacenter use sound card option pulse:, but if I use that option I get no sound output, and syslog says "mediacenter27: ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused".

Could you give me some pointers what to look for in order to make mediacenter and pulseaudio cowork nicely? Thanks!
Title: Re: Need help using pulseaudio
Post by: bob on May 06, 2022, 08:07:38 am
Everything using pulse audio needs to have the same sample rate set.
Usually out of the box, this is 48k.
You can enable MC's DSP studio output format and set everything to 48k.
Also enable the SoX option to get the highest quality resampling.
Title: Re: Need help using pulseaudio
Post by: jlee700 on May 06, 2022, 08:57:04 pm
Bob, thank you for your reply. I wasn't aware of pulseaudio requiring the same sample rate set.

I followed your advice to set everything to 48k, enabled the SoX option, and disabled avoid-resampling option from pulseaudio (the only option I changed from default). But I still get the connection refused message.

BTW, I tried out the plughw: device instead of hw: and now bluetooth can cowork with mediacenter. I am a bit worried that the plughw device may use software conversion as it sees fit... What would give me better sound quality, pulseaudio or plughw ALSA? I tried googling but it seems that linux sound related information is scarce.
Title: Re: Need help using pulseaudio
Post by: Awesome Donkey on May 07, 2022, 06:29:26 am
If you use Pulseaudio by default it most definitely goes through the system mixer and the system will convert everything to 48 kHz. If you're using Bluetooth, do also note that most devices that support it (e.g. AirPods) are also limited to 48 kHz.

If your Bluetooth devices are limited to 48 kHz and your content isn't all 48 kHz then conversions are unavoidable unfortunately.
Title: Re: Need help using pulseaudio
Post by: jlee700 on May 08, 2022, 03:48:17 am
Hi AD. I don't really worry about sound quality via bluetooth. My goal is

1. To have best sound quality coming from mediacenter
2. To play music through bluetooth, ok to compromise quality here
3. To be able to go back and forth between the above 2 sources freely

I was hoping that using pulseaudio with avoid-resampling option would get me there. But pulseaudio is not working for me (yet).