• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Multichannel audio on a Pi will get a whole lot easier and cheaper!

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,678
Likes
2,301
I petitioned HifiBerry to see if they had any interest in producing a HDMI input HAT for the RPi5. Unfortunately, they said it wasn't feasible with HDMI licensing.

Michael
Ok i Will give my DIY board a try then
 

Frunse

Active Member
Joined
Feb 21, 2024
Messages
133
Likes
20
I petitioned HifiBerry to see if they had any interest in producing a HDMI input HAT for the RPi5. Unfortunately, they said it wasn't feasible with HDMI licensing.

Michael
Yes, this is only something for big Companies i guess Licensing is Expensive, also that why you can't do DIY Surround processors, they also need lots of Money for Dolbydigtal and DTS Licensing :(

It tooks me lot of time to get an working HDMI I2S Multichannel Board, looking already over 10 Years for somthing like that. I am happy that it works now how it is ;)

And also realy Cheep tho.

First i was thinkink need to get that expensive HDMI to 4x SPDIF / ASEBU extractor for 1600€ (Forget the Name of that Device) and now it works for 20-40 Bugs ;)

Didn't think the Soundquality is so much better worth to pay 1560 € more.

Robert
 

Frunse

Active Member
Joined
Feb 21, 2024
Messages
133
Likes
20
Work in Progress ;)
Found an Solution that will fit into my Hypex Amp.
This way it could work.

Arduino Nanno
Rotary Encoder
Relais Volume 2 Chanels XLR (Twited Pair Audio design)
I2C 2x 20 Character Display
3 MCP 23008 I2C Expander (Clip, DC Error and Power Good, Mute Signals will feed in to the third MCP 23008 with Optical isolators)
TTL to RS485 (Connection to the CamillaDSP Raspi for Remote Control point to point Connection) 7 to 9 Amps at all ;)

Also plan to build an smal Adapter Case with Ethernet RJ45 Connector to 2x XLR and RS485 and 12v, GND so i can use an Ethernet Kabel for the 5-10M to CamillaDSP
there you has 4 twisted pairs in one Kabel (Studios use also that kind of Distrebution) why not at Home ;)

Robert
 

Attachments

  • Relais Based.jpg
    Relais Based.jpg
    135.9 KB · Views: 27
  • Hypex AMP with Relais Volume_Back.jpg
    Hypex AMP with Relais Volume_Back.jpg
    211.3 KB · Views: 27
  • Hypex AMP with Relais Volume.jpg
    Hypex AMP with Relais Volume.jpg
    272.5 KB · Views: 25
Last edited:

Frunse

Active Member
Joined
Feb 21, 2024
Messages
133
Likes
20
I agree, IMO the same effect is here - 120R of the mux vs. the 10k of the other resistor, times the mux THD => 0.2% THD * 0.01 ratio => some 0.002%, rough calculation. Absolutely inaudible. Yet IMO worse than performance of a good DAC chip.

IIRC Ivan talked about using FETs as input attenuator switches in his initial versions of his Cosmos Scaler attenuator, unmeasurable distortion. In the end he used relays anyway https://www.audiosciencereview.com/forum/index.php?attachments/dsc_1027-1-jpg.304240/ :)

Back to that attenuator - probably it's not about distortion, but about whether this type of analog attenuator can further attenuate noise floor from a good DAC. If not, IMO no technical reason to avoid digital VC and complicate the design with these analog circuits.
Found an good Analogue Mux but cost 5€ (2,60€ 1500 Piece ;) ) one Piece and has only 4 switches so 20€ for one Channel Volume Control :(
And you need additional Chips for Controlling no logic in there. Or one 16Bit I2C Expander for one Channel

Analogue Devices ADG1611 Ron = 1,1 Ohm
Minimum distortion: THD + N = 0.007%
Max Dual Supply +/-8V

SSM2404 not in Production anymore was also an good Switch.
Used them already Years ago for an Preamp for input switching with the PG2310 and OP8610 + BUF634 on Outputstage. One Channel for Preamp and one for Headfone Out.
So used 2 Seperate Boards One for Left and one for right Channel.
Build it 2007 and still have them laying around unused \o/

At the End i can get the Omron G6K-2P for around 2€ a Piece if i buy >80 so there we again, using relais is probably the Best Compromise
THD+N wise

Robert
 
Last edited:

Frunse

Active Member
Joined
Feb 21, 2024
Messages
133
Likes
20
Hello,
still alive but got last Monday an Lumbago thats hurt me a lot!

But still on Prototyping.

Got the Arduino running for my Volumecontrol with Relays and the Schematic for Comunication with the Hypex Amp (Isulated)
Reading the Temperture work's also. So looks good so far.

Some Resistors Value's i need to check on Prototype. could be I need to change some.

Volume Damping is from -63,5dB to 0 in 0,5dB Steps with one extra Mute Relais on Bit 8.

And Yes i could remove some Pullups on Analogue ins but was to lazy for now ;) You could aktivate them on Arduino by configure it as Input.
I will do .


But at all it could work ;)

Robert
 

