Asynchronous I2S FIFO project, an ultimate weapon to fight the jitter

Attachments

  • ShieldPiPro.jpg
    ShieldPiPro.jpg
    211.7 KB · Views: 142
Ian,

I'm having a mild brain fart. Please remind me how to get the FiFo data to show up on the 4D Systems screen. I've had it working, but I've been doing so much testing and configuring on 2 different systems, that I've lost track of some basics. 🙂 (my older brain syndrome). I have the 4-pin control cable plugged together from the FifoPi Q7 to the StationPi Pro, and both ESS and MonitorPi installed. I thought that's what was needed.

Edit: If I remove the ESS Controller it shows, but then nothing plays.
Edit 2: The documentation (page 7) of the StationPi Pro shows it displayed. I'm assuming something was playing for that pic.

20221030_161118.jpg
 
Last edited:
Dear Ian!
Thanks for the quick response. Unfortunately, it does not work at all with a normal straight HDMI cable. However, I missed the point in my previous post that when tested with the cross (1.3-7.9) cable, the DSD128 sounds perfectly when played with Volumio, only there is a problem when playing from Tidal. (I immediately changed the oscillators from the factory to 90 and 98 MHz Accusilicon oscillators when I bought the FiFoPi Q7/HdmiPiPro) It seems that there is only a problem below a certain quality or bitrate. Right now a Robert Miles (DSD128) album is playing perfectly as I write this 🙂

IMG_20230127_162900.jpg
IMG_20230127_162925.jpg
 
Interesting watching this thread.

I went a different approach. Using hardware FIFOs and a fast MCU. Sample by sample. It doesn't really matter if the different inputs and outputs are different sample rates or clocks.
Code:
    float gain = 0.75f;
    while (1) {
        // 32bit stereo = 8 bytes which is luckily enough the full FIFO
        HAL_SAI_Receive(&hsai_BlockA1, (uint8_t*) buffer, 8, 10);
        for (int i = 0; i < 2; i++) {

            double sample = buffer[i];
            sample = sample * gain; // pre-gain
            sample = PeakFilter_Update(&midCut, sample);
            sample = PeakFilter_Update(&highMidCut, sample);
            sample = PeakFilter_Update(&highBoost, sample);
            sample = PeakFilter_Update(&bassBoost, sample);
            sample = PeakFilter_Update(&bassBoost1, sample);
            sample = PeakFilter_Update(&bassBoost2, sample);
            if (sample > 0x7000) {
                HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);  // twinkle peak/limiter light
                gain = gain - 0.1;
                if(gain < 0.2) {
                    gain =0.2;
                }
                sample = sample *0.75f;
            } else {
                gain = gain + 0.00001;
                if(gain>0.75f) {
                    gain=0.75f;
                }
            }
            buffer[i] = (int16_t) sample;
        }
        HAL_SAI_Transmit(&hsai_BlockA2, (uint8_t*) buffer, 8, 10);
    }

The limiter was written after a few beers and I got sick of hitting clips. It's surprisingly effective if a bit brutal. Depending on just hard you push it you will notice it, asides the LED indication. But if it's a one off here and there you might not. I can work on it. Making it velocity sensitive with equal response might help. Or just not running it that hard! (yes, it's 16bit for now. shame). I have tested 24bit through put and it's fine. I just haven't been bothered to do the endian shift on it (correctly) yet to use 24bit signed. 24bit unsigned is childs play, 24bit signed takes a bit more thought.

EDIT: I didn't think this was possible, BTW. It took quite a bit of convincing from an experienced MCU dev who absolutely borked at the fact I was doing it async with buffers. I told him it was like 10us per sample and he pointed out in STM32H7 terms 10 us is a long time.

I tried it. I've tried it with multiple inputs and it also works. On horse power for the EQ, well, for a long time I was accidentally running the for loop for 8 samples. There are only 2. So I was running the EQ 4 times more often than needed.

I even added some coefficient recalcs to the loop and it only started to break around 12 filter recalcs per sample... while still EQing with 5 bands.
 
Last edited:
Dear Ian!

I forgot to attach the pin assignment of the I2S input of the Gustard X16 to the previous post (as well as the output of the HdmiPiPro).
If I have one more question, it's in the MonitorPi manual
in one of the pictures you can see a remote control, is it an AppleTv remote control? In principle, the MonitorPi has an infrared receiver. Why? What can be said? Thank you in advance for your answer!
Gustard X16 I2S input.jpg
HdmiPiPro I2S output.jpg
MonitorPi IR + RC.jpg
 
@maxximnode

Seems that the Gustard DAC doesn't compatible with PS audio I2S over HDMI format.
The problems are:
1. 1-3 Reversed
2. 7-9 Reversed

If the DAC isn't capable of setting the format, I would suggest you open a HDMI cable, and then to reverse the 4 wires. It's better than making a HDMI cable.

DSD left and right channels are also reversed, but there is no way to fix this issue by the HDMI cable. It's a design problem.

Many other DACs are working great with HdmiPiPro. Please read the user's manual for details.
https://github.com/iancanada/DocumentDownload/blob/master/HDMIpi/HdmiPiPro/HdmiPiProManual.pdf

Good weekend.
Ian
 
@AirAir

Difference between original UcPure and MkII and III

MKII over MKI
  1. Add a 15V configuration besides the 3.3V and 5V
  2. Make the 5V as default configuration
  3. Bigger ON/OFF switch on top of the PCB

MKIII over MKII
  1. Add a powerful SYNC UC charging function. Can charge the UCs when music stops. To avoid output voltage drop or trigger the protection mode even if you listen to music for a very long time. SYNC control signal can be picked up from a FifoPiQ7. This signal will be isolated and more UcPure MKIII can work together with this signal.
  2. Much bigger and higher voltage smoothing capacitors. Make the UcPure MKIII works better for both AC and DC input and tolerance more to different input power supplies.
  3. Upgrade to heavy duty standard 5*20 glass fuse
  4. More than one UC group can be put in parallel to improve performance even more.

Ian
This is a fantastic update to the amazing UcPure! I look forward for the release of the manual as want to use this in my current project 🙂
 
I finally finished my personal D11 Dac, based on UCpure.
I struggled when I started a few years ago with the lack of complete examples of builds and decided to share my projects. May not be perfect but hope it helps someone starting out.
Detailed build on my YouTube Chanel.
Happy Holidays to all
Gaby

Gabster, thanks for sharing and for the effort to make the video. I have been researching Ian's work (chapeau) for some time in the hope of getting my arms around his extensive group of developments. As you say there is no obvious road map but I have found that with effort you can acquire an understand and appreciation for what has has done.

One question on your build: You spent a lot of effort in shielding (the RPi side, the Audio side, the clocks etc). Can you make some sort of evaluation on how effective this has all been? Do you feel that it has made an impact on SQ and would you do it again?

BTW: Your video inspired me to proceed with my build. Unfortunately, at about the time you published RPi has become an extinct species.
 
  • Like
Reactions: redjr
@MartinJohn,
Ian's products have inspired many of us! 🙂 I think for those of us who want to tinker with various aspects of DAC/Streamers and our ever growing digital libraries, Ian's suite of boards provide both the flexibility and great sound. Users can judge whether it's a platform to work with on a streaming implementation project and worth the cost. Personally, I have built 3 different streamers incorporating Ian's products. And I only started around 2017! As you've noticed, he offers a broad range of kit that make it relatively easy to get up and running with a basic DAC that sounds pretty impressive. I was intrigued when he first offered the StationPi board, and have enjoyed using it as a platform to build ever-increasing flexibility and improvements over my earlier projects. And, I'm still learning(and forgetting some). Sure there are some quirks, but for the level of compatibility some are expected. He continues to innovate and offer professional-grade products that allow users to 'upgrade', and expand and improve their systems. For the most part, everything is plug-n-play and his documentation fairly thorough. I have no affiliation with Ian, other than being a satisfied customer and avid DIYer. I don't think you will be disappointed. A few pics of my most recent build.
 
@redjr,
Thanks for the feedback and support (encouragement is not really needed but your success motivates). I am a die hard DIYer having replaced all of my commercial electronics (NAIM) with DIY (thanks to NP). As I tried to convey in my recent post I am very impressed with Ian's work (top notch - top shelf). I also like his set up where he tests his creations.

To make a long story short, as soon as I can get my hands on some RPis this journey will go beyond the planning (dreaming) stage.
 
@redjr,
I forgot to mention your industrial design and packaging. Good stuff. This seems to me to be a challenge once you consider the size of the power supplies, the DAC stack and what to do with the RPi.

This is, in my case, not yet settled.
In this particular case(no pun intended), I wanted to expand my building and implementation skills with a more unique design, over the typical audio case. I also wanted to incorporate a larger screen. I also needed the internal height for both 'stacks'. Enter this Silverstone enclosure. It wouldn't be everyone first choice, but I simply wanted to see if I could do something unusual - design, case modding, etc.

The next challenge is already in the works. 🙂

Rick
 
Ian,

Where did you get the balancer/protection boards for the Eaton XL60 supercapacitors you like?

Also, if I wanted to use a FifoPi for a dac connected either to a PS5 through USB or toslink from a TV, I would like to have zero delay. It sounds like only FifoPiMa allows for zero delay but if using a FifoPiMa do you have to use it with a Rpi? I assume that if using it as a transport, the receiving DAC would also need a FifoPiMa for it to have zero delay (and potentially with a Rpi)?

Thank you.
 
@stew1234

You can try Amazon for something like this
https://www.amazon.ca/Capacitor-Bal...uper+capaciror+protection+board,aps,87&sr=8-6

Yes, FifoPiMa has zero delay. That's one of the advantages. But it has to work with a RPi. It needs the support from the driver and the player software.
If you really want a RPi free application, or play music from USB or Tosline, you have to use a FifoPi Q7. FifoPi Q7's delay time is adjustable. You can setup the 0.1s delay time. I don't think there is any problem even you watch a video.

Ian