Pulseaudio Crossover Rack - multi-way crossover design & implementation with linux

OK, let's create proper card file for your driver. Apparently just including hdmi.conf in .asoundrc does not work, probably requires some variables which are not set (CARD).

First we will learn what filename alsa expects (very likely bcm2835.conf, but let's be certain). Please output of:


Code:
strace -f aplay -L 2>&1 | grep -i bcm2835

I really appreciate all of the time you've spent helping me thus far phofman.

Code:
pi@raspberrypi:~ $ strace -f aplay -L 2>&1 | grep -i bcm2835
access("/usr/share/alsa/cards/bcm2835_alsa.conf", R_OK) = -1 ENOENT (No such file or directory)
    bcm2835 ALSA, bcm2835 ALSA
    bcm2835 ALSA, bcm2835 ALSA
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    bcm2835 ALSA, bcm2835 ALSA
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    bcm2835 ALSA, bcm2835 ALSA
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    bcm2835 ALSA, bcm2835 ALSA
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    bcm2835 ALSA
 
I am learning as much as you are 🙂

Great, we see alsa-lib is looking for file /usr/share/alsa/cards/bcm2835_alsa.conf , which obviously does not exist.

I have not found a working example for HDMI, only for IEC958 (SPDIF) Raspberry Pi - MythTV Official Wiki . The problem is HDMI is a bit different, because it offers multichannel PCM (unlike SPDIF which is always 2 channels). The only HDMI config in cards is for Intel-HDA which is very complicated.

I will ask at alsa-devel mailing list how the config for HDMI should look like. I am surprised RPi (raspbian) does not have it yet.
 
If the problem lies with ALSA, then I wonder why did I not run into any of this when I was working on and testing the kernel mod that I posted about? See:
2-in, 8-out DSP platform using the Raspberry Pi + HATs

Maybe running raspi-update is breaking the bcm2835_alsa.conf file with respect to HDMI? I have never run that command on my machines, only update/upgrade. If I want/need an updated distro I typically install from scratch.
 
If the problem lies with ALSA, then I wonder why did I not run into any of this when I was working on and testing the kernel mod that I posted about? See:
2-in, 8-out DSP platform using the Raspberry Pi + HATs

Maybe running raspi-update is breaking the bcm2835_alsa.conf file with respect to HDMI? I have never run that command on my machines, only update/upgrade. If I want/need an updated distro I typically install from scratch.

Hi Charlie,

I did suspect yesterday that the raspi-update had messed me up because I noticed that I'd lost audio altogether after running that update.

We're currently troubleshooting on a freshly installed Raspbian from scratch that I did yesterday afternoon. I've only done an update/upgrade as well as installed PaXoverRack and JRiver MC.

Having a look at the URL that you posted above.

Thanks
 
Last edited:
The reason is you are not using PA. These "added" PCMs are required by PA profiles. They allow PA to work with various soundcards in equal manner.

OK, sorry, you are right. I only use pulse audio to collect sounds from apps and system sounds, and then I use another application that can act as a pulse sink, that does all my "crossover" processing, and then sends the audio out via ALSA directly. In the pulse configuration (using pavucontrl) I just disable my DAC so that ALSA can do its thing, unimpeded.

Unfortunately that does not help at all with this situation, since the PA Crossover Rack is all done within pulse.

I wonder if it would be possible as a workaround to have pulse send the multichannel output to an ALSA loopback, and have another application just connect the loopback output to the actual DAC via ALSA.
 
Last edited:
This is not the way it's intended to work. Thanks phofman for hunting down this issue and doing it the "correct way", i.e. adding a correct config file.

Btw. I messed around with these alsa-mixer configs a little bit myself as pulseaudio has a hardcoded constraint that it only handles up to two alsa mixer channels. It simply refuses to handle more than that. I tried to fix that with a custom config file but gave up after a few hours and now I'm simply using only software volume control.

But from these experiments I thougth that these config files only hande the mixer stuff, didn't know that these also handle the channel mappings in general. Also learning from these experiments, so thanks for your valuable support!
 
Until proper card file is ready, PA can be configured directly with an 8ch PCM device to allow testing paxor.

* Creating new 8ch HDMI device in ~/.asoundrc :

Code:
pcm.hdmi8ch {
  type hw
  card 0
  device 1
  channels 8
}

* Telling PA to use this device

Code:
pactl load-module module-alsa-sink device="hdmi8ch"
pacmd set-default-sink alsa_output.hdmi8ch
For repeated use the config should go to default.pa https://www.diyaudio.com/forums/pc-...-crossovers-using-pax-rack-5.html#post5807091

IMO this is the simpliest way to go ahead now.
 
Ohhhh boy!!!!

Fresh Raspbian install and the solution above seems to be working!

I can't actually test because I'm currently logged in remotely but I'm seeing all 8ch available for output in PaXoverRack!

Thanks to all, especially to phofman for all of your help

@skyunlimited, I'll compare this to the config with 'card ALSA'
as well.
 
front-left
front-right
rear-left
rear-right
front-center
lfe
side-left
side-right

the usual 7.1 names. On earlier tests we found, that not all AVRs could play all eight channels; Onkyos can, Pioneers can not...

Channel mapping on AVRs differs, i have connected speakers to front l+r and rear l+r, but for the rears on the Avr i have to choose front-center and lfe in Paxor.
 
Last edited:
On earlier tests we found, that not all AVRs could play all eight channels

Specifying the required number of channels in the hdmi8ch device should work, if the driver/HW supports other number of channels than 2 and 8.

Channel mapping on AVRs differs.

That is a common problem. Alsa has a channel mapping infrastructure, but the easiest would be re-routing the channels in hdmi8ch e.g. ALSA/en - Gentoo Wiki