element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Blog BBB - Audio notes
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 28 May 2013 9:51 PM Date Created
  • Views 6843 views
  • Likes 3 likes
  • Comments 17 comments
  • beaglebone_black
  • bb_black
  • beagle_bone_black
Related
Recommended

BBB - Audio notes

shabaz
shabaz
28 May 2013

EDIT: See here for details on how to build a DAC:  BBB - Building a DAC

 

The BBB, unlike the RPi, does not have an in-built analog audio output*. However, there is a USB port for a soundcard, and a HDMI interface. The nice thing about the latter is what it derives the audio from; a hardware I2S interface inside the AM3359, which sends data out to an NXP TDA19988 for conversion to HDMI. So, the possibility exists to obtain I2S directly, theoretically at up to 24bit/192kHz (128fs clock).

 

Just to confirm audio worked, I tried USB audio first quickly. Plugging in the nearest USB audio sound card works with the Beaglebone Black - I tried an old Creative SB1100. The whole thing was powered just from the USB connector on a laptop for this, and it worked, but probably an external power supply should be used.

 

There are some software bugs however, because the sound was lower volume in one ear, like a software mixer issue. Hopefully that will be ironed out in a release sometime (the BBB is only a few weeks old currently). Apart from the lower volume issue, the audio quality was extremely good.

 

This is the procedure to get audio  playing:

 

ls -ald /dev/dsp* (you will see /dev/dsp listed)

Plug in the sound card and repeat. Now you will see /dev/dsp1 also listed.

 

Get the sound card name:

 

aplay -L

 

in my case, I saw:

 

default:CARD=GO

 

 

Play an MP3 file:

ffmpeg -i test.mp3  -f alsa "default:CARD=Go" -re -vol 20 (where vol is 0-256; 0=silent)

 

top revealed about 14% CPU consumption on the particular MP3 file that was being played.

 

I tried to play the same audio file but directing to HDMI:

ffmpeg -i test2.mp3  -f alsa "default:CARD=Black" -re -vol 20

 

It did work, but the current software build has known HDMI audio issues and it was noticeable - it didn't sound great always. Not noise, but some other digital effect.

 

There is not much information on NXP's site for the IC that provides the HDMI interface (TDA19988), however the BBB reference manual (SRM) specifies that  I2S is used to it, clocked at 24.576MHz. I don't have an external DAC, but I was curious if it was truly I2S format as currently configured for the TDA19988. The I2S interface comes out to header P9:

 

BBB Description    Header pin          Description

SPI1_CS0            P9_28               Bitstream

SPI1_D0             P9_29               Left/Right clock

SPI1_SCLK           P9_31               Bit clock


 

The actual data is on the pin CS0, not D0.

 

Looking on a scope, it is clear that the 24.576MHz clock runs always, and the other two pins are low. When there is sound to play, the Left/Right clock begins to toggle (at 32 bits) and then after a short while the bitstream occurs. I couldn't determine which side the padding was for 16/24 bit audio, but these things are configurable on DACs anyway. I noticed the bit change occurs on rising edges of the bitclock, so they are read in on the falling edge of the bitclock.

So, in summary, it is configured as an I2S interface, and it would be rather easy to connect up a decent external DAC if desired (e.g. car audio applications).

I don't know enough about Linux audio, but it would be nice to even send high quality FLAC file content (e.g. from attached storage) after non-lossy conversion into an audio stream directly through the I2S interface.

 

* Although there is no analog output, there is the possibility to toggle pins (at up to 200MHz) for cheap audio, either as PWM, or with multiple pins and summing. It's very cheap just to use I2S  however, since some DAC ICs cost less than $1.

  • Sign in to reply
  • shabaz
    shabaz over 12 years ago in reply to Former Member

    Hi Technoshaman,

    Thank you for the kind words! Also it's great the I2S is working for you! I agree, probably the lack of buffer is causing some distortion. And good luck with the rest of the SDR project!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 12 years ago

    All your articles are very helpful, and they provide great insights for people who are looking for a starting point. Thank you for putting so much time and effort in them. With the help of this article (I simply used the pins you mentioned), I managed to get (very low quality, due to long wires, passive I / V output, and cheap perf-board connections) sound (mp3 play with ffmpeg) from my BBB using a 74HCT74 (to divide the bit-clock by 4) and a TDA1543 (16-bit I2S DAC @ 9MHz). I'm going to print a suitable PCB and try again with opamps at the outputs soon, and hopefully have cheap and usefull audio output for my portable SDR project. Thanks again image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube