INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Need help using pulseaudio  (Read 2849 times)

jlee700

  • Recent member
  • *
  • Posts: 17
Need help using pulseaudio
« 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!
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13387
Re: Need help using pulseaudio
« Reply #1 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.
Logged

jlee700

  • Recent member
  • *
  • Posts: 17
Re: Need help using pulseaudio
« Reply #2 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.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7256
  • Long cold Winter...
Re: Need help using pulseaudio
« Reply #3 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.
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 23.10 Mantic Minotaur 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | Topping D50s DAC

jlee700

  • Recent member
  • *
  • Posts: 17
Re: Need help using pulseaudio
« Reply #4 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).
Logged
Pages: [1]   Go Up