2-in, 8-out DSP platform using the Raspberry Pi + HATs

I like to do DSP processing under Linux on small, inexpensive, low-powered computers. The prototypical example of this is the Raspberry Pi, now available in version 3B+. The Pi has enough computing power for multichannel IIR filter processing. The challenge has been getting high quality audio in and out of the Pi. Until now I have been using USB audio devices such as pro audio interfaces, however, I recently discovered some new (to me) products that let you do this via HATs.

Raspberry Pi:
I am using the Pi 3B+. A great deal at $35.

Audio Input:
I discovered that HiFiBerry recently released a HAT that combines a DAC and an ADC. Seems to have good specs:
Datasheet DAC+ ADC | HiFiBerry
I don't have one in hand yet, but HiFiBerry has a solid reputation. The HAT uses the GPIO header to communicate with the Pi. Audio is up to 24/192k. Scroll down the page at the link above to the SPECIFICATIONS section to see all the details. A high quality ADC on a Raspberry Pi HAT is new to me, so I am very excited about this product.

Audio Output:
Another product I recently discovered is an HDMI audio extractor HAT. I have seen it sold by Audiophonics, by Suptronics, and by a company called WINGONEER. Not sure who developed the product first, but I will link to the Suptronics page:
Raspberry Pi Expansion Board
This HAT uses an EP91A6SX HDMI processing chip to extract audio (Linear PCM only) from the HDMI output of the Pi. It then feeds this to one of four ESS ES9023 DAC chips onboard. On-board audio connection consist of four 1/8" stereo jacks. I bought and measured the audio from this board and it's not bad at all. See attached 1kHz spectrum and THD+N measurement. It does take some programming effort to get this working with the Pi but afterwards I was able to render eight channels of 24-bit, 192kHz audio through this board. I will explain how below.

Power is delivered to the Pi via the HDMI audio extractor HAT. It requires a 5V supply at a minimum of 4A.

The HDMI audio extractor HAT does not use the GPIO pins and can actually be used as a standalone unit if you wanted to extract audio from a DVD or Blue Ray player. This means the GPIO pins can be used by another HAT, in this case that HAT is the HiFiBerry DAC+ADC HAT. Together we have a 24/192 stereo input and 8 channel output connected to and running through a Raspberry Pi that can do DSP processing via LADSPA using ecasound, Gstreamer, or even natively under ALSA (if you dare!).

What's the Catch?
The HDMI extractor HAT only produces 2 channels of audio out of the box. In order to get all 8 channels working up to 24/192 you need to change several lines in one source code module for the kernel and the recompile it. I believe the OS must be Raspbian so that the HiFiBerry HAT will work properly. There are instructions on how to build the kernel here:
Kernel building - Raspberry Pi Documentation
This was my first time attempting this, and I feared this would take days to finish. To my surprise on a Pi 3B+ it only took about 1.5 hours. Nice!

I will put together instructions on how to make the necessary edits and post those separately.

Finally, I would like to thank forum member jrubins for help with building the kernel and implementing these changes!
 

Attachments

  • X6000 Pi HAT THDN measurement.png
    X6000 Pi HAT THDN measurement.png
    67.4 KB · Views: 3,350
FOLLOW THESE STEPS TO MAKE THE NECESSARY CHANGES TO HDMI AUDIO AND REBUILD THE KERNEL.

Step 1: Make sure you have the necessary tools and the kernel sources installed on your machine
cd to your home directory, then run the following commands to install some build tools
Code:
sudo apt update
sudo apt install build-essential libncurses-dev bison flex libssl-dev libelf-dev git bc

Now, while still in your home directory, get the kernel sources.
Code:
git clone --depth=1 [url=https://github.com/raspberrypi/linux]GitHub - raspberrypi/linux: Kernel source tree for Raspberry Pi Foundation-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://www.raspberrypi.org/forum[/url]
This takes a little while. When completed you will have a new directory called "linux" in your home directory.

Step 2: Create a helpful script file for editing the edit_bcm2835-pcm.c file:
cd into the linux directory.
Create a new file in the kernel directory and open it for editing using nano:
Code:
nano edit_bcm2835-pcm.sh
Paste the following text into the nano editor:
Code:
#!/bin/bash

#this script must be run as root or with sudo or will exit here:
if [ "$EUID" -ne 0 ]
  then echo "Please run as root or using sudo"
  exit
fi

#opens the bcm2835-pcm.c file for editing using nano
nano ./drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
Save the file and exit the editor (CTRL-x, y, return to accept the filename).
Change the file so that it may be executed:
Code:
chmod +x edit_bcm2835-pcm.sh

Step 3: create a helpful script file for building the kernel
(this automates the steps outlined at the raspbian.org link in post#1)
Create a new file in the linux directory and open it for editing using nano:
Code:
nano build_kernel.sh
Paste the following text into the nano editor:
Code:
#!/bin/bash
#this script will build the kernel from the source in ~/kernel
#see for more info:
#  [url=https://www.raspberrypi.org/documentation/linux/kernel/building.md]Kernel building - Raspberry Pi Documentation[/url]

#this script must be run as root or with sudo or will exit here:
if [ "$EUID" -ne 0 ]
  then echo "Please run as root or using sudo"
  exit
fi

#setup:
KERNEL=kernel7
make bcm2709_defconfig

#these commands build the kernel:
make -j4 zImage modules dtbs
make modules_install
cp arch/arm/boot/dts/*.dtb /boot/
cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
cp arch/arm/boot/dts/overlays/README /boot/overlays/
cp arch/arm/boot/zImage /boot/$KERNEL.img

Save the file and exit the editor (CTRL-x, y, return to accept the filename).
Change the file so that it may be executed:
Code:
chmod +x build_kernel.sh


Step 4: Edit the bcm2835-pcm.c file and make the necessary changes:
While in the linux directory, run the script file:
Code:
sudo ./edit_bcm2835-pcm.sh
Near the top of the file, lines 28-43, there is a section starting with (line 28):
Code:
static const struct snd_pcm_hardware snd_bcm2835_playback_spdif_hw = {
Replace the existing code with this new code:
Code:
static const struct snd_pcm_hardware snd_bcm2835_playback_spdif_hw = {
        .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
        SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID),
        .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE,
        .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_44100 |
        SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000,
        .rate_min = 44100,
        .rate_max = 192000,
        .channels_min = 2,
        .channels_max = 8,
        .buffer_bytes_max = 256 * 1024,
        .period_bytes_min = 1 * 1024,
        .period_bytes_max = 256 * 1024,
        .periods_min = 1,
        .periods_max = 256,
};
The code shown above reflects changes made to the following fields:
formats
rates
rate_max
channels_max
buffer_bytes_max
period_bytes_max
periods_max

After double checking the changes, save the file and exit the editor (CTRL-x, y, return to accept the filename).

Step 5: Build the kernel
Before building the kernel, check which kernel you have now:
Code:
uname -a
Make a mental note of the version.
While in the linux directory, run the script file to build the kernel:
Code:
sudo build_kernel.sh
Building the kernel took about 1.5 hours on a Pi 3B+ with the cpu governor set to performance, but can take several hours on older Pi versions.
When the build process is done you should see the command prompt again, with the last statement something like DEPMOD and the new kernel version number.
Reboot the machine to load the new kernel.

DOUBLE CHECKING AND TROUBLESHOOTING:
Check which kernel you have now:
Code:
uname -a
This should be a newer version than you had previously. If not it's possible that the old kernel file is still on the machine and the Pi is still booting from it. Check that the new kernel was just built:
Code:
ls -l /boot/kernel7.img
The date should reflect the last build. If there is another file called "kernel.bin" you can rename it to "kernel.bin.old" and then edit the config.txt file to tell the Pi to use the kernel7 file when booting.
Open the config.txt file using an editor (here I use nano):
Code:
sudo nano /boot/config.txt
Add these lines at the end of the file:
Code:
#specify which kernel image to load
kernel=kernel7.img
Save the file and exit the editor (CTRL-x, y, return to accept the filename).
You will need to reboot to load up the kernel again.
Check that ALSA sees the bcm2835 audio system by running aplay:
Code:
aplay -l
The output should look like this:
Code:
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
If you do not see the sound card called ALSA, add these lines to your config.txt file as described above, and then reboot:
Code:
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
 
Last edited by a moderator:
Wow, this is very promising! I just started a project with a Raspberry Pi and an audio extractor (a separate device, not a HAT, as I couldn't and still cannot find them anywhere to buy), and naively expected 8-channel audio to "just work"…

Following your thorough build instructions (thanks, CharlieLaub!) I arrive at the same output of "aplay -l" in the end, listing in total 8 output subdevices, as I understand it. So far, so good.

But from here I don't know how to continue, and I would very much appreciate any help or pointers.

Am I right in thinking that I need to configure ALSA? What would a very basic asound.conf (or .asoundrc) for all eight channels look like? I saw jrubinstein's config[0], which does a lot of filtering which I don't need, and some posts on stackexchange[1] with configurations for addressing 8 channels separately (which is what I need) using a USB sound card. I have tried to put together my own asound.conf based on those, but without success so far. (Needless to say, I'm not really familiar with configuring ALSA.)

Should something like
Code:
aplay -D "hw:0,0" /usr/share/sounds/alsa/Noise.wav
work right away? Also with "0,1"..."0,6" and "1,0" instead of "0,0", to address the other channels? That's how it should work in my mind, but it doesn't.
(Only "0,0" produces sound, the other "0,X" give the error "aplay: main:788: audio open error: No such file or directory"; "1,0" gives the error "ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card".)


[0] raspiDSP/alsa configuration asoundrc-experimental2.cpp at master * jrubinstein/raspiDSP * GitHub

[1] audio - 8 independants mono channel on 7.1 sound card, but possibility to play sound on 8 channels simultaneously - Unix & Linux Stack Exchange
 
@korakinos:

You do not need to configure anything in ALSA... let me clear up some of your confusion first... looking at the output from aplay -l I posted:
Code:
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
CARD "0" is the audio system built into the bcm2835 SOC itself. There are two devices:
The first one "device 0: bcm2835 ALSA [bcm2835 ALSA]" is analog audio I think. Not sure why it has 7 subdevices (not 8 as you claim) listed. This is hw:0,0
The second device is "device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]" and it is this CARD/DEVICE that refers to the audio sent to the HDMI port on the Pi, that will then be extracted by the X6000 HAT. This is hw:0,1

The number of channels is not shown by aplay. Instead you should look in /proc/asound/card0/pcm1p/sub0 for a codec or stream# file or similar info. But we know that it has 8 channels.

Your next question is "how to I send audio to the 8 output channels". You can try to play an 8 channel wave file using mplayer. You can install a program like ecasound that does routing, meaning it can route or map input channels to output channels, the inputs coming from a file or from a live input. Or you can try to play audio from a player that will let you send the N channels to the HDMI (hw:0,1) output. VLC probably can do it, but it not alone in that regard.

If you can't get it working, post here again and I will try to give you more specific help.
 
Last edited:
This is very kind of you, thank you. You are right, I was (and am) confused and inexperienced in this, so I appreciate a lot that you took the time to explain.
The number of channels is not shown by aplay. Instead you should look in /proc/asound/card0/pcm1p/sub0 for a codec or stream# file or similar info. But we know that it has 8 channels.

I can find no such file and no mention of eight channels in any of the other files in the folder. But it all worked out in the end anyway, so that's probably not important.

Playing few multichannel files[0] from VLC with one of the HDMI devices selected (there is "Direct hardware device without any conversions", "Hardware device with all software conversions"; and also "Direct sample mixing device", but that one didn't produce sound at all)), did not work, they all came out mixed down to stereo.

In the end, I want to access the eight channels from Pure Data, which can use ALSA, OSS, Jack or portaudio as a backend, that's why I thought configuring ALSA was the way to go. Now I tried Jack instead, selecting the HDMI device from Qjackctl and starting the daemon from there – and success! 8 channels of audio addressable from Pure data with the Jack backend selected. Very happy, thanks again!.


[0] https://www2.iis.fraunhofer.de/AAC/ChID-BLITS-EBU-Narration441-16b.wav
http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples/Microsoft/8_Channel_ID.wav
https://github.com/sfiera/flac-test-files/raw/master/surround71.flac
 
IMO there is no need to complicate your setup with jackd between puredata and alsa-lib/alsa driver. Jack has a fixed samplerate, another binary to start, configure etc.

If the soundcard has 8 output channels, you can use them all directly in alsa. This tutorial Pure Data shows puredata supports multichannel soundcards, should be simple to use just like stereo sound devices.

Create an 8-channel wav (e.g. using sox, you may already have some) and play it with aplay like this:

Code:
aplay -v -D plughw:0,X -c 8 --dump-hw-params your.wav

For various X (0, 1, ...)

Please post output of aplay (incl. the verbose debug of what the plug plugin does + the hw params) when the command works.
 
Here is a simple test you can try. I just did this over SSH on my machine, but did not "listen" for audio output.

Run speaker-test
Code:
pi@raspberrypi:~ $ speaker-test -Dhw:0,1 -c 8

speaker-test 1.1.3

Playback device is hw:0,1
Stream parameters are 48000Hz, S16_LE, 8 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 64 to 16384
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
 0 - Front Left
 4 - Center
 1 - Front Right
 7 - Side Right
 3 - Rear Right
et cetera...
The output on my machine is shown above. Control-C to stop.

While speaker-test is running, look at the file hw_params that corresponds to that card, device, and subdevice:
Code:
pi@raspberrypi:~ $ cat /proc/asound/card0/pcm1p/sub0/hw_params
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 8
rate: 48000 (48000/1)
period_size: 4096
buffer_size: 16384
The output on my machine is shown above. You can use two terminal windows to do this, with one running speaker test and the other running the cat command while speaker-test is running.

This shows speaker-test using 8 channels for output. You can also try to use other rates and audio formats with speaker test (see the man page). You can also listen for audio output.

Finally, you wanted to do some playback over all 8 channels but did not really say what you wanted to do exactly. Did you want to play surround sound audio (e.g. 7.1 channels) or upmix, implement a multichannel crossover, or something else?
 
I was able to render eight channels of 24-bit, 192kHz audio through this board.

This is not working for me. My Pi could only do S16_LE via HDMI.

Code:
speaker-test -D hw:0,1 -c 8 --format S24_3LE
returns an error
Code:
Format S24_3LE is not supported...

I am using a Hifiberry Digi I/O card as input on a RPI 3B+ and a Wolfson Audio Card on a Single Core Pi.
 
Yeah, I was just trying jack first this morning because I have used it before. Now I know 8 channels work in principle, I'm happy to try to make it work without jack.

Code:
aplay -v -D plughw:0,X -c 8 --dump-hw-params your.wav
For various X (0, 1, ...)

Please post output of aplay (incl. the verbose debug of what the plug plugin does + the hw params) when the command works.

It does (audibly)! :
Code:
pi@raspberrypi:~ $ aplay -v -D plughw:0,1 -c 8 --dump-hw-params 8_Channel_ID.wav 
Playing WAVE '8_Channel_ID.wav' : Signed 24 bit Little Endian in 3bytes, Rate 48000 Hz, Channels 8
HW Params of device "plughw:0,1":
--------------------
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT:  S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE MU_LAW A_LAW IMA_ADPCM S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE U18_3BE
SUBFORMAT:  STD
SAMPLE_BITS: [4 64]
FRAME_BITS: [4 640000]
CHANNELS: [1 10000]
RATE: [4000 4294967295)
PERIOD_TIME: (223 1486078)
PERIOD_SIZE: (0 4294967295)
PERIOD_BYTES: (0 4294967295)
PERIODS: (0 4294967295]
BUFFER_TIME: [1 4294967295]
BUFFER_SIZE: [1 4294967294]
BUFFER_BYTES: [1 4294967295]
TICK_TIME: ALL
--------------------
Plug PCM: Hardware PCM card 0 'bcm2835 ALSA' device 1 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S24_3LE
  subformat    : STD
  channels     : 8
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 24
  buffer_size  : 10922
  period_size  : 2730
  period_time  : 56875
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 2730
  period_event : 0
  start_threshold  : 10922
  stop_threshold   : 10922
  silence_threshold: 0
  silence_size : 0
  boundary     : 1431568384
  appl_ptr     : 0
  hw_ptr       : 0


Here is a simple test you can try.[…]

Code:
pi@raspberrypi:~ $ speaker-test -Dhw:0,1 -c 8

While speaker-test is running, look at the file hw_params that corresponds to that card, device, and subdevice:
Code:
pi@raspberrypi:~ $ cat /proc/asound/card0/pcm1p

Works like a charm, very audibly. My output from both commands is exactly the same as yours.


Now to what doesn't yet work (without jack): Pure Data.

in Media->Audio Settings I can select one of two "Output Devices"
- bcm2835 ALSA (hardware)
- bcm2835 ALSA (plug-in)
Bot have their channel count set two 2 by default.

When I set the channel count to 8 for the "hardware" device, I get this output in the Pd window (note the last line):
Code:
input channels = 2, output channels = 8
input channels = 2, output channels = 8
audio buffer set to 25
ALSA input error (snd_pcm_open): No such file or directory
configuring sound output...
Sample width set to 2 bytes
ALSA: set output channels to 2

When I do the same for the "plug-in" device, I don't get that last line of "set output channels to 2", and the Sample Width is announced as 4 bytes.

Still, in both cases I cannot get audio out of any but the first two channels. The builtin Media->"Test Audio and Midi" patch appears to have 8 channels preprogrammed, but 3-8 are silent. Likewise, when I create an 8-channel output myself as [dac~ 1 2 3 4 5 6 7 8], I only get audible output when routing sound to the first two.

The line "ALSA input error (snd_pcm_open): No such file or directory" is presumably harmless, as it also shows up when I set the channel count back to two.


Finally, you wanted to do some playback over all 8 channels but did not really say what you wanted to do exactly. Did you want to play surround sound audio (e.g. 7.1 channels) or upmix, implement a multichannel crossover, or something else?

I want to output and control three to four stereo signals for headphones. "control" in the sense that they must be able to start/stop/jump indepently of each other. This is going to be part of an interactive art installation also involving buttons and other elements, and actually 10 pairs of headphones. As 4 Raspberry Pis are already planned to play videos (without sound), I figured I could use them for audio playback as well.
 
Use the aplay --dump-hw-params option to list all possible formats your soundcard supports. Sound devices often use S32_LE instead of the 3-byte S24_3LE

Code:
aplay -D hw:X --dump-hw-params /dev/zero

That is, in general, a pretty useful command to probe capabilities.

In this case, it's only going to echo back to us what we told the kernel that the SPDIF capabilities are when we edited the bcm2835-pcm.c file and recompiled the kernel.

I have encountered one program that, when you told it to use the format S24LE, was actually using the format S24_3LE and playback was successful. But when you explicitly told it to use S24_3LE it said that was an unknown or invalid format!
 
I have encountered one program that, when you told it to use the format S24LE, was actually using the format S24_3LE and playback was successful. But when you explicitly told it to use S24_3LE it said that was an unknown or invalid format!

For alsa API the formats are just numerical constants (enums). That programs probably used wrong string name for that particular constant.
 
In this case, it's only going to echo back to us what we told the kernel that the SPDIF capabilities are when we edited the bcm2835-pcm.c file and recompiled the kernel.

Very true. But what if incomplete capabilities were added, the module was rewritten by a new version from updated package, it was never re-loaded etc. etc. Plus it is good if users learn how to inspect details about their system. People keep asking about capabilities of their sound devices constantly and unfortunately very few know how to find out. Let's let them explore the beauty of open linux :) In windows they would never obtain such low-level yet very important information
 
No kernel directory created

Now said:
git clone --depth=1 GitHub - raspberrypi/linux: Kernel source tree for Raspberry Pi Foundation-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://www.raspberrypi.org/forum[/CODE]
This takes a little while. When completed you will have a new directory called "kernel" in your home directory.

Step 2: Create a helpful script file for editing the edit_bcm2835-pcm.c file:
cd into the kernel directory.

First, thanks for this tutorial Charlielaub. I have an 8 channel HDMI extractor that I'd love to try this with.

I guess I'm off to a bad start. I completed step 1 without errors but I don't have a kernel directory in my home dir. Any suggestions?

Code:
pi@raspberrypi:/home $ sudo git clone --depth=1 [url=https://github.com/raspberrypi/linux]GitHub - raspberrypi/linux: Kernel source tree for Raspberry Pi Foundation-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://www.raspberrypi.org/forum[/url]
Cloning into 'linux'...
remote: Enumerating objects: 66087, done.
remote: Counting objects: 100% (66087/66087), done.
remote: Compressing objects: 100% (61063/61063), done.
remote: Total 66087 (delta 6233), reused 16093 (delta 4113), pack-reused 0
Receiving objects: 100% (66087/66087), 176.30 MiB | 7.23 MiB/s, done.
Resolving deltas: 100% (6233/6233), done.
Checking out files: 100% (62252/62252), done.
pi@raspberrypi:/home $ cd kernel
-bash: cd: kernel: No such file or directory
pi@raspberrypi:/home $ ls
linux  pi
 
First, thanks for this tutorial Charlielaub. I have an 8 channel HDMI extractor that I'd love to try this with.

I guess I'm off to a bad start. I completed step 1 without errors but I don't have a kernel directory in my home dir. Any suggestions?

Code:
pi@raspberrypi:/home $ sudo git clone --depth=1 [url=https://github.com/raspberrypi/linux]GitHub - raspberrypi/linux: Kernel source tree for Raspberry Pi Foundation-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://www.raspberrypi.org/forum[/url]
Cloning into 'linux'...
remote: Enumerating objects: 66087, done.
remote: Counting objects: 100% (66087/66087), done.
remote: Compressing objects: 100% (61063/61063), done.
remote: Total 66087 (delta 6233), reused 16093 (delta 4113), pack-reused 0
Receiving objects: 100% (66087/66087), 176.30 MiB | 7.23 MiB/s, done.
Resolving deltas: 100% (6233/6233), done.
Checking out files: 100% (62252/62252), done.
pi@raspberrypi:/home $ cd kernel
-bash: cd: kernel: No such file or directory
pi@raspberrypi:/home $ ls
linux  pi

Ah, sorry, the directory that is created is call "linux" not "kernel"... I sent in a report and asked a mod to make corrections since I can no longer edit the post.

Thanks for bringing this to my attention!

-Charlie
 
Last edited:
UPDATE:

I finally tested out the Pi with both the SupTronics HDMI audio extractor and the HiFiBerry DAC+ADC HAT and both work as advertised. The kernel was modified and recompiled as described earlier in this thread, which brought the revision up to 4.19.23-v7+ under which the DAC+ADC HAT was supported. For info on the HiFiBerry HAT, see this post:
very HQ stereo analog audio input for Raspberry Pi - any options?
and subsequent posts in that thread.

I can run high quality audio into the Pi (2 channels) where I can do DSP and then have TEN output channels (8 on the HDMI HAT and 2 on the DAC+ADC HAT). This can comprise a nice DSP processor for DIY use with relatively good performance specs. The total cost was about $160 for the Pi and the two HATs. Since I have a bunch of 60W/90W@8R/4R Class AB amp modules at my disposal I might put all of it together into a case to create a multichannel DSP powered AMP...