This forum has been archived. All content is frozen. Please use KDE Discuss instead.

5.1 surround audio produces mixed up audio channel-maps

Tags: None
(comma "," separated)
FrankyOttobrunn
Registered Member
Posts
2
Karma
0
SYMPTOM:
When using the default settings, the audio channels of a surround 5.1 audio are mixed up .
When controlled with [Systemeinstellungen ->Audio ->Tab "Erweiterung" -> Lautsprecheraufstellung & Probehören]
////what should be something like [Systemsettings->Audio->Tab "Extensions"->Testing of Speakers]

with default settings, only Front-left and Front-right were played through the correct audio channel.

HINT: the usual default-channel-map is: = front-left,front-right,rear-left,rear-right,front-center,lfe

Is this a known error?
###############################
the used platform is a raspberry PI-400
Plasma-Version: 5.20.5
KDE-Framework-Version: 5.78.0


also
$speaker-test -c6
did not play the correct surround channels.

I found a workaround by tweaking the channel-mappings.

#FIX-part1: modifying /etc/pulse/daemon.conf by adding 6 channel-map values AND using "lfe,front-center" in this sequence
; default-channels = 6 // channel-count MUST NOT be set, otherwise resulting channel-map is completely weird
default-channel-map = front-left,front-right,lfe,front-center,rear-left,rear-right

#FIX-part2: vi /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf
[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,lfe,front-center,rear-left,rear-right
priority = 8
direction = output

speaker-test -c6
is working now correctly.

$pactl info
Server-Zeichenkette: /run/user/1000/pulse/native
Bibliotheks-Protokollversion: 34
Server-Protokollversion: 34
ist lokal: ja
Client-Index: 15
Tile-Größe: 65472
Name des Benutzers: pi
Rechnername: kderaspi
Name des Servers: pulseaudio
Version des Servers: 14.2
Standard-Abtastwert-Angabe: s16le 6ch 48000Hz
Standard-Kanal-Zuordnung: front-left,front-right,lfe,front-center,rear-left,rear-right
Standard-Ziel: alsa_output.platform-fef05700.hdmi.hdmi-surround
Standard-Quelle: alsa_output.platform-fef05700.hdmi.hdmi-surround.monitor
Cookie: 7c83:b2d8

pi@kderaspi:~ $ pacmd list-sinks
1 sink(s) available.
* index: 0
name: <alsa_output.platform-fef05700.hdmi.hdmi-surround>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9000
volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB, lfe: 65536 / 100% / 0,00 dB, front-center: 65536 / 100% / 0,00 dB, rear-left: 65536 / 100% / 0,00 dB, rear-right: 65536 / 100% / 0,00 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 0,00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 0
sample spec: s16le 6ch 48000Hz
channel map: front-left,front-right,lfe,front-center,rear-left,rear-right
Surround 5.1
used by: 0
linked by: 0
fixed latency: 60,00 ms
card: 0 <alsa_card.platform-fef05700.hdmi>
module: 3
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "MAI PCM i2s-hifi-0"
alsa.id = "MAI PCM i2s-hifi-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "vc4-hdmi-1"
alsa.long_card_name = "vc4-hdmi-1"
alsa.driver_name = "vc4"
device.bus_path = "platform-fef05700.hdmi"
sysfs.path = "/devices/platform/soc/fef05700.hdmi/sound/card1"
device.form_factor = "internal"
device.string = "hdmi:1"
device.buffering.buffer_size = "34560"
device.buffering.fragment_size = "8640"
device.access_mode = "mmap"
device.profile.name = "hdmi-surround"
device.profile.description = "Digital Surround 5.1 (HDMI 0)"
device.description = "Internes Audio Digital Surround 5.1 (HDMI 0)"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
ports:
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "video-display"
device.product.name = "HP w2408"
active port: <hdmi-output-0>

pi@kderaspi:~$uname -a
Linux kderaspi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
FrankyOttobrunn
Registered Member
Posts
2
Karma
0
HINT... to reproduce the behaviour, you need to deactivate some load-modules commands in /etc/pulse/default.pa
I marked the commented out passages bold and underlined .

#!/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, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.fail

### Automatically restore the volume of streams and devices
####load-module module-device-restore
####load-module module-stream-restore restore_device=false
####load-module module-card-restore


### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
####load-module module-switch-on-port-available

### 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 tsched=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 connect=true
.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 autodetect_mtu=yes
.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 GSettings. 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-gsettings.so
.nofail
load-module module-gsettings
.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

### 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

### Make some devices default
#set-default-sink output
#set-default-source input


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]