Attachments

  • Relais Based Top.jpg
    Relais Based Top.jpg
    176.9 KB · Views: 19
  • Schematic.jpg
    Schematic.jpg
    308.7 KB · Views: 19
  • Prototyping.jpg
    Prototyping.jpg
    348.6 KB · Views: 19
Last edited:

challenge

New Member
Joined
Feb 19, 2022
Messages
1
Likes
0
@Nisse10000 @oomzay @phofman I see the channel swapping issue is getting the attention of the raspberry pi guys, thank you for that!!
Btw, the raspberry pi guy said it happens with rp5 as well
@Nisse10000 @oomzay @phofman @MCH @gordoste
Sorry to pollute a bit this thread, and sorry to ping you all directly... but I have the same HDMI channel swapping issue since years.
I just realized now that you guys were discussing it here months ago...
I also saw the official rpi thread about the issue, but what's the best workaround till it's fixed?

Is there a working temp fix without having to hack and rebuild camilladsp to detect the buffer underrun?
I mean is there a working combo of config.txt, cmdline.txt, asound / camilla / other config files and/or swapping driver to set and forget (in moode+camilladsp) till it'll be fixed?

I read about the fkms/kms different options, saw old posts telling fkms with asoundrc was the solution, then it didn't work anymore, or people losing hw volume, having to loopback things or 24bits not working etc after applying some of these solutions...
I am not really scared to rebuild camilladsp code as per this post here... just want to know if there's a (dirty) proven workaround to prevent the issue instead of hacking camilladsp to restart on underruns. Also if it happens with both drivers or not, cause I am reading different opinions. Tried some and got confused, as there are many combinations once you start edit things here and there.
Just want to gather the information and write it down, cause every time I update moode I forget about it and the problem resurfaces every time, randomly, with no clear fix.
I have a Pi4 with suptronics x6000 7.1ch hat (explore chip) BTW.
thank you
 
Last edited:

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,678
Likes
2,301
@Nisse10000 @oomzay @phofman @MCH
Sorry to pollute a bit this thread, and sorry to ping you all directly... but I have the same HDMI channel swapping issue since years.
I just realized now that you guys were discussing it here months ago...
I also saw the official rpi thread about the issue, but what's the best workaround till it's fixed?

Is there a working temp fix without having to hack and rebuild camilladsp to detect the buffer underrun?
I mean is there a working combo of config.txt, cmdline.txt, asound / camilla / other config files and/or swapping driver to set and forget (in moode+camilladsp) till it'll be fixed?

I read about the fkms/kms different options, saw old posts telling fkms with asoundrc was the solution, then it didn't work anymore, or people losing hw volume, having to loopback things or 24bits not working etc after applying some of these solutions...
I am not really scared to rebuild camilladsp code as per this post here... just want to know if there's a (dirty) proven workaround to prevent the issue instead of hacking camilladsp to restart on underruns. Also if it happens with both drivers or not, cause I am reading different opinions. Tried some and got confused, as there are many combinations once you start edit things here and there.
Just want to gather the information and write it down, cause every time I update moode I forget about it and the problem resurfaces every time, randomly, with no clear fix.
I have a Pi4 with suptronics x6000 7.1ch hat (explore chip) BTW.
thank you
Hey @challenge i am MRamone from the post you quoted and that hack was the only workaround i have found. I was following most of the discussions at the time and i don't remember any working solution, but i am the less knowledgeable of the team, maybe others have tried something successfully.

PS: i was very surprised when the discussion and troubleshooting started last year that the issue was unknown, but little by little things start to make sense. I hope someone finds a solution, as apparently the problem persists with the Pi5...
 

phofman

Addicted to Fun and Learning
Joined
Apr 13, 2021
Messages
511
Likes
334
I am not really scared to rebuild camilladsp code as per this post here... just want to know if there's a (dirty) proven workaround to prevent the issue instead of hacking camilladsp to restart on underruns.
Well, as you see those discussions, no new posts have been added. IMO it's safe to assume nothing has changed since then.

The solution doing restarting CDSP (and therefore re-opening the device) instead of plain snd_pcm_prepare at XRUN is a reasonable method, nothing hacky. Recompiling CDSP on a decent CPU (which RPi4 is) is just a few commands in terminal, as Henrik nicely details in the docs.
 

Tell

Active Member
Joined
Mar 30, 2024
Messages
127
Likes
166
I petitioned HifiBerry to see if they had any interest in producing a HDMI input HAT for the RPi5. Unfortunately, they said it wasn't feasible with HDMI licensing.

Michael
Damn sad to hear! Always those proprietary things that have to ruin it for everyone :\
So what is the best and easiest way of getting multichannel PCM into the pi? USB? Some external HDMI extractor?
 

silverD

Member
Joined
May 12, 2020
Messages
41
Likes
41
I received my DAC8x and planned on using it with a Hifime S2 Digi and CamillaDSP for active speakers. I used the great tutorial from @mdsimon2 and Ubuntu 24.04 server LTS, but couldn't get the DAC8x to be recognized. After hours of struggling, it seems as though there is a bug with overlays. I reimaged the sd card with Raspberry Pi OS Lite 64, followed the tutorial again along with installing git ( sudo apt install git ), and added the overlay for config.txt: dtoverlay=hifiberry-dac8x and it seems to be working.
 

