• 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!

Actually most of the rather plentiful RK3588 boards (every major SBC vendor has at least one) feature the HDMI input. One of the HDMI outputs also features 8ch eARC support. Internally the HDMI RX/eARC are connected to internal dedicated 8ch I2S interfaces (RK3588 has 10 of them).

But none of the boards (AFAIK, I've spent quite a few hours searching for one) features ready-made 8ch I2S output. Many combinations... but never complete set. Many USB ports available though... but no inexpensive low-latency 8ch UAC2-I2S bridge is available.

Mainline kernel does not support RK3588 GPU/HDMI, not forward-ported from rockchip android kernel yet. But it will be.

RK3588 does stand out in terms of peripherals, ideal for a universal audio bridge. Not low-cost though...
 
@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
 
Last edited:
I plan on living with this setup for a while to make sure it is stable.

I've been living with the HDMI to I2S extractor in my main Okto / CamillaDSP setup for a while and have been very pleased. I am using an Apple TV 4K in to a u9 HDMI splitter, with the TV portion of the splitter going to a Vizio M558-G1 TV and the audio portion going to the HDMI to I2S extractor. This setup works with 4K Dolby Vision and 4:4:4 color (admittedly I typically leave my Apple TV at 4K @ 60 Hz SDR 4:4:4 as I don't really like Dolby Vision / HDR).

CEC still works and I control the Apple TV, TV and Okto with the Apple TV remote.

In order to get a stable platform for a semi-permanent setup I have the extractor mounted to the top of the RPi5 with standoffs.

IMG_8991.jpeg


I've been clocking the Okto directly from the extractor and it works well. I originally started with the TOSLINK output as shown in the above picture but have since moved to using the coaxial output for clocking. This results in the same number of boxes / power plugs as my previous setup which consisted of a HDMI to TOSLINK extractor + TOSLINK to coaxial converter, now replaced by the HDMI to I2S extractor + HDMI splitter. I could even get rid of one power plug if I power the HDMI to I2S extractor from the RPi5.

I am only using it with a stereo setup (LX mini + subs) and am doing 5.1 down mix in CamillaDSP. My sighted, biased impression is that dialog is clearer on movies with this setup compared to using the Apple TV for stereo down mix. At the very least being able to adjust the center channel level is helpful and you still have the option of switching to having the Apple TV down mix if needed.

Overall, Apple TV + HDMI to I2S extractor + u9 splitter + RPi5 seems like a very viable starting point for a DIY AVR replacement setup.

Michael
 
I've been living with the HDMI to I2S extractor in my main Okto / CamillaDSP setup for a while and have been very pleased. I am using an Apple TV 4K in to a u9 HDMI splitter, with the TV portion of the splitter going to a Vizio M558-G1 TV and the audio portion going to the HDMI to I2S extractor. This setup works with 4K Dolby Vision and 4:4:4 color (admittedly I typically leave my Apple TV at 4K @ 60 Hz SDR 4:4:4 as I don't really like Dolby Vision / HDR).

CEC still works and I control the Apple TV, TV and Okto with the Apple TV remote.

In order to get a stable platform for a semi-permanent setup I have the extractor mounted to the top of the RPi5 with standoffs.

View attachment 350457

I've been clocking the Okto directly from the extractor and it works well. I originally started with the TOSLINK output as shown in the above picture but have since moved to using the coaxial output for clocking. This results in the same number of boxes / power plugs as my previous setup which consisted of a HDMI to TOSLINK extractor + TOSLINK to coaxial converter, now replaced by the HDMI to I2S extractor + HDMI splitter. I could even get rid of one power plug if I power the HDMI to I2S extractor from the RPi5.

I am only using it with a stereo setup (LX mini + subs) and am doing 5.1 down mix in CamillaDSP. My sighted, biased impression is that dialog is clearer on movies with this setup compared to using the Apple TV for stereo down mix. At the very least being able to adjust the center channel level is helpful and you still have the option of switching to having the Apple TV down mix if needed.

Overall, Apple TV + HDMI to I2S extractor + u9 splitter + RPi5 seems like a very viable starting point for a DIY AVR replacement setup.

Michael
Hello im Robert from Germany and new here but read already a lot off stuff about CamillaDSP and im fixed by this idea using an Raspberry 5 for DSP Processing instead of an fixed DSP Processor with only 32bit or 48Bit Processingpower with limited Memmory and short FIR length!

Flexibility is the Key here, of course with lot more effort to get it working.

At the Moment i use the Najda DSP Board with an Volumio Raspberry 4 Combo (All only Stereo) and sounds good to me.
Speaker designd by my self and build by an Woodmaker neare by (at that time i didnt had an CNC Router like now ;) )
At that time i had already the idea to get an 5.2 Speakersystem full DSP aktiv running and ordered Enclousures for 5 2 Way speaker and 2 10" Subs from that Woodmaker.
Speaker i completed long time ago. (The Subs will change next to 2x RIPOL with 4 12" Chassis but tat's an other Story ;) )
But till now i didnt get that Surround Setup running by the lag of an DSP with HDMI (7.1 PCM) In and at minimum of 12 Channel Analogue Out.

The next idea was using 2 FLEX HT DSP's at once (Bluerayplayer has 2 HDMI Outs, or using an HDMI Spliter) but at the right moment i read they didnt have InputPEQ's on that Device but on all other Flex DSP's.
I dont want to have Dirac for extra 300€ for each Device but 10 Input PEQ per Channel are important for the Roomcorrection manualy at least.
So i canceled the order of one FLEX HTx. \o/

And by searching an alternativ thats payable i read about moode and CamillaDSP the last days ;)

