You are not logged in.

#1 2023-11-12 12:40:15

dngulin
Member
Registered: 2023-11-12
Posts: 2

[SOLVED] HTPC Audio Configuration (HDMI 5.1)

Hi there!

I have this one setup: [HTPC] --HDMI--> [TV (LG)] --OpticalCable--> [5.1 Sound System]
And I want to have 5.1 sound when I use any application (now I use Kodi, Steam and Retroarch).

On the HTPC side I have pipewire, pipewire-alsa, pipewire-pulse and wireplumber.
I didn't do any specific configurations, just selected the "Digital Surround 5.1 HDMI" profile in the pavucontrol and played a bit with enabled codecs (i am unsure what this setting actually changes).

TV configuration:

  • DTV Audio Setting: MPEG, Dolby Digital, Dolby Digital Plus, HE-AAC, Auto

  • HDMI Input Audio Format: Bitstream, PCM

  • Digital Sound Output: PCM, Auto, Pass Through

Now when I run `speaker-test -t wav -c 5 -l 2`, I hear only "Front Left" and "Front Right" sounds. So, i need to configure sound properly.

As I understand, HDMI is able to carry audio signal in different formats.

Is it possible to get supported formats on the HTPC side?
I tried to use the read-edid, but didn't get anything related to audio capabilities.

How to configure output HDMI audio format with pipewire?
I see some variants in the pavucontrol (AC3, EAC3, DTS, ...), but it allows me to set multiple options. Unfortunately the pavucontrol doesn't have any documentation.

My current configurations:

$ wpctl status
Audio
 ├─ Devices:
 │      43. Renoir Radeon High Definition Audio Controller [alsa]
 │      45. Family 17h/19h HD Audio Controller  [alsa]
 │  
 ├─ Sinks:
 │  *   42. Renoir Radeon High Definition Audio Controller Цифровой объёмный 5.1 (HDMI) [vol: 1.00]
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:

Video
 ├─ Devices:
 │  
 ├─ Sinks:
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:

Settings
 └─ Default Configured Node Names:
         0. Audio/Sink    alsa_output.pci-0000_06_00.1.hdmi-stereo
$ pactl list cards
Card #70
        Name: alsa_card.pci-0000_06_00.6.3
        Driver: alsa
        Owner Module: n/a
        Properties:
                api.acp.auto-port = "false"
                api.acp.auto-profile = "false"
                api.alsa.card = "1"
                api.alsa.card.longname = "HD-Audio Generic at 0xfcb80000 irq 99"
                api.alsa.card.name = "HD-Audio Generic"
                api.alsa.path = "hw:1"
                api.alsa.use-acp = "true"
                api.dbus.ReserveDevice1 = "Audio1"
                device.api = "alsa"
                device.bus = "pci"
                device.bus_path = "pci-0000:06:00.6"
                device.description = "Family 17h/19h HD Audio Controller"
                device.enum.api = "udev"
                device.icon_name = "audio-card-analog-pci"
                device.name = "alsa_card.pci-0000_06_00.6.3"
                device.nick = "HD-Audio Generic"
                device.plugged.usec = "5921992"
                device.product.id = "0x15e3"
                device.product.name = "Family 17h/19h HD Audio Controller"
                device.subsystem = "sound"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:06:00.6/sound/card1"
                device.vendor.id = "0x1022"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
                media.class = "Audio/Device"
                factory.id = "14"
                client.id = "34"
                object.id = "45"
                object.serial = "70"
                object.path = "alsa:pcm:1"
                alsa.card = "1"
                alsa.card_name = "HD-Audio Generic"
                alsa.long_card_name = "HD-Audio Generic at 0xfcb80000 irq 99"
                alsa.driver_name = "snd_hda_intel"
                device.string = "1"
        Profiles:
                off: Выключено (sinks: 0, sources: 0, priority: 0, available: yes)
                output:analog-stereo+input:analog-stereo: Аналоговый стерео дуплекс (sinks: 1, sources: 1, priority: 6565, available: no)
                output:analog-stereo: Аналоговый стерео выход (sinks: 1, sources: 0, priority: 6500, available: no)
                input:analog-stereo: Аналоговый стерео вход (sinks: 0, sources: 1, priority: 65, available: no)
                pro-audio: Pro Audio (sinks: 1, sources: 2, priority: 1, available: yes)
        Active Profile: off
        Ports:
                analog-input-front-mic: Фронтальный микрофон (type: Mic, priority: 8500, latency offset: 0 usec, availability group: Legacy 1, not available)
                        Properties:
                                port.type = "mic"
                                port.availability-group = "Legacy 1"
                                device.icon_name = "audio-input-microphone"
                                card.profile.port = "0"
                        Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-input-rear-mic: Тыловой микрофон (type: Mic, priority: 8200, latency offset: 0 usec, availability group: Legacy 2, not available)
                        Properties:
                                port.type = "mic"
                                port.availability-group = "Legacy 2"
                                device.icon_name = "audio-input-microphone"
                                card.profile.port = "1"
                        Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-input-linein: Линейный вход (type: Line, priority: 8100, latency offset: 0 usec, availability group: Legacy 3, not available)
                        Properties:
                                port.type = "line"
                                port.availability-group = "Legacy 3"
                                card.profile.port = "2"
                        Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-output-lineout: Линейный выход (type: Line, priority: 9000, latency offset: 0 usec, availability group: Legacy 4, not available)
                        Properties:
                                port.type = "line"
                                port.availability-group = "Legacy 4"
                                card.profile.port = "3"
                        Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-output-headphones: Наушники (type: Headphones, priority: 9900, latency offset: 0 usec, availability group: Legacy 5, not available)
                        Properties:
                                port.type = "headphones"
                                port.availability-group = "Legacy 5"
                                device.icon_name = "audio-headphones"
                                card.profile.port = "4"
                        Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo

Card #71
        Name: alsa_card.pci-0000_06_00.1.3
        Driver: alsa
        Owner Module: n/a
        Properties:
                api.acp.auto-port = "false"
                api.acp.auto-profile = "false"
                api.alsa.card = "0"
                api.alsa.card.longname = "HD-Audio Generic at 0xfcb88000 irq 98"
                api.alsa.card.name = "HD-Audio Generic"
                api.alsa.path = "hw:0"
                api.alsa.use-acp = "true"
                api.dbus.ReserveDevice1 = "Audio0"
                device.api = "alsa"
                device.bus = "pci"
                device.bus_path = "pci-0000:06:00.1"
                device.description = "Renoir Radeon High Definition Audio Controller"
                device.enum.api = "udev"
                device.icon_name = "audio-card-analog-pci"
                device.name = "alsa_card.pci-0000_06_00.1.3"
                device.nick = "HD-Audio Generic"
                device.plugged.usec = "5819046"
                device.product.id = "0x1637"
                device.product.name = "Renoir Radeon High Definition Audio Controller"
                device.subsystem = "sound"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:06:00.1/sound/card0"
                device.vendor.id = "0x1002"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
                media.class = "Audio/Device"
                factory.id = "14"
                client.id = "34"
                object.id = "43"
                object.serial = "71"
                object.path = "alsa:pcm:0"
                alsa.card = "0"
                alsa.card_name = "HD-Audio Generic"
                alsa.long_card_name = "HD-Audio Generic at 0xfcb88000 irq 98"
                alsa.driver_name = "snd_hda_intel"
                device.string = "0"
        Profiles:
                off: Выключено (sinks: 0, sources: 0, priority: 0, available: yes)
                output:hdmi-stereo: Цифровой стерео (HDMI) выход (sinks: 1, sources: 0, priority: 5900, available: yes)
                output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) выход (sinks: 1, sources: 0, priority: 5700, available: no)
                output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) выход (sinks: 1, sources: 0, priority: 5700, available: no)
                output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) выход (sinks: 1, sources: 0, priority: 5700, available: no)
                output:hdmi-surround: Цифровой объёмный 5.1 (HDMI) выход (sinks: 1, sources: 0, priority: 800, available: yes)
                output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) выход (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) выход (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) выход (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) выход (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) выход (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) выход (sinks: 1, sources: 0, priority: 600, available: no)
                pro-audio: Pro Audio (sinks: 4, sources: 0, priority: 1, available: yes)
        Active Profile: output:hdmi-surround
        Ports:
                hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, latency offset: 0 usec, availability group: Legacy 1, available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 1"
                                device.icon_name = "video-display"
                                card.profile.port = "0"
                                device.product.name = "LG TV SSCR2"
                        Part of profile(s): output:hdmi-stereo, output:hdmi-surround
                hdmi-output-1: HDMI / DisplayPort 2 (type: HDMI, priority: 5800, latency offset: 0 usec, availability group: Legacy 2, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 2"
                                device.icon_name = "video-display"
                                card.profile.port = "1"
                        Part of profile(s): output:hdmi-stereo-extra1, output:hdmi-surround-extra1, output:hdmi-surround71-extra1
                hdmi-output-2: HDMI / DisplayPort 3 (type: HDMI, priority: 5700, latency offset: 0 usec, availability group: Legacy 3, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 3"
                                device.icon_name = "video-display"
                                card.profile.port = "2"
                        Part of profile(s): output:hdmi-stereo-extra2, output:hdmi-surround-extra2, output:hdmi-surround71-extra2
                hdmi-output-3: HDMI / DisplayPort 4 (type: HDMI, priority: 5600, latency offset: 0 usec, availability group: Legacy 4, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 4"
                                device.icon_name = "video-display"
                                card.profile.port = "3"
                        Part of profile(s): output:hdmi-stereo-extra3, output:hdmi-surround-extra3, output:hdmi-surround71-extra3
$ pactl list sinks
Sink #137
        State: SUSPENDED
        Name: alsa_output.pci-0000_06_00.1.3.hdmi-surround
        Description: Renoir Radeon High Definition Audio Controller Цифровой объёмный 5.1 (HDMI)
        Driver: PipeWire
        Sample Specification: s32le 6ch 48000Hz
        Channel Map: front-left,front-right,rear-left,rear-right,front-center,lfe
        Owner Module: 4294967295
        Mute: no
        Volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB,   rear-left: 65536 / 100% / 0,00 dB,   rear-right: 65536 / 100% / 0,00 dB,   front-center: 65536 / 100% / 0,00 dB,   lfe: 65536 / 100% / 0,00 dB
                balance 0,00
        Base Volume: 65536 / 100% / 0,00 dB
        Monitor Source: alsa_output.pci-0000_06_00.1.3.hdmi-surround.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS 
        Properties:
                alsa.card = "0"
                alsa.card_name = "HD-Audio Generic"
                alsa.class = "generic"
                alsa.device = "3"
                alsa.driver_name = "snd_hda_intel"
                alsa.id = "HDMI 0"
                alsa.long_card_name = "HD-Audio Generic at 0xfcb88000 irq 98"
                alsa.name = "LG TV SSCR2"
                alsa.resolution_bits = "16"
                alsa.subclass = "generic-mix"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                api.alsa.card.longname = "HD-Audio Generic at 0xfcb88000 irq 98"
                api.alsa.card.name = "HD-Audio Generic"
                api.alsa.path = "hdmi:0"
                api.alsa.pcm.card = "0"
                api.alsa.pcm.stream = "playback"
                audio.channels = "6"
                audio.position = "FL,FR,RL,RR,FC,LFE"
                card.profile.device = "5"
                device.api = "alsa"
                device.class = "sound"
                device.id = "43"
                device.profile.description = "Цифровой объёмный 5.1 (HDMI)"
                device.profile.name = "hdmi-surround"
                device.routes = "1"
                factory.name = "api.alsa.pcm.sink"
                media.class = "Audio/Sink"
                device.description = "Renoir Radeon High Definition Audio Controller"
                node.name = "alsa_output.pci-0000_06_00.1.3.hdmi-surround"
                node.nick = "LG TV SSCR2"
                node.pause-on-idle = "false"
                object.path = "alsa:pcm:0:hdmi:0:playback"
                priority.driver = "696"
                priority.session = "696"
                factory.id = "18"
                clock.quantum-limit = "8192"
                client.id = "34"
                node.driver = "true"
                factory.mode = "merge"
                audio.adapt.follower = ""
                library.name = "audioconvert/libspa-audioconvert"
                object.id = "42"
                object.serial = "137"
                api.acp.auto-port = "false"
                api.acp.auto-profile = "false"
                api.alsa.card = "0"
                api.alsa.use-acp = "true"
                api.dbus.ReserveDevice1 = "Audio0"
                device.bus = "pci"
                device.bus_path = "pci-0000:06:00.1"
                device.enum.api = "udev"
                device.icon_name = "audio-card-analog-pci"
                device.name = "alsa_card.pci-0000_06_00.1.3"
                device.nick = "HD-Audio Generic"
                device.plugged.usec = "5819046"
                device.product.id = "0x1637"
                device.product.name = "Renoir Radeon High Definition Audio Controller"
                device.subsystem = "sound"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:06:00.1/sound/card0"
                device.vendor.id = "0x1002"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
                device.string = "0"
        Ports:
                hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, availability group: Legacy 1, available)
        Active Port: hdmi-output-0
        Formats:
                pcm
                dts-iec61937, format.rate = "{ \"min\": 32000, \"max\": 192000 }"
                ac3-iec61937, format.rate = "{ \"min\": 32000, \"max\": 192000 }"
                mpeg-iec61937, format.rate = "{ \"min\": 32000, \"max\": 192000 }"
                mpeg2-aac-iec61937, format.rate = "{ \"min\": 32000, \"max\": 192000 }"
                eac3-iec61937, format.rate = "{ \"min\": 32000, \"max\": 192000 }"

Last edited by dngulin (2023-11-12 15:47:28)

Offline

#2 2023-11-12 15:46:28

dngulin
Member
Registered: 2023-11-12
Posts: 2

Re: [SOLVED] HTPC Audio Configuration (HDMI 5.1)

I "downgraded" my setup from pipewire to pulseaudio, because kodi doesn't work well with it. But i think that following ALSA configuration should work with pipewire as well.

I created ~/.asoundrc with this content (found here):

pcm.a52 {
     slavepcm "hdmi"
}

After restarting pulseaudio I selected in the pavucontrol the new configuration profile "Digital Surround 5.1 (IEC958/AC3)" that encodes the output sound as AC3.

The audio configuration is still unclear for me and I am unsure if it is a proper solution, but at least it works. So I mark the thread as [SOLVED].

Last edited by dngulin (2023-11-12 15:48:53)

Offline

Board footer

Powered by FluxBB