How to get digital surround passthrough via S/PDIF working?

Hi,

I cannot get the digital surround sound working. I used Mint before and there it was working fine.

What I have done; made modifications to /etc/pulse/default.pa and /etc/pulse/daemon.conf. In addition, I made .asoundrc file in my home folder.

I installed alsa-lib-a52pcm by instructions from here: AUR (en) - alsa-lib-a52pcm .

daemon.conf:

## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
## more information. Default values are commented out.  Use either ; or # for
## commenting.

; daemonize = no
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; enable-memfd = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

; high-priority = yes
; nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

; resample-method = speex-float-1
; avoid-resampling = false
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
; enable-lfe-remixing = no
; lfe-crossover-freq = 0

flat-volumes = no
; flat-volumes = yes

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 200000

; default-sample-format = s16le
default-sample-rate = 48000
; alternate-sample-rate = 48000
default-sample-channels = 6
default-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe

; default-fragments = 4
; default-fragment-size-msec = 25

; enable-deferred-volume = yes
; deferred-volume-safety-margin-usec = 8000
; deferred-volume-extra-delay-usec = 0

default.pa:

# 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
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
.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 channels=2
.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
load-module module-dbus-protocol
.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

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

### Make some devices default
#set-default-source alsa_output.pci-0000_00_14.2.iec958-stereo.monitor
#set-default-sink alsa_output.pci-0000_00_14.2.iec958-ac3-surround-51
load-module module-combine channels=6 channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe

.asoundrc:

pcm.a52 {
@args [CARD]
@args.CARD {
type string
}
type rate
slave {
pcm {
type a52
bitrate 448
channels 6
card $CARD
}
rate 48000
}
}

My system:

Kernel: 5.9.3-1-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 10.2.0 Desktop: Xfce 4.14.2 Distro: Manjaro Linux 
Machine:
  Type: Desktop Mobo: ASUSTeK model: M5A97 EVO R2.0 v: Rev 1.xx 
  serial: <superuser/root required> BIOS: American Megatrends v: 2603 
  date: 02/12/2015 
Battery:
  Device-1: hidpp_battery_0 
  model: Logitech Illuminated Living-Room Keyboard K830 
  charge: 100% (should be ignored) status: Discharging 
CPU:
  Info: Quad Core model: AMD FX-4130 bits: 64 type: MCP arch: Bulldozer 
  rev: 2 L2 cache: 2048 KiB 
  flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 30513 
  Speed: 1420 MHz min/max: 1400/3800 MHz boost: enabled Core speeds (MHz): 
  1: 1484 2: 1429 3: 1420 4: 1439 
Graphics:
  Device-1: AMD Cape Verde PRO [Radeon HD 7750/8740 / R7 250E] 
  vendor: PC Partner Limited driver: amdgpu v: kernel bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.9 driver: amdgpu,ati 
  unloaded: modesetting,radeon resolution: 1920x1080~60Hz 
  OpenGL: renderer: AMD Radeon HD 7700 Series (VERDE DRM 3.39.0 
  5.9.3-1-MANJARO LLVM 10.0.1) 
  v: 4.6 Mesa 20.2.1 direct render: Yes 
Audio:
  Device-1: AMD SBx00 Azalia vendor: ASUSTeK driver: snd_hda_intel v: kernel 
  bus ID: 00:14.2 
  Device-2: AMD Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 
  Series] 
  vendor: PC Partner Limited driver: snd_hda_intel v: kernel bus ID: 01:00.1 
  Sound Server: ALSA v: k5.9.3-1-MANJARO 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: ASUSTeK P8 series driver: r8169 v: kernel port: d000 
  bus ID: 02:00.0 
  IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: f0:79:59:63:f1:5c 
Drives:
  Local Storage: total: 810.44 GiB used: 495.74 GiB (61.2%) 
  ID-1: /dev/sda vendor: Seagate model: ST3250410AS size: 232.89 GiB 
  ID-2: /dev/sdb vendor: Seagate model: ST9500325AS size: 465.76 GiB 
  ID-3: /dev/sdc vendor: Intel model: SSDSA2BW120G3H size: 111.79 GiB 
Partition:
  ID-1: / size: 109.53 GiB used: 15.33 GiB (14.0%) fs: ext4 dev: /dev/sdc1 
Swap:
  Alert: No Swap data was found. 
Sensors:
  System Temperatures: cpu: 15.2 C mobo: N/A gpu: amdgpu temp: 37.0 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 202 Uptime: 53m Memory: 7.68 GiB used: 1.28 GiB (16.7%) 
  Init: systemd Compilers: gcc: 10.2.0 clang: 10.0.1 Packages: 1179 
  Shell: Bash v: 5.0.18 inxi: 3.1.08

I have recently tried to do the same thing to set up surround sound. I found that everything I tried did not give me surround sound options in the settings but I was able to set it up another way. I installed paprefs and enabled simultaneous output in that program then opened gnome settings and set the output device to simultaneous output. Test it with the sound tester in gnome settings or youtube. You may have to set the default-sample-channels which it seems like you already did.

# pacman -S paprefs

Sorry if this doesn’t answer your question this was just a workaround that worked for me.

Thanks, @jaden but this method is not working.

speaker-test -t wav -c 6 gives sound for just front channels.