Now im here :)

First i got an MOTU Ultralite mk5 (but only for REW Speaker Measurment's because of that good Performance Price Ratio) and now i could using it for Camilla DSP thats perfect too.

An Raspberry 5 i got last weeks also. but was testing it for REW Using on Linux instead of Windows with MOTU, thats works fine also!

The same HDMI to I2S Board on that Picture above i ordered yesterday (50€ on Alibaba)
But if anyone has build an nice HDMI IN HAT (7.1 capable) i would change it!!! No doubt.

After the MOTU i use Hypex Amps for all my Speakers with XLR IN 5 pc. 2x 125Watt 4Ohm and 2 pc. 1x250Watt 4Ohm.

So now i will start to use CamillaDSP and have some Questions for the Possibilitys it has. May be anyone who has used it already alot could answere please ;) THE Camilla DUDE :)

1. Is it Possible to Use CamillaDSP on the same Raspberry with REW to Measure the filtered Outs while CamilaDSP is running? So let say i Use the MIC 1 IN (MOTU) and route it one by one to the CamillaDSP 7.1 IN. Or better to Use REW on an Second (Measurment only) System and feed it in the HDMI of the Camilla Raspberry for the Measurements???
2. And for an complete System, is it possible using Moode with REW and CamillaDSP on one Raspberry 5 capable Playing stuff from Harddrive or Network and from HDMI IN and also Measuring the Outs for Filterdesign or Roomcorection thats would be the Dream i have!
3. Has anyone tried to use 2 Device of MOTU Ultralite mk5 at once with Camilla on one Raspberry, let say for an 7.1 System, I gues it must work each device get an own ID Number, right?

Flyrc for Remote Controll as well (but will order it when i got all the other stuff running)
I also have an Set of Volume Relais Boards from Twistedpair Audio for 12 Channels RCA with conversion to XLR or 6 Channel TRS, XLR only to control all Out Channels at once (5.2 Setup).

Has anyone test anything like this already?

Moode with CamillaDSP works what i read but all together .....good question right?

I will start slowly using Moode + CamillaDSP with my Speaker (2.2 for now) and complete it one after another (HDMI in 7.1, REW....) have also an Raspberry 4 that i can Use for Measurement or an Intel Nuc Core I5 with an Terratec DMX6Fire.

Lets the Game Beginn ;)

Have a nice Week Guys and Girls ;)

Im IN

Robert
 
Last edited:
Hi Robert, welcome.

1. Is it Possible to Use CamillaDSP on the same Raspberry with REW to Measure the filtered Outs while CamilaDSP is running? So let say i Use the MIC 1 IN (MOTU) and route it one by one to the CamillaDSP 7.1 IN. Or better to Use REW on an Second (Measurment only) System and feed it in the HDMI of the Camilla Raspberry for the Measurements???

It has been a while since I've attempted this but, in the past, I could not get it to work. When running CamillaDSP it would make the MOTU analog inputs unavailable in REW. I was able to run CamillaDSP and still use the analog inputs in REW when running CamillaDSP on a Mac.

Using HDMI for measurements probably isn't a great idea as you have no way of implementing a loopback for timing purposes. A simple way to get around this is to use the analog inputs of the MOTU for measurements with a separate interface upstream. For example, I know people that use a MOTU M4 connected to a PC, have a one analog output of the M4 looped back to an input as a timing reference, have another analog output sent to an analog input of the MOTU Ultralite Mk5 and then a XLR mic connected to M4 mic input. You can change the routing in CamillaDSP so the analog input of the Mk5 is routed to whatever output channels you are measuring.

2. And for an complete System, is it possible using Moode with REW and CamillaDSP on one Raspberry 5 capable Playing stuff from Harddrive or Network and from HDMI IN and also Measuring the Outs for Filterdesign or Roomcorection thats would be the Dream i have!

It has been a while since I've used Moode, but in the past, using external inputs (like HDMI) with Moode did not work very well. Just my opinion, but if you are switching inputs, I'd do a vanilla installation of CamillaDSP on a normal OS, rather than use Moode.

3. Has anyone tried to use 2 Device of MOTU Ultralite mk5 at once with Camilla on one Raspberry, let say for an 7.1 System, I gues it must work each device get an own ID Number, right?

I think the best option is to use one MOTU UL Mk5 connected to the RPi running CamillaDSP and then use the ADAT / SPDIF outputs into another DAC / interface that is not connected to the RPi and just acts as a simple DAC. If you only need 12 analog outputs this could even be as simple as using a stereo DAC with SPDIF input.

Michael
 
Hi Robert, welcome.



It has been a while since I've attempted this but, in the past, I could not get it to work. When running CamillaDSP it would make the MOTU analog inputs unavailable in REW. I was able to run CamillaDSP and still use the analog inputs in REW when running CamillaDSP on a Mac.

