It seems it is possible to use pulse audio and direct passthrough (DTS AC3 ... ) with ALSA without extra configuration
(means kill and start pulse audio ... ) via HDMI
My specs:
LinuxMint 14 (nadia) gcc 4.7 (x86_64-linux-gnu)
GeForce GTX 570 with driver NVIDIA UNIX x86_64 Kernel Module 313.09
kernel 3.7.7-030707-generic
Xorg version 1.13.1.901 (1.13.2 RC 1)
pulse audio version: 3.0.0 from
http://packages.ubuntu.com/raring/amd64 ... o/download
https://launchpad.net/ubuntu/+source/pulseaudio
ALSA version: 1.0.25 from stable Mint repository
Code: Select all
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia_1 [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia_1 [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: Headset [Logitech Wireless Headset], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
Code: Select all
aplay -L
default
Playback/recording through the PulseAudio sound server
hdmi:CARD=NVidia,DEV=0
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
HDMI Audio Output
dmix:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct sample mixing device
dmix:CARD=NVidia,DEV=7
HDA NVidia, HDMI 0
Direct sample mixing device
dmix:CARD=NVidia,DEV=8
HDA NVidia, HDMI 0
Direct sample mixing device
dmix:CARD=NVidia,DEV=9
HDA NVidia, HDMI 0
Direct sample mixing device
dsnoop:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct sample snooping device
dsnoop:CARD=NVidia,DEV=7
HDA NVidia, HDMI 0
Direct sample snooping device
dsnoop:CARD=NVidia,DEV=8
HDA NVidia, HDMI 0
Direct sample snooping device
dsnoop:CARD=NVidia,DEV=9
HDA NVidia, HDMI 0
Direct sample snooping device
hw:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=7
HDA NVidia, HDMI 0
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=8
HDA NVidia, HDMI 0
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=9
HDA NVidia, HDMI 0
Direct hardware device without any conversions
plughw:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=7
HDA NVidia, HDMI 0
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=8
HDA NVidia, HDMI 0
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=9
HDA NVidia, HDMI 0
Hardware device with all software conversions
hdmi:CARD=NVidia_1,DEV=0
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia_1,DEV=1
HDA NVidia, HDMI 1
HDMI Audio Output
dmix:CARD=NVidia_1,DEV=3
HDA NVidia, HDMI 0
Direct sample mixing device
dmix:CARD=NVidia_1,DEV=7
HDA NVidia, HDMI 1
Direct sample mixing device
dsnoop:CARD=NVidia_1,DEV=3
HDA NVidia, HDMI 0
Direct sample snooping device
dsnoop:CARD=NVidia_1,DEV=7
HDA NVidia, HDMI 1
Direct sample snooping device
hw:CARD=NVidia_1,DEV=3
HDA NVidia, HDMI 0
Direct hardware device without any conversions
hw:CARD=NVidia_1,DEV=7
HDA NVidia, HDMI 1
Direct hardware device without any conversions
plughw:CARD=NVidia_1,DEV=3
HDA NVidia, HDMI 0
Hardware device with all software conversions
plughw:CARD=NVidia_1,DEV=7
HDA NVidia, HDMI 1
Hardware device with all software conversions
sysdefault:CARD=Headset
Logitech Wireless Headset, USB Audio
Default Audio Device
front:CARD=Headset,DEV=0
Logitech Wireless Headset, USB Audio
Front speakers
surround40:CARD=Headset,DEV=0
Logitech Wireless Headset, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Headset,DEV=0
Logitech Wireless Headset, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Headset,DEV=0
Logitech Wireless Headset, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Headset,DEV=0
Logitech Wireless Headset, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Headset,DEV=0
Logitech Wireless Headset, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=Headset,DEV=0
Logitech Wireless Headset, USB Audio
Direct sample mixing device
dsnoop:CARD=Headset,DEV=0
Logitech Wireless Headset, USB Audio
Direct sample snooping device
hw:CARD=Headset,DEV=0
Logitech Wireless Headset, USB Audio
Direct hardware device without any conversions
plughw:CARD=Headset,DEV=0
Logitech Wireless Headset, USB Audio
Hardware device with all software conversions
1. there is no need to add extra sink (load-module module-alsa-sink device=hw:0,7) to default.pa
it seems that pulse audio send sound to all streams and bug Under-Enumeration of HDMI Devices was corrected
see [url]ftp://download.nvidia.com/XFree86/gpu-hdmi-audio-document/gpu-hdmi-audio.html#_under_enumeration_of_hdmi_devices[/url]
my default.pa :
Code: Select all
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)
.nofail
### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
.fail
### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties
### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink
### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect use_ucm=0
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif
### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect
.fail
.endif
### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif
### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix
### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish
### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv
### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor
### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif
### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore
### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams
### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink
### Honour intended role device property
load-module module-intended-roles
### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle
### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif
### Enable positioned event sounds
load-module module-position-event-sounds
### Cork music/video streams when a phone stream is active
#load-module module-role-cork
### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply
### Load DBus protocol
#.ifexists module-dbus-protocol.so
#load-module module-dbus-protocol
#.endif
# X11 modules should not be started from default.pa so that one daemon
# can be shared by multiple sessions.
### Load X11 bell module
#load-module module-x11-bell sample=bell-windowing-system
### Register ourselves in the X11 session manager
#load-module module-x11-xsmp
### Publish connection data in the X11 root window
#.ifexists module-x11-publish.so
#.nofail
#load-module module-x11-publish
#.fail
#.endif
load-module module-switch-on-port-available
### Make some devices default
#set-default-sink output
#set-default-source input
2. I added some extra chars (logical id stream) to profile's description to spot which profile belongs to hw:0,7 (logical stream id 1, physical stream id 7, card id 0) in Pulse Audio Volume Control
file is extra-hdmi.conf in /usr/share/pulseaudio/alsa-mixer/profile-sets :
Code: Select all
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
; This is a profile for Nvidia and Intel cards - some cards have four HDMI codecs,
; and which ones are working seems to vary a lot between GPU boards. In addition,
; Nvidia and Intel make southbridges as well, so we need to keep the existing
; analog profiles.
; (And by not adding all these extra profiles to default.conf, we make sure
; there is no performance hit for non-Nvidia/Intel cards.)
[General]
auto-profiles = yes
[Mapping analog-mono]
device-strings = hw:%f
channel-map = mono
paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
priority = 1
[Mapping analog-stereo]
device-strings = front:%f hw:%f
channel-map = left,right
paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic
priority = 10
[Mapping analog-surround-40]
device-strings = surround40:%f
channel-map = front-left,front-right,rear-left,rear-right
paths-output = analog-output analog-output-speaker analog-output-desktop-speaker
priority = 7
direction = output
[Mapping analog-surround-41]
device-strings = surround41:%f
channel-map = front-left,front-right,rear-left,rear-right,lfe
paths-output = analog-output analog-output-speaker analog-output-desktop-speaker
priority = 8
direction = output
[Mapping analog-surround-50]
device-strings = surround50:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center
paths-output = analog-output analog-output-speaker analog-output-desktop-speaker
priority = 7
direction = output
[Mapping analog-surround-51]
device-strings = surround51:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
paths-output = analog-output analog-output-speaker analog-output-desktop-speaker
priority = 8
direction = output
[Mapping analog-surround-71]
device-strings = surround71:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
description = Analog Surround 7.1
paths-output = analog-output analog-output-speaker analog-output-desktop-speaker
priority = 7
direction = output
[Mapping iec958-stereo]
device-strings = iec958:%f
channel-map = left,right
paths-input = iec958-stereo-input
paths-output = iec958-stereo-output
priority = 5
[Mapping iec958-ac3-surround-40]
device-strings = a52:%f
channel-map = front-left,front-right,rear-left,rear-right
priority = 2
direction = output
[Mapping iec958-ac3-surround-51]
device-strings = a52:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 3
direction = output
[Mapping iec958-dts-surround-51]
device-strings = dca:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 3
direction = output
[Mapping hdmi-stereo]
device-strings = hdmi:%f
description = Digital Stereo (HDMI-0)
paths-output = hdmi-output-0
channel-map = left,right
priority = 4
direction = output
[Mapping hdmi-surround]
description = Digital Surround 5.1 (HDMI-0)
device-strings = hdmi:%f
paths-output = hdmi-output-0
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 3
direction = output
[Mapping hdmi-stereo-extra1]
description = Digital Stereo (HDMI-1)
device-strings = hdmi:%f,1
paths-output = hdmi-output-1
channel-map = left,right
priority = 2
direction = output
[Mapping hdmi-surround-extra1]
description = Digital Surround 5.1 (HDMI-1)
device-strings = hdmi:%f,1
paths-output = hdmi-output-1
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output
[Mapping hdmi-stereo-extra2]
description = Digital Stereo (HDMI-2)
device-strings = hdmi:%f,2
paths-output = hdmi-output-2
channel-map = left,right
priority = 2
direction = output
[Mapping hdmi-surround-extra2]
description = Digital Surround 5.1 (HDMI-2)
device-strings = hdmi:%f,2
paths-output = hdmi-output-2
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output
[Mapping hdmi-stereo-extra3]
description = Digital Stereo (HDMI-3)
device-strings = hdmi:%f,3
paths-output = hdmi-output-3
channel-map = left,right
priority = 2
direction = output
[Mapping hdmi-surround-extra3]
description = Digital Surround 5.1 (HDMI-3)
device-strings = hdmi:%f,3
paths-output = hdmi-output-3
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output
3. I added enable-lfe-remixing = yes to daemon.conf in /etc/pulse to enable subwoofer
If I need
to see DTS on my receiver panel (DTS pass-through) I have to shut all application which uses pulseaudio
means firefox with flashplayer, Pulse Audio Volume Control, Clementine ... and then
for example in SMplayer choose AC3, DTS passthrough and ALSA (0.7 - HDA Nvidia)
If any pulse audio application is running even if pacmd list-sink-inputs is empty pass-throuh is not possible
It works in XBMC Frodo too, but it is needed to pause movie for a while to get rid off video tearing
So for me it is definitive solution, pulse audio allows other application to use ALSA
In my opinion it should be said FINALLY