phofman

Addicted to Fun and Learning
Joined
Apr 13, 2021
Messages
511
Likes
334
... Ubuntu 24.04 server LTS, but couldn't get the DAC8x to be recognized. After hours of struggling, it seems as though there is a bug with overlays. I reimaged the sd card with Raspberry Pi OS Lite 64, followed the tutorial again along with installing git ( sudo apt install git ), and added the overlay for config.txt: dtoverlay=hifiberry-dac8x and it seems to be working.
Are the driver + overlay already present in the Ubuntu kernel? It was added to RPi kernel in March 2024 https://github.com/raspberrypi/linux/commit/99e6cb05eaa2b133d9a2b7cb031fef2c19577cc1
 

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,530
Likes
3,410
Location
Detroit, MI
My dac8x just arrived and I just tried installing Ubuntu 24.04, here is what I am seeing in dmesg. Note, I get a similar error when I attempt to implement the generic 8 channel I2S overlay described earlier in the thread.

HifiBerry DAC8X
Code:
[    6.342888] designware-i2s 1f000a0000.i2s: Missing dma channel for stream: 0
[    6.344846] [drm] Initialized v3d 1.0.0 20180419 for 1002000000.v3d on minor 0
[    6.353220] designware-i2s 1f000a0000.i2s: ASoC: error at snd_soc_pcm_component_new on 1f000a0000.i2s: -22
[    6.363521] snd-rpi-simple soc:sound: ASoC: can't create pcm HifiBerry DAC8x HiFi :-22
[    6.377484] snd-rpi-simple soc:sound: Failed to register card -22
[    6.384223] snd-rpi-simple: probe of soc:sound failed with error -22

Generic 8 Channel I2S
Code:
[    6.534964] designware-i2s 1f000a4000.i2s: Missing dma channel for stream: 0
[    6.542695] designware-i2s 1f000a4000.i2s: ASoC: error at snd_soc_pcm_component_new on 1f000a4000.i2s: -22
[    6.550466] pispbe 1000880000.pisp_be: hog_output device node registered as /dev/video23
[    6.552969] asoc-simple-card soc:sound: ASoC: can't create pcm 1f000a4000.i2s-dit-hifi :-22
[    6.562225] asoc-simple-card: probe of soc:sound failed with error -22

EDIT: This seems to be the same issue -> https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2060240.

Michael
 
Last edited:

phofman

Addicted to Fun and Learning
Joined
Apr 13, 2021
Messages
511
Likes
334
[ 6.342888] designware-i2s 1f000a0000.i2s: Missing dma channel for stream: 0
It looks like the I2S driver is not correctly configured from device tree. It seems to be a problem of ubuntu only https://www.google.com/search?client=firefox-b-lm&q=designware-i2s+1f000a0000.i2s:+Missing+dma+channel+for+stream:+0

Maybe RPi has pushed some patch which ubuntu did not apply. These device-specific configs are difficult to get right on a general-purpose distribution like ubuntu. IMO it's best to use RPi distribution for low-level RPi device support.

A side note: Canonical themselves recommend to wait with installation for 24.04.1 release. There will be many many bugs ironed out in the meantime.
 
Last edited:

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,530
Likes
3,410
Location
Detroit, MI
Damn sad to hear! Always those proprietary things that have to ruin it for everyone :\
So what is the best and easiest way of getting multichannel PCM into the pi? USB? Some external HDMI extractor?

The cheapest option is the 8 channel HDMI to I2S extractor mentioned in this thread. I did run into some issues with it using my Okto, but thinking back I wonder if I could have relaxed the DPLL settings. I might also try it again for a longer period of time with my MOTU Ultralite Mk5, as that seems to have less clocking issues than the Okto.

As a slightly more polished solution, @yulun (yulen on DIY audio) has an interesting HDMI to 8 channel AES box -> https://www.diyaudio.com/community/threads/hdmi-to-aes-ebu.373383/post-7554336. I believe he sells these on taobao under store name SoundProAudio. This could be paired with something like a miniDSP U-DIO8 or an Okto dac8 pro to get 8 channel HDMI into the RPi.

As a legit but very expensive solution a VanityPro can convert HDMI to 8 channel AES/SPDIF or USB -> https://www.jvbdigital.com/vanitypro.html. AES/SPDIF could again be used with a U-DIO8 or Okto or you could use the USB input. My preference would be AES/SPDIF as you should be able to end up with a lower latency, clock sync'd setup.

Michael
 

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,530
Likes
3,410
Location
Detroit, MI
@mdsimon2 @silverD
Does the Hifiberry DAC8x have an MCLK input or output?

It definitely is not taking MCLK from the RPi, only BCLK and LRCLK. As I understand they using the PCM5102A PLL to generate a MCLK from BCLK. I don't think this generated MCLK is available on a pin, I guess I could probe the pins and see what I find.

Michael
 

phofman

Addicted to Fun and Learning
Joined
Apr 13, 2021
Messages
511
Likes
334
  • Like
Reactions: MCH
Top Bottom