Using HDMI for measurements probably isn't a great idea as you have no way of implementing a loopback for timing purposes. A simple way to get around this is to use the analog inputs of the MOTU for measurements with a separate interface upstream. For example, I know people that use a MOTU M4 connected to a PC, have a one analog output of the M4 looped back to an input as a timing reference, have another analog output sent to an analog input of the MOTU Ultralite Mk5 and then a XLR mic connected to M4 mic input. You can change the routing in CamillaDSP so the analog input of the Mk5 is routed to whatever output channels you are measuring.



It has been a while since I've used Moode, but in the past, using external inputs (like HDMI) with Moode did not work very well. Just my opinion, but if you are switching inputs, I'd do a vanilla installation of CamillaDSP on a normal OS, rather than use Moode.



I think the best option is to use one MOTU UL Mk5 connected to the RPi running CamillaDSP and then use the ADAT / SPDIF outputs into another DAC / interface that is not connected to the RPi and just acts as a simple DAC. If you only need 12 analog outputs this could even be as simple as using a stereo DAC with SPDIF input.

Michael
OK, and thanks for reply.

Sounds the best option:
Using one Raspberry 5 only for HDMI in, CamillaDSP, and MOTU as an DAC, on Ubuntu Distro and an second Raspberry (4 or 5) for moode as an Player only, without CamillaDSP thrue the HDMI Out interface with an HDMI Switcher between (for switching between Moode and Blueray or TV)
But im not sure is Raspberry 5 capable playing 7.1 on his own HDMI Out?? Raspberry 4 didnt do this, only Stereo if i remeber me right.

I got this day moode with CamillaDSP running on my 2 way Speaker with an default 2 way Setup (Lowpass and Buffelcompensation for MT and Highpass with Gain -9dB for HT) without Measuring only for fast test with parameters i remember me from Najda Setup and it runs, Apply and saved it to Camilla and to file.

But one Chanel in the hight has strange noise like the Chassis was burned but only on one Channel if i switched the speaker to other Channel sounds normal ~0~

After restarting moode i got an MDP error and no sound device are there anymore, realy strange. But the MOTU stil on and conected to USB.

I guess i better start with an fresh Ubuntu CamillaDSP setup without moode ;)

I Checked the MOTU on an Windows PC with REW, no Problems at all al measurements from in to Out are perfect.....strange (Software ralated on moode than)

even on the Device Tab of Camilla UI there are no Devices listet at all anymore like before reebot (The List was realy Long with all the HDMI interfacec from Raspberry)

New fresh Start will help i guess ;)
 

Attachments

  • pipeline.jpg
    pipeline.jpg
    127.9 KB · Views: 59
Last edited:
Last edited:
@MCH thank you for that Information i will read it next day, i need to wait for that HDMI Input Board til 6. March so anyway still Time left ;)
Time to read all that Stuff about Camilla the nice DSP Girly ;)
 
  • Like
Reactions: MCH
@mdsimon2, you right i have 2 DacMagic still lying around i gues far good enought for 2 sub Channels and they need to fit in Delay to the other Speaker so need to measure and configure it for that. So at all 12 to 14 Channels and all XLR Outs very Nice ;)
 
@Charlie that we need to diskus abit deeper ;)
Loopback for Measurment or for Sub Channel with DacMagic?
Like i understand it, Loopback you need if an Software need play Musik to CamillaDSP on the same Computer right?

Did an fast Quality Test between DacMagic and MOTU, MOTU Wins ;)

But DAC Magic XLR OUT with Volume at max is -10dB on Input of MOTU IN 5

Far good enough for subs or surround back channel's

Motu mk5 has 2 loopback you can switch it from default OUT Chanel 9 and 10 to 1 and 2 if you want. Not sure if you mean this Loopback or Loopback in CDSP Software
i need to feedle around with this by sure ;) Time will show
 

Attachments

  • MOTU ULmk5 OUT 10 to IN 4 0dBFs.jpg
    MOTU ULmk5 OUT 10 to IN 4 0dBFs.jpg
    127.7 KB · Views: 55
  • DACMagic Plus XLR Out to MOTU ULmk5 IN 5 0dBFs.jpg
    DACMagic Plus XLR Out to MOTU ULmk5 IN 5 0dBFs.jpg
    128.4 KB · Views: 50
Last edited:
Hello DIY Friends,

i need to tell you i did it and it seems to work fine with RPI 5 and Ubuntu Desktop on SSD.

I used the instruction from this Forum! Thx @mdsimon2
Took a bit time but worked with a litttle bit off effort ;)

The next day i willll measure it with speaker connected this day i was only measure the MOTU with aplied Filters for test.
Need to build some more TSR to XLR Wire for 2x 2Channel + 2x Sub :) for now

