• Disclaimer: This Vendor's Forum is a paid-for commercial area. Unlike the rest of diyAudio, the Vendor has complete control of what may or may not be posted in this forum. If you wish to discuss technical matters outside the bounds of what is permitted by the Vendor, please use the non-commercial areas of diyAudio to do so.

Building an open embedded audio applicance.

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Bitclock Inversion Thing

Russ and Miero,

I noticed you're grappling with a 'bitclock inversion thing'. This has also been discussed in a blog by Shabaz over on element14.com. The blog is entitled "BBB -- Building-a-DAC". Shabaz extracts I2S signals from his BBB and feeds a DAC, apparently successfully. In the comments section at the end of Part 2 Shabaz claims that (as 22 February 2014):

"I checked a recent-ish Debian test build (BBB-eMMC-flasher-debian-7.3-2014-01-22-2gb.img from Robert Nelson) and the problem persists, so the driver code has not been fixed yet. Data changed on the rising edge, which is the opposite of what the I2S specification requires. So, the inverter is still needed for now."

You may be aware of this already, or perhaps this is helpful. Unfortunately I am ignorant and can be of no assistance. The link is:

BeagleBone Black: BBB - Building a DAC - part 2 | element14

- David
 
pfdavid & others
I just finished reading that entire thread myself. Excellent, work over there at element14! John Rhoades breakdown of the issues, realization of their causes and concise implementation guide is a must read.
I learned more than I thought I ever would on the subject:
The goal of an embeded BBB player .... hopefully, direct sourced to the BIII.
Impressive, element14
 
Fantastic work guys!
I just finished the BBB image I promised you:
1- MPD 18.9
2- Alsa-DSD Player included
3- Miero's i2s driver included (fantastic work mate!).

However, the kernel is the 3.8.13bone20. Seems there is something not working... But I cannot be sure, since I don't have any DAC for testing purposes... So please report if this works or not...

I will however make another image version with the kernel of bbbdebian, replicating the optimization I got with mine.

