Home > Computer (HW and SW) > BEAGLEBONE BLACK for AUDIO

BEAGLEBONE BLACK for AUDIO

Update (4/1/14)

I purchased my BBB from MakerTronics. I received info that there is a new version, Rev C, with more memory [link] and $10 more.

I had ordered a BBB for no other reason that it’s better looking than the Rpi :-).  That was before all the discussions at diyaudio and efforts to build an external clock board. But as it turned out, the BBB has the edge for audio application. Here is why:

Parameter Rasberry Pi
BeagleBone Black
Comments
Native I2S support Yes Yes Both platforms can support I2S output, but it needs to be supported in the s/w.
I2S Sample Rate limitation Up to 192KHz (because the on-board clock is 19.2MHz) Only 48KHz family (because the on-board clock is 24.576MHz and integer clock dividers) BBB supports 48KHz, 96KHz, 192KHz and 384KHz. RPi supports 44.1KHz, 48KHz, 88.2KHz, 96KHz, 176.4KHz and 192KHz (in theory). RPi uses “fractional clock dividers” to generate the 44.1KHz sample rate family
Support for USB DAC Yes (LAN9512 chip [link]) Yes (Built-in in the main processor) USB in the RPi goes through a built-in HUB and it is shared with the LAN controller within the USB/LAN chip. USB in the BBB is natively supported by the main processor; LAN has a separate chip
Support for external, low jitter clocks Unknown Yes The master clock in BBB may be provided externally by disabling the on-board audio-freq clock.The Master clock in the RPi seems internally generated and there is no I/O pin to feed an external master clock
Master clock output No Yes (from on-board clock) The Master clock in BBB is provided by the on-board 24.576MHz and fixed at this frequency and can be directly accessed from the outside. The Master clock of RPi seems internally generated but un-accessible from the outside. Without Master Clock, you can only use DACs that can operate asynchronously without a Master Clock input such as the ESS DACs or DACs that can operate with the master clock = bit clock
Built-in rechargeable battery operation No Yes [link] Rechargeable Battery operation in BBB would disable the 5V supply to the USB. Thus for USB operation, where the USB adapter takes the power from USB, BBB must be powered with 5V DC
Built-in Storage No 2 GB eMMC Flash BBB can boot from the internal storage freeing the SD card for music storage. RPi requires that the OS be stored in the SD card (although it may be possible to also store music in the SD card)
Looks Medium Good :-)

In addition, even though the Rasberry Pi has the most community development support, the BBB is a close second, so there is ample resources available. The s/w part is a big part of the solution.

BEAGLEBONE BLACK

CPU: AM335x 1GHz ARM® Cortex-A8

DSC04362

DSC04367

DSC04365

RAM Chip (512M DDR3)

DSC04364

Flash Storage Chip (2GB 2MMC)

DSC04367-001

Power Management Chip

The TPS65217 [link] is a single chip power management IC specifically designed to support the AM335x series of application processors in portable and 5-V, non-portable applications. It provides a linear battery charger for single-cell Li-ion and Li-Polymer batteries, dual-input power path, three step-down converters, four LDOs

DSC04363

Potential lower-noise mod?:

According to page 2, 30 of datasheet:

For low-noise applications the devices can be forced into fixed frequency PWM using the I2C interface.

The TPS65217 step down converters typically operate with 2.25-MHz fixed frequency pulse width modulation (PWM) at moderate to heavy load currents. At light load currents the converter automatically enters Power Save Mode and operates in PFM (Pulse Frequency Modulation).

This is a s/w mod. However I2C access to the chip seems not easy at this moment. According to this article [link]:

The TPS65217C PMIC is very programmable; it has dozens of configuration settings specifically for charging and it has safety timer capability. The PMIC is configured upon startup via I2C. There are three I2C busses on the BBB, and one is dedicated to on-board peripherals. Control of the PMIC is not normally possibly by the user; it requires driver code or possibly there is access by the device tree infrastructure. Checking the .dts file in /boot did not reveal how to control the battery charger functionality. There are two current Google Summer of Code (GSoC) projects that touch on PMIC:

1. IIO, ADC, PMIC, LCD debug/patchwork (summary page, blog page) – Zubair Lutfullah

2. MINIX I2C drivers (summary page, blog page) – Thomas Cort

Hopefully the guys working on the projects (Zubair and Thomas) can offer some advice on how to set the level to 4.2V. Zubair’s project also includes how to use the in-built ADC inside the AM3359 to monitor voltages.

According to the datasheet, “light load current” seems to be at the 1 mA range. Perhaps during operation, the device may never enter the PFM mode and therefore this mod may not be needed at all.

USB Host connector

DSC04368

DSC04369

The current preferred mode for audio is to use a USB audio interface to the DAC because BBB cannot support 44.1KHz sample frequencies with the on-board clock. The interesting part is that the 5V power in the USB host is provided by “SYS_5V”

usbHostSch

“SYS_5V” is essentially the 5V DC input to the board. The 5V line goes through a series of solid state switches for power up/down management. Therefore a clean 5V supply to the board will also provide a clean 5V to  the USB audio interface. Further filtering is provided by the FB7 ferrite.

I2S Output

BBB audio is generated by the main processor, the AM335x 1GHz ARM® Cortex-A8. The Multichannel Audio Serial Port (McASP) subsystem is responsible for generating the audio using and external audio frequency oscillator. In this case it is a 24.576 MHz oscillator connected to the clock input pin of the processor’s audio subsystem

DSC04361

AudioClock

According to the BBB System Reference Manual, page 75 [link]:

6.10.6 Audio Interface

There is an I2S audio interface between the processor and the TDA19988. Stereo audio can be transported over the HDMI interface to an audio equipped display. In order to create the required clock frequencies, and external 24.576MHz oscillator is used.

In order to create the correct clock frequencies, we had to add an external 24.576MHZ oscillator. Unfortunately this had to be input into the processor using the pin previously used for GPIO3_21. In order to keep GPIO3_21 functionality, we provided a way to disable the oscillator if the need was there to use the pin on the expansion header.

Therefore, since a bit-clock has to be generated from this external 24.576MHz clock, only the 48KHz family of sample rates can be supported. Notice that the most common high res sample frequencies are 96KHz and 192KHz and are fully supported by the board.

Notice that since the 24.576MHz clock is fed through an external interface, the audio subsystem is operating in SLAVE MODE. This is according to the datasheet [link]. This master clock is also available external through pin 25 of header P9.

SlaveMode

The I2S Pins are as follows on the header P9 (clearly labeled on the board) [link]:

I2SPins

There is a good discussion on I2S audio output here [link]

EXTERNAL CLOCK BOARD

I don’t know about the “unfortunately” part above, but for audio, disabling this clock and having access to the clock line through GPIO3_21 allows the use of an external clock (so this turned out to be fortunate for audio applications).

The solution for bit-perfect audio for all sample rates is to provide the clocks externally through an expansion “cape”. This cape would have two clocks: one to support the 44.1KHz family of frequencies and another to support the 48KHz family of sample frequencies. Two other I/O pins  are used to select the appropriate clock frequency. In addition to an external clock board, s/w needs to be developed to enable this function. More discussion here: [link], [link].

This “external clock board” is currently being discussed here

It is important to reiterate that without this not-yet-available clock cape, the BBB would not be able to support the 44.1KHz family of sample rates through its I2S interface. In the meanwhile, while we await the development of the dual clock board, the USB interface would be the preferable method for audio output.

GETTING STARTED

The first thing to do is to check the board and ensure it is working. Follow the Getting Started Guide [link]. Here is what you do:

  • To get started all you need is to connect the BBB board to a computer with the included USB cable. This will power the board and provide an interface to the board
  • The BBB comes already loaded with an operating system (currently Angstrom) in the on-board eMMC flash memory. Once you power it on, it will boot-up.
  • After boot, you will see the BBB board as a storage drive in your computer. From power-on, this booting process takes about 24 seconds.
  • Following the link the the “Getting Started Guide” install the device drivers that will enable “network-over-USB” access to your BBB board
  • Type http://192.168.7.2 in your browser and you will see the following screen