How I did it:
1. Install Ubuntu Desktop Image on RPI5 using Raspbarry Imager (Download the Image from Ubuntu site, will work faster)
2. Install REW Linux Version with this Instruction: https://www.avnirvana.com/threads/installing-rew-on-rarpberry-and-so-raspbian.6559/
3. Connect MOTU Ultralite mk5 and test REW In Outs
4. Install CamillaDSP with this Instruction: https://www.audiosciencereview.com/forum/index.php?threads/rpi4-camilladsp-tutorial.29656/
5. Chose youre Configuration: I used this with an little change to 48000kHz insteed of 44100kHz: ultralitemk5_streamer_44c_96p_v2_12142023.yml
6. Design youre Filter (Filter Tab)
7. Apply the Filter to the right Outputchannel in the Pipline ;) dont forget to hitt apply and save on the left!

Now i need the HDMI Input card for the next Stepps :)

Thank you all
 

Attachments

  • CamillaDSP+REW+Ubuntu+RPI5.jpg
    CamillaDSP+REW+Ubuntu+RPI5.jpg
    829.3 KB · Views: 86
  • Main Speaker.jpg
    Main Speaker.jpg
    157.1 KB · Views: 71
  • Settings REW and UBUNTU Sound.jpg
    Settings REW and UBUNTU Sound.jpg
    510.4 KB · Views: 74
  • Like
Reactions: MCH
@Frunse rpi4 can do multichannel via hdmi out, but I recommend you to read in this same thread about the channel swapping issue. rpi engineers said it affects rp5 as well (link below)

Ok i have read it, but Dude, im not an Software engineer, so nothing i could do to prevent this , right?

Only waiting till anyone solved it :( hopefully

Damm i need to place an 2,2uF Capacitor in Front of the HT to prevent Damage while channel swapp occur, the only thing i can do!

The HT needs only an 6dB filter to work like accusticly 18dB Slope ;)

The only Thing i need than is Delay to get the Impulse Perfect (Timealign)

They cost 200€ a piece or 80€ for an replaced AMT Foil

Till the Error is solved i will do it, 2,2uF is cheep and small .....

Thx for that advise i would realy pissed if i loose my HT's this way ;)

At leased 5 of them at once thats Hurts a lot......


I am wrong, the worst case that could happen is that the Subwoofer channel swaped with the Center or so, the Channelswap is only possible in that HDMI Stuff right?
And not in the Outputchannel of the Motu interface ;)

But i cant listen realy loud so no problem at all :)

I need to switch my Brain on befor talking :) ON Air Light shining......
 
Last edited:
  • Like
Reactions: MCH
Hello my Friends, dit all the mesurements, first for 2 Way Speaker and listen Musik right now!!! Yeah :)

Very cool workflow, if all is on one System.

Musik i listen with Clementine also on that same Raspberry for now, till HDMI Board arrived.

One Question still i need to check:

Why the Hell the Rolloff of my Tweeter is that bad on that Measurement (Cammilla, MOTU, Hypex Amp or Microphone whats the reason for that) \o/

Normaly ti runs til 30kHz ;)

The Chassis are:

Harwood Acoustics AM 25 Air Motion Transformer
Scan Speak 18 W 4434 G00 Fiberglas
NE265W-04 - VIFA 10" NE SERIES SUBWOOFER NEODYMIUM

Next test would be the same crossover but with FIR Filters (rephase) instead of IIR.

Did anyone know if there such a tool (rephase) thats works on Linux???

Happy Weekend guys ;)
 

Attachments

  • Speaker Impulse.jpg
    Speaker Impulse.jpg
    936.8 KB · Views: 75
  • Speaker Measurement 1.jpg
    Speaker Measurement 1.jpg
    926.9 KB · Views: 86
  • HAR-1013300_Frequenz_1.jpg
    HAR-1013300_Frequenz_1.jpg
    50.6 KB · Views: 62
Last edited:
I've been living with the HDMI to I2S extractor in my main Okto / CamillaDSP setup for a while and have been very pleased. I am using an Apple TV 4K in to a u9 HDMI splitter, with the TV portion of the splitter going to a Vizio M558-G1 TV and the audio portion going to the HDMI to I2S extractor. This setup works with 4K Dolby Vision and 4:4:4 color (admittedly I typically leave my Apple TV at 4K @ 60 Hz SDR 4:4:4 as I don't really like Dolby Vision / HDR).

CEC still works and I control the Apple TV, TV and Okto with the Apple TV remote.

In order to get a stable platform for a semi-permanent setup I have the extractor mounted to the top of the RPi5 with standoffs.

View attachment 350457

I've been clocking the Okto directly from the extractor and it works well. I originally started with the TOSLINK output as shown in the above picture but have since moved to using the coaxial output for clocking. This results in the same number of boxes / power plugs as my previous setup which consisted of a HDMI to TOSLINK extractor + TOSLINK to coaxial converter, now replaced by the HDMI to I2S extractor + HDMI splitter. I could even get rid of one power plug if I power the HDMI to I2S extractor from the RPi5.

I am only using it with a stereo setup (LX mini + subs) and am doing 5.1 down mix in CamillaDSP. My sighted, biased impression is that dialog is clearer on movies with this setup compared to using the Apple TV for stereo down mix. At the very least being able to adjust the center channel level is helpful and you still have the option of switching to having the Apple TV down mix if needed.

Overall, Apple TV + HDMI to I2S extractor + u9 splitter + RPi5 seems like a very viable starting point for a DIY AVR replacement setup.

