Raspberry Pi with Piano2.1 DAC DSP and Volumio2

Do you have PurePath license? I'm assuming (if you use Volumio) you would use a 2.2 mode for stereo sub outputs. Do you need different output conditioning for each sub, or is each sub output strictly taken from its LR channel.

I've wondered what effect that SL Transform would have on a regular woofer in a sealed chamber. I've read some articles and there is a concern about excess woofer travel when this is done. I have noticed the woofers upper freq range quality getting effected by excess LF woofer travel.
 
hi DonVK.
i am yet to download purepath and learn the sw.
i dont need diff output conditioning for the stereo subs.

the usage of LT relies on woofer with good amount of Xmax. Rod Elliot explains this how to test. you put woofer in the sealed box. play targetted low freq ex: 20hz tone
the cone should move a lot but you should not hear the tone. such a woofer qualifies for LT
 
Linkwitz Transform - short cut with LP shelf

I was looking at the LT ( Active Filters ) and it looks like a LP shelf filter. So I tried a short cut to see if I could use one. The attached note shows some math and the reasoning behind it.

The first graph is a generic 2nd order filter with variable Q and fixed 100Hz cutoff. I compared my woofer's response curve (second graph) to the generic curves and estimated Q=0.8 (rolloff knee shape) and Fc=65Hz (-3db point). I added a 2nd order LP shelf (12dB/octave) and set the shelf's transition to "end" at 65Hz with gain=15dB. In EQ APO the start cutoff is 1 octave back at 30Hz or its center is midway at 45Hz. The result is a shift in the driver response from 65Hz to 45Hz.

The shelf filter can be digitally implemented in many places (RPI, DAC DSP). Only the LADPSA plugin hosted by Ecasound (on RPI) allows a Q adjustment which would be required to fix a peaky/saggy driver response. Alternatively, all these places also allow specifying custom biquad's filter parameters, it just a bit more work.

- EQ APO => "Filter: ON LS 12 dB Fc 30 Hz Gain 15 dB"
- LADSPA => "el:RTlowshelf, 15, 30, 0.8 "
- TI DAC => "BassShelf, Fc=30, G=15"
 

Attachments

  • Vary Q 2nd order.jpg
    Vary Q 2nd order.jpg
    73.2 KB · Views: 551
  • LT using LP Shelf.jpg
    LT using LP Shelf.jpg
    75.3 KB · Views: 546
  • LT using LP shelf eqns.jpg
    LT using LP shelf eqns.jpg
    128.8 KB · Views: 545
  • TI GDE BassShelf.jpg
    TI GDE BassShelf.jpg
    149 KB · Views: 550
Last edited:
Backup and SD clone

I was trying to make a clone (ie. disaster recovery) of one of my SD cards. Volumio install will create 3 partitions [boot, volumio, volumio_data] and uses the entire SD card. You could use Win32DiskImager to read the SD card as it's the same utility I used to load Volumio. It's a brute force read and creates an image the size of the 32GB SD card (sigh). However, when I went to program a new SD card, I got the error message that the new card (it's the same size) was too small. Apparently there was a difference of a block or two between the same sized cards, with no option to resize a partition by a block or two. It failed.

I ended up reducing the "volumio_data" partition size with "Disks" in another system. Then I switched to Paragon Backup to create the SD image. Paragon is smart enough to only read the partition's allocated blocks and it compresses them. So its very fast to read/write and takes minimal storage. My SD image take 1.3GB.

If I brick my system I can have another SD (last working) ready in a couple of minutes.
 
Founder of XSA-Labs
Joined 2012
Paid Member
I have all the components [Volumio, DAC DSP, BruteFir, Equalizer] so how does the loading look. The test music is an mp3@256kbps sampled at 44.1KHz from a NAS over wifi. Utilization was observed from the terminal interface using "top".

1) Volumio2 only : mpd uses CPU@4% avg (cycles from 1% to 7%)
2) Volumio2 , resample to 48KHz : mpd uses CPU@33% avg
3) Volumio2 , BruteFir2 64K taps uses CPU@36%, mpd uses CPU@4%
3) Volumio2 , BruteFir2 128K taps uses CPU@40%, mpd uses CPU@4%