BBB out of the box (shows up as a storage device)

BBBDrive

BBB after installing network-over-USB drivers (address: http://192.168.7.2)

BBBWeb

Terminal Session

You may want to access the BBB with a terminal session. Download “putty” [link] (for Windows) and run it. Enter BBB IP address (192.168.7.2), you will see a log-in prompt. Enter “root” for login and nothing for password.

BBBPutty

BBBPuttyLogin

BBBPutty2

The official getting started guide is here: [link]

About these ads
  1. Oboema
    2014/03/10 at 08:22

    Nice Article

  2. David Quayle
    2014/03/10 at 08:49

    “it’s better looking than the Rpi” at least your honest, I’m sure a lot of people have bought it for that reason. How does it compare to the Cubietruck though, obviously wins in the looks department :) but is it a better audio solution, I wonder. Great article as usual.

    • BlgGear
      2014/03/10 at 19:30

      I hate the ugly looking vga connector on the cubie :-)
      I think the SATA and the WIFI in the cubie are a plus for a music server
      Right now BBB needs the external clockboard to be a “serious” contender… and the cubie is already bit-perfect through I2S. But you can use USB in the BBB in the meantime
      There is no rush buying any of these boards. Everything will get better. And they are cheap. The s/w is still in the early stages and that will also get better.
      Just get whatever right now and get familiar with the system, software, power, network and UI then wait a while and get the “next best card”…

  3. Con
    2014/03/10 at 08:59

    You do a really useful work putting all together in these articles. Thanks!

  4. Ryan Small
    2014/03/10 at 18:09

    Nice post! I’ve been playing with using a BBB as a mpd server connected to a usb DAC for the past few months. So, far I found the BBB to be a highly capable machine that easily plays 192/24 files. Here’s where i’ve been keeping my notes: https://github.com/foundatron/jambox_setup/wiki/Installation-guide

    • BlgGear
      2014/03/10 at 19:33

      That is a very nice and concise guide. Thanks!

  5. ChrisMmm
    2014/03/11 at 02:59

    Great summary of the current state of play. In agreement, having used Rpi, Wandboard and BBB. BBB and I2S is the way forward especially once the promised “cape” is developed.

    Great site and a useful resource – keep it up!

    • BlgGear
      2014/03/12 at 16:22

      Seems the BBB is the only board that can take readily take the audio clocks externally

  6. 2014/03/12 at 16:58

    Wow. I’ve been running around with cape ideas for an audio player exactly like described here. It’s just all too logical to do it like this. I have some additional ideas – gpio pins to diagnose or control external hardware made available in the software, and of course full integration with streaming services, control from smartphones etc.

    Maybe it would be good to set up a Github repo and a project rather than invent the wheel separate from one another?

  7. 2014/04/26 at 16:44

    Excellent article!

    Do you know if HiFiBerry Digi works on BBB? It is runs on ESS platform, and it works in async mode, so, no need for a clock. Hypothetically it should work…

    • BlgGear
      2014/05/02 at 19:04

      The I2S output of BBB only supports 48KHz and their multiples. If you have a 44.1K track, it will be converted to to 48KHz

  8. Dr N
    2014/05/04 at 19:35

    Using my BBB as an MPD server with a USB DAC I get sound, but also a constant clicking sound (at about 120HZ give or take). Present whatever software I use. Obviously interference from somewhere, but no idea where!

    • BlgGear
      2014/05/05 at 04:16

      try a different power supply. 120Hz sounds like AC noise…

      • Dr N
        2014/05/05 at 10:50

        Thanks BigGear. I have a higher quality linear PSU on the way (rather than my very cheap generic switching model) and I’ll feed back if that helps

  9. Brian
    2014/05/27 at 01:36

    This thread may be of interest to you as I have been experimenting with the BBB and r-Pi and have read your posts, the most interesting result is probably the first post on the second page:
    http://dangerousprototypes.com/forum/viewtopic.php?f=19&t=6089

  1. 2014/03/11 at 13:29
  2. 2014/03/11 at 22:09
  3. 2014/03/24 at 21:16

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 193 other followers