Michael
Hallo Michael,
I got this day the same HDMI to I2S Board and i read all the information in this Threat but im a bit confused now.
I Use UBUNTU 23.1 and CamillaDSP with MOTU UL mk5 is already running very fine. :)
I have also an ARCANA HDMI eARC Device because my LG TV, and older Onkyo Souroundreciever didnt have eArc, and may be to Convert an HDMI Stream to PCM, nice to have ;)

But now i need little advice what to do on the PI, Connection whise i guess the Mapping is right below, but all the Config on Linux would be nice to get help.

/boot/config.txt
dtparam=i2s=on
#dtparam=audio=on #(dont need any onboard Audio out only MOTU UL)


Damm UBUNTU dont has an /boot/config.txt ...\0/
So i guess I2S is already aktiv ...
But aplay -L shows only 7.1 Output Device
and only Front Input Device i gues 2.0 only
See the Sound Device List there lots of Devices already on CamillDSP List
I will connect the Board and let see what happen ;)

I hope i dont need to compile something

Pin Mapping:
PIN 12 GPIO 18: (I2S0_SCLK --> Board BCLK)
PIN 35 GPIO 19: (I2S0_WS --> Board LRCK)
PIN 38 GPIO 20: (I2S0_SDI[0] --> Board SD0)
PIN 15 GPIO 22: (I2S0_SDI[1] --> Board SD1)
PIN 18 GPIO 24: (I2S0_SDI[2] --> Board SD2)
PIN 37 GPIO 26: (I2S0_SDI[3] --> Board SD3)
PIN 6 GND --> Board GND)
PIN 2 or 4 5V --> Board 5V)
? --> Board MCLK)

We dont need MCLK right? ("The MCLK usually is a clock which goes to the codec and not considered part of the I2S communication.")

What else i need to know to do on Ubuntu??? I need it a bit "für DUMMIES" ;)
 

Attachments

  • HDMI to I2S.jpg
    HDMI to I2S.jpg
    345.4 KB · Views: 85
  • ARCANA HDMI.jpg
    ARCANA HDMI.jpg
    234.3 KB · Views: 69
  • Ubuntu Sound Devices_2.jpg
    Ubuntu Sound Devices_2.jpg
    167 KB · Views: 72
  • Ubuntu Sound Devices_3.jpg
    Ubuntu Sound Devices_3.jpg
    92.7 KB · Views: 61
  • Ubuntu Sound Devices.jpg
    Ubuntu Sound Devices.jpg
    160.3 KB · Views: 74
  • Raspberry HDMI I2S Conection.jpg
    Raspberry HDMI I2S Conection.jpg
    426.2 KB · Views: 85
  • aplay -L.txt
    4 KB · Views: 55
Last edited:
I haven't used Ubuntu Server 23.10 with 8 channel I2S input. Here are instructions for Raspberry Pi OS Lite Bookworm.

Not sure if it will work Ubuntu Server 23.10, but the instructions should be the same as Raspberry Pi OS has moved to the same /boot/firmware/ directory for overlays and config.txt -> https://www.raspberrypi.com/documentation/computers/config_txt.html.

1) Create a file called 8chi2s.dts.

Code:
nano 8chi2s.dts

2) Paste the following text in 8chi2s.dts.

Rich (BB code):
//Device tree overlay for 8ch RP1
/dts-v1/;
/plugin/;

/ {
    fragment@0 {
        target = <&rp1_i2s0_18_21>;
        __overlay__ {
            pins = "gpio18", "gpio19", "gpio20", "gpio22", "gpio24", "gpio26", "gpio21", "gpio23", "gpio25",  "gpio27";
        };
    };

    fragment@1 {
        target = <&rp1_i2s1_18_21>;
        __overlay__ {
            pins = "gpio18", "gpio19", "gpio20", "gpio22", "gpio24", "gpio26", "gpio21", "gpio23", "gpio25",  "gpio27";
        };
    };
};

3) Compile 8chi2s.dts.

Code:
dtc -@ -H epapr -O dtb -o 8chi2s.dtbo -Wno-unit_address_vs_reg 8chi2s.dts

4) Copy compiled 8chi2s.dtbo to /boot/firmware/overlays.

Code:
sudo cp 8chi2s.dtbo /boot/firmware/overlays

5) Install git.

Code:
sudo apt install git

6) Clone RaspberryPi_I2S_Slave repository.

Code:
git clone https://github.com/AkiyukiOkayasu/RaspberryPi_I2S_Slave

7) Change directory to RaspberryPi_I2S_Slave.

Code:
cd RaspberryPi_I2S_Slave

8) Edit genericstereoaudiocodec.dts to replace all instances of <&i2s> with <&i2s_clk_consumer>.

Code:
nano genericstereoaudiocodec.dts

Rich (BB code):
//Device tree overlay for generic stereo audio codec. ex) Asahi kasei AK4556
/dts-v1/;
/plugin/;

/ {
    compatible = "brcm,bcm2708";

    fragment@0 {
        target = <&sound>;
        __overlay__ {
            compatible = "simple-audio-card";
            simple-audio-card,name = "GenericStereoAudioCodec";
            status="okay";

            capture_link: simple-audio-card,dai-link@0 {
                format = "i2s";

                // Set RasPi to I2S slave
                bitclock-master = <&r_codec_dai>;
                frame-master = <&r_codec_dai>;

                r_cpu_dai: cpu {
                    sound-dai = <&i2s_clk_consumer>;

                // TDM slot configuration for stereo
                    dai-tdm-slot-num = <2>;
                    dai-tdm-slot-width = <32>;
                };

                r_codec_dai: codec {
                    sound-dai = <&codec_in>;
                };
            };

            playback_link: simple-audio-card,dai-link@1 {
                format = "i2s";

                // Set RasPi to I2S slave
                bitclock-master = <&p_codec_dai>;
                frame-master = <&p_codec_dai>;

                p_cpu_dai: cpu {
                    sound-dai = <&i2s_clk_consumer>;

                // TDM slot configuration for stereo
                    dai-tdm-slot-num = <2>;
                    dai-tdm-slot-width = <32>;
                };

                p_codec_dai: codec {
                    sound-dai = <&codec_out>;
                };
            };
        };
    };

    fragment@1 {
        target-path = "/";
        __overlay__ {
            codec_out: spdif-transmitter {
                #address-cells = <0>;
                #size-cells = <0>;
                #sound-dai-cells = <0>;
                /* 
                    "linux,spdif-dit" is used in generic I2S(transmitter) driver.                     
                    You can see details "linux,spdif-dit" by bellow command
                    modinfo snd_soc_spdif_tx
                */
                compatible = "linux,spdif-dit";
                status = "okay";
            };
            codec_in: spdif-receiver {
                #address-cells = <0>;
                #size-cells = <0>;
                #sound-dai-cells = <0>;
                /* 
                    "linux,spdif-dir" is used in generic I2S(receiver) driver.                     
                    You can see details "linux,spdif-dir" by bellow command
                    modinfo snd_soc_spdif_rx
                */
                compatible = "linux,spdif-dir";
                status = "okay";
            };
        };
    };

    fragment@2 {
        target = <&i2s_clk_consumer>;
        __overlay__ {
            #sound-dai-cells = <0>;
            status = "okay";
        };
    };
};

9) Compile RaspberryPi_I2S_Slave.

Code:
dtc -@ -H epapr -O dtb -o genericstereoaudiocodec.dtbo -Wno-unit_address_vs_reg genericstereoaudiocodec.dts

10) Copy compiled genericstereoaudiocodec.dtbo to /boot/firmware/overlays.

Code:
sudo cp genericstereoaudiocodec.dtbo /boot/firmware/overlays

11) Update /boot/firmware/config.txt with appropriate dtparam / dtoverlay.

Code:
sudo nano /boot/firmware/config.txt

Rich (BB code):
dtparam=i2s=on
#dtparam=spi=on
dtoverlay=genericstereoaudiocodec
dtoverlay=8chi2s

After a reboot you should see the following after running arecord -l and arecord -D hw:GenericStereoAu,1 --dump-hw-params /dev/zero.

Code:
arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: GenericStereoAu [GenericStereoAudioCodec], device 1: 1f000a4000.i2s-dir-hifi dir-hifi-1 [1f000a4000.i2s-dir-hifi dir-hifi-1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Code:
arecord -D hw:GenericStereoAu,1 --dump-hw-params /dev/zero
Warning: Some sources (like microphones) may produce inaudible results
         with 8-bit sampling. Use '-f' argument to increase resolution
         e.g. '-f S16_LE'.
Recording WAVE '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:GenericStereoAu,1":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S16_LE S24_LE S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [32 512]
CHANNELS: [2 16]
RATE: [8000 192000]
PERIOD_TIME: (10 128000]
PERIOD_SIZE: [2 1024]
PERIOD_BYTES: [128 4096]
PERIODS: [2 65536]
BUFFER_TIME: (20 16384000]
BUFFER_SIZE: [4 131072]
BUFFER_BYTES: [128 524288]
TICK_TIME: ALL
--------------------
arecord: set_params:1352: Sample format non available
Available formats:
- S16_LE
- S24_LE
- S32_LE

Michael
 
Last edited:
I haven't used Ubuntu Server 23.10 with 8 channel I2S input. Here are instructions for Raspberry Pi OS Lite Bookworm.

Not sure if it will work Ubuntu Server 23.10, but the instructions should be the same as Raspberry Pi OS has moved to the same /boot/firmware/ directory for overlays and config.txt -> https://www.raspberrypi.com/documentation/computers/config_txt.html.

1) Create a file called 8chi2s.dts.

Code:
nano 8chi2s.dts

2) Paste the following text in 8chi2s.dts.

Rich (BB code):
//Device tree overlay for 8ch RP1
/dts-v1/;
/plugin/;

/ {
    fragment@0 {
        target = <&rp1_i2s0_18_21>;
        __overlay__ {
            pins = "gpio18", "gpio19", "gpio20", "gpio22", "gpio24", "gpio26", "gpio21", "gpio23", "gpio25",  "gpio27";
        };
    };

    fragment@1 {
        target = <&rp1_i2s1_18_21>;
        __overlay__ {
            pins = "gpio18", "gpio19", "gpio20", "gpio22", "gpio24", "gpio26", "gpio21", "gpio23", "gpio25",  "gpio27";
        };
    };
};

