Author Topic: pulseaudio on core/MD  (Read 4409 times)

Esperanto

  • Guru
  • ****
  • Posts: 281
    • View Profile
pulseaudio on core/MD
« on: March 14, 2014, 02:45:05 pm »
Anyone experience with running pulseaudio on the core or MD's?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: pulseaudio on core/MD
« Reply #1 on: March 14, 2014, 03:59:19 pm »
Not yet. If you do, would you share your experiences? This would be a great area for research.

-Thom

Esperanto

  • Guru
  • ****
  • Posts: 281
    • View Profile
Re: pulseaudio on core/MD
« Reply #2 on: March 16, 2014, 11:00:24 am »
Ok. Here a few of my experiences thus far. It seems that the passthrough option of pulseaudio has not yet been implemented (mythtv, xine). XMBC has an implementation though (see links).

Code: [Select]
sudo apt-get install pulseaudio
sudo apt-get install pulseaudio-module-zeroconf

I ran Pulseaudio systemwide:
Code: [Select]
------------- /etc/default/pulseaudio:
PULSEAUDIO_SYSTEM_START=1
DISALLOW_MODULE_LOADING=0

I was not able to activate passthrough with pulseaudio without adding a profile. You can check which profile file is getting loaded by running
Code: [Select]
udevadm info --query=all --path /sys/class/sound/card0
In /usr/share/pulseaudio/alsa-mixer/profile-sets/extra-hdmi.conf I added:
Code: [Select]
[Mapping iec958-stereo2]
device-strings = iec958:%f,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x02
channel-map = left,right
priority = 5
direction = output
(For info on the AES0 values see http://www.mythtv.org/wiki/Configuring_Digital_Sound#How_do_I_get_5.1_AC3_audio_to_work_again.3F )

To be able to run everything I gave some pulse rights:
Code: [Select]
sudo gpasswd -a root pulse-access
sudo gpasswd -a mythtv pulse-access
in /etc/pulse/system.pa:
Code: [Select]
set-card-profile 1 output:iec958-stereo2
set-sink-formats 1 "pcm; ac3-iec61937; dts-iec61937"
where the number is the index of your card (pactl list cards). And "output:iec958-stereo2" the profile that you want activated at boot. (the formats will show in the list for the sink when running pactl list)

To prevent noice (not happening on every skip) in mythtv when skipping play/pause:
In audio settings go to 'Advanced Audio Settings' on the audio Config Page. Here activate 'Override SRC audio quality Sample rate conversion' and select 'Disabled'

What also worked to prevent the noice was adding to /etc/pulse/default.pa:
Code: [Select]
    default-sample-rate = 48000
There is also an option in the 'Advanced Audio Settings' to force 48k on the device

To be able to use the audiocard over the network I added to /etc/pulse/system.pa:
Code: [Select]
    load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24 auth-anonymous=1
    load-module module-zeroconf-publish
then I was able to select the audio card on my client (after enabling it in PulseAudio Preferences [papref]. Under the Network Access tab select "Make discoverable PulseAudio network sound devices available locally").

When I was playing with analog 5.1 I noticed that alsamixer had the soundcard set to 2ch instead of 6ch (analog 5.1).

To make sure Linuxmce did not take control of everything I set the audio settings on the MD to manual (M) and in the dropdownbox. I also removed the /etc/asound.conf.

When passthrough is implemented in the programs it has a lot of potential.

Some reference links:
http://wiki.linuxmce.org/index.php/Audio_in_1004
http://wiki.linuxmce.org/index.php/Changing_Xine_Player_Audio_Settings
http://wiki.linuxmce.org/index.php/Audio_over_HDMI
http://wiki.xbmc.org/index.php?title=PulseAudio
http://www.mythtv.org/wiki/Configuring_Digital_Sound#How_do_I_get_5.1_AC3_audio_to_work_again.3F
https://help.ubuntu.com/community/DigitalAC-3Pulseaudio
« Last Edit: March 16, 2014, 11:58:27 am by Esperanto »

Esperanto

  • Guru
  • ****
  • Posts: 281
    • View Profile
Re: pulseaudio on core/MD
« Reply #3 on: March 17, 2014, 02:50:49 pm »
Since for passthrough the different applications have to support it I decided to go around it by installing the DTS encoder & plugin from A.E. Patrakov. (the disadvantage is that this encoding on the fly eats up some cpu power). With this I can now play everything and stream to the box at the same time.
Code: [Select]
wget http://aepatrakov.narod.ru/olderfiles/1/dcaenc-2.tar.gz
tar xzvf dcaenc-2.tar.gz
cd dcaenc-2
./configure --prefix=/usr --libdir=/usr/lib/i386-linux-gnu
make
make install

/etc/asound.conf:
Code: [Select]
<confdir:pcm/dca.conf>
/usr/share/pulseaudio/alsa-mixer/profile-sets/extra-hdmi.conf:
Code: [Select]
[Mapping iec958-dts-surround-51]
description = DTS
device-strings = dca:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 3
direction = output

\o/

Esperanto

  • Guru
  • ****
  • Posts: 281
    • View Profile
Re: pulseaudio on core/MD
« Reply #4 on: March 18, 2014, 01:38:00 pm »
Switched to HDMI via my nvidia card. This takes time..... I had to update the firmware of my amp/receiver (it was an old denon and apparently had some HDMI issues). Now I can even use 7.1. I split that up in a 5.1 sink for the room where the hybrid is located and use the other 2.0 for a zone in the kitchen.

Pulseaudio is nizzzzzz.