Skip to main content
Topic: I2S DAC board for raspberry pi and beaglebone black (Read 78320 times) previous topic - next topic

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #30
You can try a new driver for BBB: http://bbb.ieero.com/

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #31
Is the source of the new driver available?

I liked the patch way much more than a whole distribution. (though I will try your distribution version at some point, and it would at least mean everyone testing is configuring things basically the same way).

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #32
Yes, patches for kernel 3.15.1 are available in the /sources directory on the image. Or you can take kernel zImage, dtb file and modules and use it in your distribution.

But for the start it's better to use common environment until all issues will be resolved, that's why there is whole distribution.

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #33
Yeah that makes a lot of sense. I hadn't download the whole distro and looked for the sources. Thanks for the heads up as to where they are. I'll try it out as soon as I have time, maybe all the issues I have seen will just go away. There is some wishful thinking...

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #34
I have done some simulations of dropping samples in ways the BBB might do. They look far more like white noise than phase noise though. If I didn't make any mistakes that means I will need to rethink what the experimental data has shown. I thought I had controlled for everything but the data pin, but maybe I overlooked something. I already mentioned some ways that it could still be one of the clock pins as well. For instance the drive strength of the push-pull circuits on the BBB vs the USB interface, what is weird about that though is the marked difference between running it from BBB vs a linux laptop, electrically those things are identical. Although they do have different power supplies. Perhaps I have to revisit power supplies again... When I first did that the results were much worse (could have covered this up). Anyway it requires more thought on my part. Showing development raw, as in this log, means that sometimes conclusions prove erroneous. I am going to make a new version of the DAC soon anyway at which point it might make sense to revisit all the measurements. There is also a new driver to try out. As time permits to anyone following this thread...

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #35
Any news?

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #36
I've been busy as of late, didn't think to check here for some time...

Since you ask. I redesigned my DAC board and segmented it into 3 parts. Clocks, the converter and isolation method.

This will allow me to independently test things. For instance I can compare different clocks to each other. I can compare different isolators, or not use an isolator and deal with possible noise from ground loops from the BBB.

I will try using your new driver when I have the new boards in hand. I will also recheck the power supply stuff just in case.

This design will not the the final version. given how I did it, I will likely have to do at least 1 more version. I may have to also check the new flavor of R-Pi out at some point. I haven't looked into it enough to know if a MCLK will now be pinned out, but in any case the clock on the board isn't very good (unless they do much better) and the FPLL that generates the clocks is pretty bad so probably BBB will be the way forward.

The soonest any of this will get done is probably the 27th of July given I don't expect boards until ~7/20.

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #37
Very good and interesting blog

Have you examined the alsa.conf file?
...
defaults.pcm.dmix.rate 48000
...

Try to change it to 44100.

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #38
That could be an issue I guess with the USB results but given the 48 and 44.1 files have basically the same spectra it isn't the issue for the BBB tests. I am 99% sure I looked at the hwparam directory while things were playing to check if there was any re-sampling for the BBB largely to make sure that the clock board was working. Everything checked out.

I did a quick test with the new design I made and with independent linear power supplies for my new board and BBB. The results are basically the same. Only thing really left to check is the new software. See if that does anything. I still think the jitter/phase noise is software/BBB I2S stream related so there is some hope of a software fix.

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #39
(measurements)

I'd like to show fresh measurement of BBB I2S output when connected to TPA Buffalo3 (ES9018) DAC. The used soundcard is ESI Juli@, software Arta running under Wine on Linux.

The BBB running Botic image is generating test signal using:
 $ play -V3 -r 96000 -b 32 -c 1 -n -c 8 synth sin 1000
No SW under-runs are reported by ALSA.

The BBB is powered from the DAC power supply - other rail of TPA LCDPS (with shorted R in C-R-C for higher current)

DPLL bandwidth on DAC is set to 128x highest, otherwise there were dropouts (LED blinks).
So it is possible that this DAC is correcting issues you are describing.

(driver)
It should be possible to detect BBB HW buffer underruns, but this is not yet implemented in the Linux driver.

EDIT: new image with better SNR (lower sound card input volume)

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #40
Try to reduce 50/60Hz first...

[quote author="brian"][/quote]

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #41
Hi Miero,

I have been using the new driver this weekend. No change for me.

I do get "play WARN alsa: under-run" sometimes when using your command. (Edit: I've uploaded a screenshot showing what I mean with the command context).

I had to use the serializer set to "4" to get it to play with "aplay someFile.wav" properly. However your command seems to not work if it is set to "4" but does work with it set to "-1". Is the "default" output DSD rather than I2S in "-1"? What should the PCM command for aplay be if set to -1 rather than 4.

Certainly your data looks better than mine. Although I will need to overlay it honestly because the lower the frequency the "better" a peak looks when on a linear scale (you have a log-log plot). Unfortunately I can't take a log fft so I'm stuck with 20 Hz bins...

As for the 60 Hz/180Hz/300 Hz spikes, I agree those are worthy of study. However, the uniform nature across many different setups causes me to believe they are in the meter sub-system rather than in the DAC (probably magnetically coupled to the transformer of the meter). Changing the DAC power from a bench HP E3610A to a simple wall plug makes no difference. The PSRR of my DAC board is something like 130 dB of rejection at that frequency as well. So I'm pretty confident that that junk isn't from the DAC design. (IE the ripple at 60 Hz would have to be 2 V on 3.3 V to be above -130 dBc if the PSRR is right, clearly that is not the case...).


Re: I2S DAC board for raspberry pi and beaglebone black

Reply #43
[quote author="brian"]I had to use the serializer set to "4" to get it to play with "aplay someFile.wav" properly. However your command seems to not work if it is set to "4" but does work with it set to "-1". Is the "default" output DSD rather than I2S in "-1"? What should the PCM command for aplay be if set to -1 rather than 4.[/quote]

That command plays at all 4 serializers (8 channels). For just stereo reduce no. channels using "-c 2". You can add also volume control by "vol -12dB" to the end, e.g.:
$ play -V3 -r 96000 -b 32 -c 1 -n -c 2 synth sin 1000 vol -12dB

Re: I2S DAC board for raspberry pi and beaglebone black

Reply #44
[quote author="brian"]I do get "play WARN alsa: under-run" sometimes when using your command. (Edit: I've uploaded a screenshot showing what I mean with the command context).[/quote]
Ok, I'll try to investigate (and fix) that.

To have at least somehow "comparable" results I've created also linear frequency spectrum plot of 7200Hz signal on my soundcard.

Btw, thanks for videos. You have nice boards.