Add alsa profiles for HDMI/AC3
Use case: my AV receiver does not seem to support LPCM 6CH over HDMI but only AC3 or DTS. I use Debian and the DTS encoder dcaenc
is not packaged.
After much trouble I finally managed to have a working configuration and use a pulseaudio profile which allows AC3 over HDMI. Using hints from /usr/share/alsa/alsa.conf.d/60-a52-encoder.conf
and inspiration from the hdmi-dts-surround
profiles, my system is finally able to make pulseaudio transparently encode AC3 over HDMI. For context, aplay -L
:
hw:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Direct hardware device without any conversions
[...]
plughw:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Hardware device with all software conversions
[...]
iec958:CARD=PCH,DEV=0
HDA Intel PCH, ALC662 rev3 Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=PCH,DEV=0
HDA Intel PCH, HDMI 0
HDMI Audio Output
hdmi:CARD=PCH,DEV=1
HDA Intel PCH, HDMI 1
HDMI Audio Output
[...]
dmix:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Direct sample mixing device
[...]
$ cat /proc/asound/card0/eld#2.3
monitor_present 1
eld_valid 1
monitor_name LT-1080
connection_type HDMI
eld_version [0x2] CEA-861D or below
edid_version [0x3] CEA-861-B, C or D
manufacture_id 0x8d32
product_id 0x2c02
port_id 0x0
support_hdcp 0
support_ai 0
audio_sync_delay 0
speakers [0x1] FL/FR
sad_count 3
sad0_coding_type [0x1] LPCM
sad0_channels 2
sad0_rates [0x1ee0] 32000 44100 48000 88200 96000 176400 192000
sad0_bits [0xe0000] 16 20 24
sad1_coding_type [0x2] AC-3
sad1_channels 8
sad1_rates [0xe0] 32000 44100 48000
sad1_max_bitrate 448000
sad2_coding_type [0x7] DTS
sad2_channels 8
sad2_rates [0xe0] 32000 44100 48000
sad2_max_bitrate 1536000
And the working addition to /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf
:
[Mapping hdmi-ac3-surround-extra1]
description = Digital Surround 5.1 (HDMI 2/AC3)
device-strings = plug:{SLAVE="a52:%f,'hw:%f,7'"}
paths-output = hdmi-output-1
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 6
direction = output
Note: I do not know why it works only with DEV=7
although the HDMI port is DEV=1
.
It would be great if those AC3 profiles could be integrated in the default profiles.
Thanks.