I am building a hearing aid and wish to include DRC (Dynamic range compression), NR (Noise reduction), and destroy Acoustic feedback. Since, I am a college student, I have basic knowledge of linux, but new to programming a MCU. I wish to gather knowledge about how to implement DSP on a BBB.
Since literature out there on internet is vast, there seems to be no actual starting point for me. Any help on how to input the sound waves (i.e. output of microphone) to the BBB and process it and output it back to standard 3.5 mm stereo jack, would be greatly appreciate.
Just so you know, there is no DSP on the BeagleBoneBlack. So I am assuming you mean a DSP function.
Yes, I do mean the DSP function. I need to know how I can input the analog audio signal - process it (i.e. How do I implement the DSP algorithms) and send it out to an audio jack.
Purchase the Audio cape first
Is audio cape compatible with BBLK. I think I need to disable the hdmi functionality in order to use the audio cape.
yes. It was discussed here already
Thanks for the suggestion.
Now as I stated earlier I m a beginner, I don’t know where to start with programming. I refer to the part where I need to sample the data coming from a microphone and implement dsp algorithms. Please point me in right direction or some references. Thanks again.
probably you should have a look at arecord sources to figure out how to capture samples from a sound card
I was researching within the thread and found out that a USB audio dongle might be a cheap alternative to buying a Audio cape. I just wanted to know if it would work for my hearing aid application (i.e. to send an input to beaglebone black and receiving it back via the same USB audio dongle)
p.s. I am not looking to get a very high quality sound, just need to make it work.
Thanks in advance.
two things to consider:
For me "hearing aid" implies to increase the volume of a audio
signal. But you cannot process signals, which do not arrive at the
The cheap USB-Audio-Dongles have a no stereo mic inout. It is only
mono (or in other words: All USB-dongles I looked for, have a mono
input...I didnt find any dongle with a stereo input). A hearing
aid which feeds the same signal to both ears (mono) will destroy
the human ability to locate sounds. While crossing over roads (for example)
without being able to locate a sound could be fatal...
Furthermore it may be possible, that the input amplifier of such
dongles isn't powerful enough to amplify a mic's signal. May be the
advertising of such dongles confuses "Line In" with "Mic In" for
Priyank Patel <firstname.lastname@example.org> [13-10-01 03:59]:
Thanks for the quick reply. I will be sure to get the audio cape. After getting the audio cape, I suppose, I need to capture the mic input and sample it (I think ALSA does that?). Further, I will need to implement DSP algorithms. I researched on that and found the OMAP built into the beagleboard (Here I refer to the original beagleboard) has the ability to do DSP functions via Gstreamer tweaking (gst-dsp project). I am wondering if there is similar OMAP processor built into beaglebone black (which I am using for my project). Please, let me know how-to deploy dsp function on BBLK. Thanks.
the audio cape will do the sampling for you. This will release
a great processing burden from the shoulders of the CPU. The
A/D-converter (analog to digital converter) of the audio cape
will do this for you.
In the simpliest case, you only need to grab the samples and put
it on SD-card/disc (raw format). This means recording. In case
of an hearing aid, this is not that useful, since you will "hear it
Take a deep look into the datasheet of the tlv320aic3106, which is
TIs audio processor they put on the audio cape. This little beast is
capable of much more than simple sampling. For example you will get
a maximum sampling rate of 96 kHz, which means -- capable microphones
provided -- you can sample sound up to 24 kHz.
One thing: I dont know, how much of the features of this chip are
build into the driver! Means: May be you will need to hack the kernel
driver a little or a little more... But as there is a driver
already there this will not be THAT complicated.
To get the cape running with the BBB is a little tricky (driver
selection in the kernel (you use Robert Nelsons fantastic kernel?))
and you need to disable HDMI and eMMC as far as I know.
But it will definetly run with the BBB after some tweaking (or in
other words: I have a BBB and an AUDIO cape and a LCD7 cape (A2)
running together nicely after some hacking of the device tree).
Priyank Patel <email@example.com> [13-10-01 05:12]:
I’m using SYBA usb audio dongle is 11 bucks and it works. It appears as a second audio device if you dont disable the hdmi cape.
the audio cape IC is really powerful but note some functions are restricted by the hardware, example no microphone support(mic bias no connected). Check the audio cape files to make sure it works for your application.
I have bought syba usb audio adapter similar to yours. I plugged it in but I am not able to see it on command aplay - L. Please let me know how did you figure out. Also, I would like to know how to set it as default mic in And output. Thanks.
I’m using this angstrom image and is auto detected by the os, I have seen some time after updating it does not appear, but it happen because not all alsa component updated. this is the image I’m currently using 'Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.09.05’
Hey Pedro, I got it working. I assume the board was not getting enough juice from usb connection from computer. So I used a dedicated 5v 1A charger. And I was able to manipulate the conf file to set syba usb dongle as default audio mic facility. Thanks.