The 10band equallizer uses 1% CPU when active and is part of BruteFir plugin. Volumio (soxr ?) resampling does not seem to work with BruteFir plugin. Only Piano2.0 mode works with the Brutefir plugin, there is no output when Piano2.1 or 2.2 are used.

Great thread. Thanks for doing this - what CPU is being utilized? Is the Arduino CPU or is it a PC that is connected and does this require a full time PC to be connected or can we load the DSP settings and just use the USB purely as a digital audio out source?
 
A better view of the loading on the RPI is at Raspberry Pi with Piano2.1 DAC DSP and Volumio2 which shows the load per core. You can see the main processes running [mpd, ecasound, brutefir] and the CPU cores are lightly loaded.

Everything is running on the RPI 3B which has a 4 core 1.2Ghz ARM CPU running Volumio (Raspbian). It hosts the Piano2.1 DAC hat that mounts to the top of the RPI header. The entire system is shown in post#1 in that little black box. The RPI also runs Volumio as a headless wireless media player.

There are 2 places where processing can be done. The 2 stereo DACs (32b) are PCM5142 with built in DSP (nano) that I use for low level processing like XO. The RPI CPU is used for much more complex processing like speaker or room EQ because it runs Ecasound and BruteFir . I can use any of the LADPSA plugins and FIR convolution. The list of LADSPA audio plugins is enormous.
 
Last edited:
Piano2.1 Audio Controls

There are 2 stereo DACs on the hat and they have some settings that are not directly accessible from Volumio.

I open a terminal window (via SSH) and start "Alsamixer". Press F6 and select the Piano and get access to all the controls (pic below). The master volume controls DAC#0 and the "subwoofer" controls DAC#1. There are also a few interpolation filter presets (qty5) but I can't tell the difference.
 

Attachments

  • AlsaMixer Piano2.1 Controls.jpg
    AlsaMixer Piano2.1 Controls.jpg
    184.8 KB · Views: 468
Last edited:
A note on using TI PurePath GDE for Volumio

The firmware loaded onto the embedded DSP's is generated with TI's PurePath GDE. Volumio currently expects 15 XO points and 5 sample freq per XO point. That's 90 firmware binary files per DAC and there are 2 DACS, so total 180 files for a complete firmware set. They are expected to be read as XO points labelled as [60,70,80,90,100,110,120,130,140,150,160,170,180,190,200Hz] and sample freq as [44K,48K,88K,96K,176K,192KHz]. That's a lot of files to generate without some shortcuts or help.

In PurePath, there is the option of "configurations" and "overlays", and both allow you to use the same schematic or signal flow and just change the parameters in the filters. I can't locate an explanation for the differences but I only get reliable results from using "configurations" as shown in pic#1 pulldown menu. You can also select all the supported sample freq per configuration via the view properties shown in pic#2. When you select "build", all 90 "cfg" files will be generated. The attached PurePath project zip file is for DAC#0 used for the left speaker in a 2way active crossover used at post Raspberry Pi with Piano2.1 DAC DSP and Volumio2

The TI naming convention and format are not directly usable by Volumio. They need to be renamed and converted to bin files. My son was kind enough to write a java script (zip attached) to perform this operation on a entire directory of files. The conversion renames the files from something TI auto generates like "base_xo60_Rate48.cfg" to "allo-piano-dsp-48000-60-0.bin" and processes the file to make a suitable firmware bin. Files ending in "-0" are for DAC#0 but you can rename them to end in "-1" for DAC#1. The entire directory of bin files can replace the stock Volumio ones. The file naming convention is fixed to allow selection via Volumio's menus, you'll need to keep track of the actual mapping of what you really put in those firmware files.
 

Attachments

  • properties - sample rate.jpg
    properties - sample rate.jpg
    77.4 KB · Views: 168
  • configuration pulldown.jpg
    configuration pulldown.jpg
    236.8 KB · Views: 183
  • TI PurePath 2wayDAC_0.zip
    127.3 KB · Views: 96
  • TI cfg to bin converter.jpg
    TI cfg to bin converter.jpg
    169.5 KB · Views: 173
  • TI cfg to bin converter-1.1a.zip
    24.7 KB · Views: 94