3) Compile 8chi2s.dts.

Code:
dtc -@ -H epapr -O dtb -o 8chi2s.dtbo -Wno-unit_address_vs_reg 8chi2s.dts

4) Copy compiled 8chi2s.dtbo to /boot/firmware/overlays.

Code:
sudo cp 8chi2s.dtbo /boot/firmware/overlays

5) Install git.

Code:
sudo apt install git

6) Clone RaspberryPi_I2S_Slave repository.

Code:
git clone https://github.com/AkiyukiOkayasu/RaspberryPi_I2S_Slave

7) Change directory to RaspberryPi_I2S_Slave.

Code:
cd RaspberryPi_I2S_Slave

8) Edit genericstereoaudiocodec.dts to replace all instances of <&i2s> with <&i2s_clk_consumer>.

Code:
nano genericstereoaudiocodec.dts

Rich (BB code):
//Device tree overlay for generic stereo audio codec. ex) Asahi kasei AK4556
/dts-v1/;
/plugin/;

/ {
    compatible = "brcm,bcm2708";

    fragment@0 {
        target = <&sound>;
        __overlay__ {
            compatible = "simple-audio-card";
            simple-audio-card,name = "GenericStereoAudioCodec";
            status="okay";

            capture_link: simple-audio-card,dai-link@0 {
                format = "i2s";

                // Set RasPi to I2S slave
                bitclock-master = <&r_codec_dai>;
                frame-master = <&r_codec_dai>;

                r_cpu_dai: cpu {
                    sound-dai = <&i2s_clk_consumer>;

                // TDM slot configuration for stereo
                    dai-tdm-slot-num = <2>;
                    dai-tdm-slot-width = <32>;
                };

                r_codec_dai: codec {
                    sound-dai = <&codec_in>;
                };
            };

            playback_link: simple-audio-card,dai-link@1 {
                format = "i2s";

                // Set RasPi to I2S slave
                bitclock-master = <&p_codec_dai>;
                frame-master = <&p_codec_dai>;

                p_cpu_dai: cpu {
                    sound-dai = <&i2s_clk_consumer>;

                // TDM slot configuration for stereo
                    dai-tdm-slot-num = <2>;
                    dai-tdm-slot-width = <32>;
                };

                p_codec_dai: codec {
                    sound-dai = <&codec_out>;
                };
            };
        };
    };

    fragment@1 {
        target-path = "/";
        __overlay__ {
            codec_out: spdif-transmitter {
                #address-cells = <0>;
                #size-cells = <0>;
                #sound-dai-cells = <0>;
                /* 
                    "linux,spdif-dit" is used in generic I2S(transmitter) driver.                     
                    You can see details "linux,spdif-dit" by bellow command
                    modinfo snd_soc_spdif_tx
                */
                compatible = "linux,spdif-dit";
                status = "okay";
            };
            codec_in: spdif-receiver {
                #address-cells = <0>;
                #size-cells = <0>;
                #sound-dai-cells = <0>;
                /* 
                    "linux,spdif-dir" is used in generic I2S(receiver) driver.                     
                    You can see details "linux,spdif-dir" by bellow command
                    modinfo snd_soc_spdif_rx
                */
                compatible = "linux,spdif-dir";
                status = "okay";
            };
        };
    };

    fragment@2 {
        target = <&i2s_clk_consumer>;
        __overlay__ {
            #sound-dai-cells = <0>;
            status = "okay";
        };
    };
};

9) Compile RaspberryPi_I2S_Slave.

Code:
dtc -@ -H epapr -O dtb -o genericstereoaudiocodec.dtbo -Wno-unit_address_vs_reg genericstereoaudiocodec.dts

10) Copy compiled genericstereoaudiocodec.dts to /boot/firmware/overlays.

Code:
sudo cp genericstereoaudiocodec.dtbo /boot/firmware/overlays

11) Update /boot/firmware/config.txt with appropriate dtparam / dtoverlay.

Code:
sudo nano /boot/firmware/config.txt

Rich (BB code):
dtparam=i2s=on
#dtparam=spi=on
dtoverlay=genericstereoaudiocodec
dtoverlay=8chi2s

After a reboot you should see the following after running arecord -l and arecord -D hw:GenericStereoAu,1 --dump-hw-params /dev/zero.

Code:
arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: GenericStereoAu [GenericStereoAudioCodec], device 1: 1f000a4000.i2s-dir-hifi dir-hifi-1 [1f000a4000.i2s-dir-hifi dir-hifi-1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Code:
arecord -D hw:GenericStereoAu,1 --dump-hw-params /dev/zero
Warning: Some sources (like microphones) may produce inaudible results
         with 8-bit sampling. Use '-f' argument to increase resolution
         e.g. '-f S16_LE'.
Recording WAVE '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:GenericStereoAu,1":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S16_LE S24_LE S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [32 512]
CHANNELS: [2 16]
RATE: [8000 192000]
PERIOD_TIME: (10 128000]
PERIOD_SIZE: [2 1024]
PERIOD_BYTES: [128 4096]
PERIODS: [2 65536]
BUFFER_TIME: (20 16384000]
BUFFER_SIZE: [4 131072]
BUFFER_BYTES: [128 524288]
TICK_TIME: ALL
--------------------
arecord: set_params:1352: Sample format non available
Available formats:
- S16_LE
- S24_LE
- S32_LE

Michael
Very nice Dude, i didn't understand what i did but it works ;)

some is different

when i type:

arecord -D hw:GenericStereoAu,1 --dump-hw-params /dev/zero

this will not come:
Recording WAVE '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono

all other is the same.

And for what are the "gpio21", "gpio23", "gpio25", "gpio27" for HDMI OUT maybe?

Now need to connect the Board and testing camillaDSP

and Thank you a lot :)

If i get it running i will tell you \o/
 
Nice, so it works on Ubuntu Server 23.10? Or are you on Raspberry Pi OS?

And for what are the "gpio21", "gpio23", "gpio25", "gpio27" for HDMI OUT maybe?

They are for I2S output.

PIN 6 GND --> Board GND)
PIN 2 or 4 5V --> Board 5V)
? --> Board MCLK)

I haven't yet tried powering the HDMI to I2S board from the RPi yet, I've always used a separate 5V PSU. I think I used pin 14 for ground but I don't think it should matter much. No MCLK required.

Michael
 
Last edited:
Nice, so it works on Ubuntu Server 23.10? Or are you on Raspberry Pi OS?



They are for I2S output.



I haven't yet tried powering the HDMI to I2S board from the RPi yet, I've always used a separate 5V PSU. I think I used pin 14 for ground but I don't think it should matter much. No MCLK required.

Michael
HI, yes i am on UBUNTU 23.1
And i build an Prototype with one Powersupply (5.1V / 3,5A at now, with biger RKT max 7A possible) for Both devices (Digital section at all)

Now i will check it ;)

At the End there will be an second RPI4 or 5 in the Case as Mediaplayer and as well HDMI Display Waveshere 7,8" and an HDMI Switcher for different INPUTS
Enclousure i got already to, this one:
https://www.ebay.de/itm/16615518538...TF22JC&hash=item26af9eece6:g:2JAAAOSwDzlkZmbD
Liniar regulatet PSU:
https://www.audiophonics.fr/en/diy-...wer-supply-module-dc-micrel29752-p-10435.html
I Use an 2x 9V AC 1.67A Transformer Parallel. Minimum Voltage with this PSU is 5.15V if all powered up!

CNC Router down at Basement for the nice Mechanical Job ;) like the Najda DSP for an Friend i did befor last Chrismess.

Btw my name is Robert and i am from Germany so Englisch language is a bit crude ;)

Its works , It works, it Works.........With an DP-UB9004, second HDMI Out, only for Sound!!! First HDMI OUT goes to the TV directly.

CamillaDSP Uses "plughw:CARD=GenericStereoAu,DEV=1"

For now only Stereo Out. becaus my Amps for 5.1 isn't ready right now, need to Make the Enclousures for them first.
For the Mainspeaker them all ready and working.
Speaker all ready.
Still much on todo ;)

Realy Thank You all, without you guys, i didnt do it i bet!!!
 

Attachments

  • Prototypre RPI5 HDMI1.jpg
    Prototypre RPI5 HDMI1.jpg
    524.9 KB · Views: 100
  • Prototypre RPI5 HDMI2.jpg
    Prototypre RPI5 HDMI2.jpg
    272.5 KB · Views: 89
  • HDMI Switch.jpg
    HDMI Switch.jpg
    278.9 KB · Views: 89
  • Waveshare 7_9_Zoll HDMI.jpg
    Waveshare 7_9_Zoll HDMI.jpg
    377.1 KB · Views: 88
  • Najda DSP with Volumio Raspberry above.jpg
    Najda DSP with Volumio Raspberry above.jpg
    733.2 KB · Views: 90
  • Najda DSP with Volumio Raspberry.jpg
    Najda DSP with Volumio Raspberry.jpg
    594.5 KB · Views: 107
  • Najda DSP with Volumio Raspberry Rear.jpg
    Najda DSP with Volumio Raspberry Rear.jpg
    618.3 KB · Views: 97
  • Surround Back and Center.jpg
    Surround Back and Center.jpg
    129.9 KB · Views: 75
  • Rack with Hardware.jpg
    Rack with Hardware.jpg
    212 KB · Views: 89
Last edited:
Nice, so it works on Ubuntu Server 23.10? Or are you on Raspberry Pi OS?



They are for I2S output.



I haven't yet tried powering the HDMI to I2S board from the RPi yet, I've always used a separate 5V PSU. I think I used pin 14 for ground but I don't think it should matter much. No MCLK required.

Michael
Hello me again,

one small question, i gues the Channel orientation (HDMI Board) with 7.1 is like this, right?:
1 --> Front Left
2 --> Front Right
3 --> Center
4 --> Subwoofer
5 --> Left Surround
6 --> Right Surround
7 --> Back Surround Left
8 --> Back Surround Right

Robert
 

Attachments

  • 7_1_spkrplc.jpg
    7_1_spkrplc.jpg
    106.7 KB · Views: 48
Back
Top Bottom