I also set up a volumio repo, where you could find latest MPD (both for PI and for other platforms, and the Alsa-dsd player.

To use that just add this to your /etc/apt/sources.list

deb index · styled with h5ai 0.24.0 (http://larsjung.de/h5ai/) all main contrib non-free

(for BBB, UDOO, Cubox, Utilite and so on)

and

deb index · styled with h5ai 0.24.0 (http://larsjung.de/h5ai/) pi main contrib non-free

for the little pi. Please note that repos are not signed yet, so just ignore the warnings and install.

To install alsa-dsd-player:

sudo apt-get update
sudo apt-get install alsa-dsd

The syntax is:

alsa-dsd-player namefile

You can find the image, as usual, here:
Get Started - Volumio

Enjoy and keep up the good work! Congrats to everyone involved, and please let me know if I can do any further!
 
Fantastic work guys!
I just finished the BBB image I promised you:
1- MPD 18.9
2- Alsa-DSD Player included
3- Miero's i2s driver included (fantastic work mate!).

However, the kernel is the 3.8.13bone20. Seems there is something not working... But I cannot be sure, since I don't have any DAC for testing purposes... So please report if this works or not...

I will however make another image version with the kernel of bbbdebian, replicating the optimization I got with mine.

I also set up a volumio repo, where you could find latest MPD (both for PI and for other platforms, and the Alsa-dsd player.

To use that just add this to your /etc/apt/sources.list

deb index · styled with h5ai 0.24.0 (http://larsjung.de/h5ai/) all main contrib non-free

(for BBB, UDOO, Cubox, Utilite and so on)

and

deb index · styled with h5ai 0.24.0 (http://larsjung.de/h5ai/) pi main contrib non-free

for the little pi. Please note that repos are not signed yet, so just ignore the warnings and install.

To install alsa-dsd-player:

sudo apt-get update
sudo apt-get install alsa-dsd

The syntax is:

alsa-dsd-player namefile

You can find the image, as usual, here:
Get Started - Volumio

Enjoy and keep up the good work! Congrats to everyone involved, and please let me know if I can do any further!

Hi Mikelangeloz

I will download the new beta for BBB and try it out over the next day or so. I have been using Volumio on the RPi for a few weeks now and it works great.

Yesterday I got I2S and Squeezelite working on the BBB with BBBDebian and Miero's driver - haven't got it plumbed into my dac yet, but the scope makes the right waveforms!

Thanks for the great efforts.

Mark
 
Hi Russ,

I had posted on your forums a while back about the Technologic Systems ARM boards. (Link:
Single Board Computers, Computer-on-Modules, Touch Panel Computers, PC/104 Peripherals, Enclosures, and Carrier Boards for Embedded Systems - Technologic Systems) You mentioned that they looked very interesting and would have no issued connecting I2S to on of your DACs.

Have you looked at any of these of late? They're more expensive than a Pi but seem much better designed. They offer a range of boards and support Debian out of the box. Their engineering team told me that modifications to their existing designing are possible with with low costs engineering charges, should a custom audiophile SBC be popular for a group buy. But they do offer single quantities, which is rare in the industrial SBC world

I've recently purchased the TS-7700, TS-7700 Ultra-compact Format with High Performance - Technologic Systems, but haven't had time to put it through its paces.

ts-7700.gif
Hi - must say that board does look to have great potential - did you get a chance to try it out?

Cheers
Jonathan
 
Miero

I have the Botic driver working on the BBB with Debian and Squeezelite. It plays faultlessly using 44.1/16 flac files as source material (though I am guessing it's upsampling to 48k?).

It sounds very organic and clean and powerful.

When I try hires files (88/24, 96/24, 192/24) the Buffalo seems to lose lock sporadically leading to dropouts. I don't see this issue with the Rpi, so it's unlikely a bandwidth issue between server and BBB. My first thought is to try to change the Squeezelite buffer settings. I copied the ones ChrisMmm posted a few days ago to get it working.

On a more general level I have found I need to open a SSH session, load the Botic driver, manually start Squeezelite and leave the Putty window open or the Squeezelite session drops. This is nothing to do with the driver, but I guess means I have work to do on my Squeezelite installation on the BBB.

I haven't managed to get wifi working yet so am running on Ethernet. More work to do, but it sounds good as is - very good in fact.

Mark
 
Member
Joined 2009
Paid Member
Miero

I have the Botic driver working on the BBB with Debian and Squeezelite. It plays faultlessly using 44.1/16 flac files as source material (though I am guessing it's upsampling to 48k?).

It sounds very organic and clean and powerful.


Mark

Do you you appreciate as an improvement, comparing to your previous Buffalo setup/configuration (USB)?
There are changes in the sound scene, before/after? Can you hear quite precise location (near/far) of the instruments/voices in the sound stage (stereo)?
 
Last edited:
Do you you appreciate as an improvement, comparing to your previous Buffalo setup/configuration (USB)?
There are changes in the sound scene, before/after? Can you hear quite precise location (near/far) of the instruments/voices in the sound stage (stereo)?

The sound is more rounded, deeper and relaxed than the USB setup (WaveIO). The soundstage is probably a bit more "solid", stable and correct.

In terms of resolution I think the improvement over the RPi I have been listening to for the last couple of weeks I think the BBB is less strident and deeper in the bass. A "cleaner" delivery is you like. I think there is more to come as the implementation matures, but this is very promising.

Mark
 
Miero


On a more general level I have found I need to open a SSH session, load the Botic driver, manually start Squeezelite and leave the Putty window open or the Squeezelite session drops. This is nothing to do with the driver, but I guess means I have work to do on my Squeezelite installation on the BBB.

Just start squeezelite adding -z option, this starts it as a daemon not running under the terminal session and you can close your SSH session.

I have set up a squeezelite start/stop/restart daemon and also automated startup so when I boot BBB it loads the drivers and starts squeezelite. All works well (this is under Debian).

BTW I only tried a 48k file never even tried a 44.1k file as I thought it wouldn't work so am interested if it is resampling or not.
 
Just start squeezelite adding -z option, this starts it as a daemon not running under the terminal session and you can close your SSH session.

I have set up a squeezelite start/stop/restart daemon and also automated startup so when I boot BBB it loads the drivers and starts squeezelite. All works well (this is under Debian).

BTW I only tried a 48k file never even tried a 44.1k file as I thought it wouldn't work so am interested if it is resampling or not.

Thanks Chris, I'll follow up on this tomorrow.

I may try doing some off line resampling to 48k and give that a listen. My expectation is that the BBB is resampling on the fly at present.
 
When I try hires files (88/24, 96/24, 192/24) the Buffalo seems to lose lock sporadically leading to dropouts. I don't see this issue with the Rpi, so it's unlikely a bandwidth issue between server and BBB.

If you have a Buffalo, try to increase DPLL settings. I think the low quality clock on BBB is responsible for these dropouts. Today I'm having 1 dropout per minute at 192kHz, but couple days ago the 96kHz was not not usable.

So it depends, on weather maybe :)
 
Also playing 44.1kHz files should work too, the ALSA or your media player will take care of the resampling.

In my case the player SW is squeezelite. So the data flow is thus:

squeezelite -> ALSA -> driver -> I2S

Or am I simplifying there?

I do not believe squeezelite is resampling (at least I have not told it to!) so you are saying ALSA is resampling the 44.1k to 48k? Does ALSA somehow know it cannot play 44.1k because of driver/clock restrictions and thus resamples or does it always resample 44.1 to 48?

Edit: quick check of my RPi ro ES9023 via I2S playing a 41k file and I get:

tc@piCorePlayer:~$ cat /proc/asound/card1/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 882
buffer_size: 3528


So appears that ALSA has nor resampled in this case.
 
Last edited:
In my case the player SW is squeezelite. So the data flow is thus:

squeezelite -> ALSA -> driver -> I2S

Or am I simplifying there?

I do not believe squeezelite is resampling (at least I have not told it to!) so you are saying ALSA is resampling the 44.1k to 48k? Does ALSA somehow know it cannot play 44.1k because of driver/clock restrictions and thus resamples or does it always resample 44.1 to 48?

Edit: quick check of my RPi ro ES9023 via I2S playing a 41k file and I get:

tc@piCorePlayer:~$ cat /proc/asound/card1/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 882
buffer_size: 3528


So appears that ALSA has nor resampled in this case.
If you use this command during playback it should tell you the momentary frequency and the supported rates of the device.

cat /proc/asound/card1/stream0

Jesus R
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.