DAC firmware : sub and a sealed woofer

I have another project with an active 3way and I was trying to integrate a sub. The woofer is in a sealed chamber so it rolls off 2nd order at -12db/oct @fc=70hz. Since the 3way has LR4 xo's I wanted everything to have LR4 Modular active 3 way - work in progress.

I made another firmware build that replaces the Volumio 2.2 DAC firmware directory (/lib/firmware/allo/piano/2.2). Since LR4=BW2*BW2 I added a BW2 to the LR outputs to form a HP LR4 on the woofer, and the XO is selectable via Volumio. The BW2 HP on the LR channels reduces LF woofer movement and appears to make the woofer sound cleaner during LF periods.

I also added an LR4 to the sub outputs that have are selectable XO. The left sub output has just LP LR4, while the right sub output has HP LR4@16Hz and LP LR4 selectable. The sub HP is for one of my subs without a HP to prevent exceeding Xmax. So the sub and woofer can cross at a common XO using LR4 slopes.

The TI PurePath schematics, project files, and firmware are below.
 

Attachments

  • TI PP Projs.zip
    329.2 KB · Views: 100
  • 2.2-3firmware.zip
    180.9 KB · Views: 110
  • volumio settings.jpg
    volumio settings.jpg
    237.4 KB · Views: 513
  • TI PP SUB.jpg
    TI PP SUB.jpg
    300.7 KB · Views: 487
  • TI PP LR.jpg
    TI PP LR.jpg
    296.5 KB · Views: 496
  • Piano Pinout.jpg
    Piano Pinout.jpg
    170.5 KB · Views: 545
hi
First I want to thank donVK I just make my first test today 2.2 active x over
it run quite nice but to compare I wonder if you could make one side
mono signal configuration on RCA1 Left LP RCA2 Left HP and RCA 3 mono full range
I want to compare in blind test the difference between mono bi amp on one side and classic passive x over ( and phase correction with 3cm path delay)
An externally hosted image should be here but it was not working when we last tested it.
 
^ You're welcome.

Always a good idea to compare and measure. It would be useful and objective to use a calibrated mic to compare/diagnose the two speaker samples as well. You also have more than a few variables to consider when "normalizing" the two speakers before the comparison. It may not be as simple as active vs passive because of sensitivity and crossover type differences (active apples vs passive oranges :) )

I have some time tomorrow and I can generate the test firmware you need.
 
Last edited:
I have a behringer ecm8000 microphone, but don t need this the best way is use special mono sound file with many loop, to make real time comparaison and switch left and right, of course level egalization will be a good option on volumio ( another work for you or may be use a room equalizer to adjust level), my passive crossover not so simple I have a LP frequency to match the spl of the tweeter that have not the same frequency on the HP I use this because power resistor or varistor are real disaster.
 
I use Raspbian with the Allo Piano 2.1, using its 2.1 setup and the Allo Amp on top. For software I use a custom build mpd package using the Moode settings and brutefir (see old comments to see my config).


One day I upgraded my Raspbian and noticed the sound sounded much better, more to my preference. After looking into what happened I noticed the 2.1 firmware did not load. So apparently the subwoofer without LP sounded much better to me. Do you know if it is possible to let the 2.1/2.2 firmware XO filter only have effect on the subwoofer outputs without affecting the speaker outputs as well? I want to keep the natural range of my speakers and only have the LP for my sub.
 
Last edited:
^ You have a custom configuration so I don't know how/what DSP firmware is being loaded.

Getting the fronts and sub to integrate properly is dependant on the type of fronts (sealed, BR) and subs (sealed, BR, BP6, etc) as the acoustic slopes are different. Many commercial subs also have an Fc adjust that may interfere if its set too low.

Volumio has 2.0, 2.1, 2.2 modes and the firmware in those directories (lib/firmware/allo/piano/x.x) is loaded. I have received sample projects from Allo and it appears to be:

Mode 2.0, DAC#0, DAC#1 : no DSP firmware is loaded.
Mode 2.1, DAC#0 has no DSP firmware, DAC#1 has LP LR4 firmware
Mode 2.2, DAC#0 has HP LR4 firmware, DAC#1 has LP LR4 firmware

The unusual item in the code sample was a "click removal" block on the subwoofer channels. Since Allo does not publish the transfer functions or FR graphs I can't be 100% sure that the samples reflected the production firmware release. So your post made me smile a bit :) and its a fair question. I'm curious myself now because I've replaced the originals with my own firmware. So I'll actually measure the stock firmware over the next few days and post results.
 
Test firmware : mono active 2way vs mono passive

@runni : try this firmware for your comparisons. Pinouts shown in the diagram.

The XO mapping and cautions are the same as before at post *76 Raspberry Pi with Piano2.1 DAC DSP and Volumio2 . You'll replace the 2.2 firmware directory and select mode 2.2 from Volumio.
 

Attachments

  • RPI RCA pinouts 2.2-4 mono.jpg
    RPI RCA pinouts 2.2-4 mono.jpg
    156.3 KB · Views: 114
  • DAC0 mono 2 way.jpg
    DAC0 mono 2 way.jpg
    303.3 KB · Views: 139
  • DAC1 stereo to mono.jpg
    DAC1 stereo to mono.jpg
    310.6 KB · Views: 128
  • Firmware 2.2-4.zip
    155.6 KB · Views: 107
  • TI PurePath 2.2-4.zip
    136.8 KB · Views: 92
@runni : try this firmware for your comparisons. Pinouts shown in the diagram.

The XO mapping and cautions are the same as before at post *76 Raspberry Pi with Piano2.1 DAC DSP and Volumio2 . You'll replace the 2.2 firmware directory and select mode 2.2 from Volumio.


I do not have a purepath license and want to ensure my speakers their full range is used instead of HP filter. In Allo their purepath documentation (see attachment) they show that the sub L/R are mixed to mono then filtered using 2 biquad filters while the speaker L/R are only filtered using 2 biquad filters on each channel. I only want the sub to be filtered. Not sure what the difference is beteen the LP/HP and biquad (and why they use 2 in serial) :D
 

Attachments

  • Piano-DAC-Purepath-Process-Flow.pdf
    669.7 KB · Views: 174
Last edited:
^ I would use the Allo docs as just an example. In the diagram a single biquad instance can implement a 2nd order function. In TI PurePath you can create a block with many biquads and label it whatever you want. I relabeled the block with the function that it is "LP LR4"

It seems you want mode 2.1 as shown post #96 above. This means you need to load DSP firmware on DAC#1 only.

How do you determine what firmware is loaded on each DAC in your setup?
 
Last edited:
^ I would use the Allo docs as just an example. In the diagram a single biquad instance can implement a 2nd order function. In TI PurePath you can create a block with many biquads and label it whatever you want. I relabeled the block with the function that it is "LP LR4"

It seems you want mode 2.1 as shown post #96 above. This means you need to load DSP firmware on DAC#1 only.

How do you determine what firmware is loaded on each DAC in your setup?


Ah of course. I just read the documentation and the -0 and -1 at the end of the firmware name are for sub and speaker. So I can just remove all speaker firmware then :D. Thanks.


I use the `dmesg` command to read the kernel log. It will show something like:
Code:
[17040.204847] pcm512x 1-004d: No SCLK, using BCLK: -2
[17040.207381] pcm512x 1-004c: Dsp Firmware File Name: allo/piano/2.2/allo-piano-dsp-44100-80-0.bin
[17040.562595] pcm512x 1-004d: Dsp Firmware File Name: allo/piano/2.1/allo-piano-dsp-44100-80-1.bin
Update: if the *-0.bin firmware is missing it will stop and not load the *-1.bin firmware. So that is not going to work :(
Update 2: When I choose the 2.1 mode it actually loads the *-0.bin from the 2.2 directory and the *-1.bin from the 2.1 directory.
 
Last edited: