<<home  <<previous  next>>


audio dongle tweak


how to get bigger sound from small audio adapters



USB audio adapters do a good job with VOIP but they tend to sound 'smallish' with music, as if their physical size is a limitation. AD/DA converters, amplifiers and USB transceiver are all built together into a single tiny chip.

I was searching an audio interface for wearable live performance equipment. Initially disappointed with small audio adapters, I suspected that amplifiers in lentil-sized chips will never be able to give big sound. Later I found that it is not the small chip, but other components which are throttling output power and frequency response: capacitors, which can be replaced with relative ease.







USB audio adapters, general layout



Most simple audio adapters have stereo line out and a single input optimized for electret microphone. This configuration happens to suit my purpose of live sampling, using a miniature unidirectional microphone (see page DIY mic). Resolution is 16 bit and supported sampling rates are 44.1 and 48 KHz. The adapters work with generalized drivers for USB audio class 1 on Linux, OSX and Windows. Current consumption is remarkably low at 10 mA, which makes them extra useful for wearable conditions.

I/O section in the chip looks like the partial block diagram shown below. Input and outputs have programmable gain controls in the analog domain. Microphone input has a preamp boost. The input signal is routed through separate gain controls for ADC and monitoring. The mic signal routed directly to the output for monitoring is sometimes called 'sidetone'.






I/O section of an audio codec chip with mic input




Programmable gain controls should be accessible via mixer applications on the computer. The screenshot below shows command alsamixer on GNU/Linux with settings for an audio adapter. Four controls are available in this case:

- speaker (combined line / headphone output from DAC)
- mic (to output for monitoring, 'side tone')
- mic capture (to ADC)
- auto gain control (automatic amplification of low input signal)

Speaker, mic monitor and auto gain can be muted / disabled by toggling 'm' key.








initial quality assessment


Meagre bass response and output volume are not the only things that can be wrong about an audio adapter. I came accross other possible issues, some of which can't be fixed because they are baked into chip silicon or circuit board design. Ideally you would not spend time and money on models with such issues, but what do you know before buying? Low production cost is the most important specification and manufacturers make no promise other than that it 'will work'. I want to use a product for a purpose more ambitious than what it is sold for, so I have to run my own tests and discard products that can't fit my needs.

Below is a list of issues that can be found by ear or simple measurements. The first three issues are interrelated and typical for cheap audio adapters. This is the focus of the capacitor mods described further down. For the other issues I have no remedy, only a description to make you aware of them. 

- flawed bass response of captured sound
- flawed bass response of playback sound
- low output volume

- power supply noise
- preamp noise
- quantization noise
- clock jitter
- audio glitches
- DC offset



frequency response and output power


When listening music over an audio adapter and headphones, the bass roll off issue can't be missed. The effect is mainly due to undersized output coupling capacitors. Another effect of too small capacitors is suboptimal output power to headphones and sound systems with limited gain. Reference applications in datasheets for audio codec chips suggest output capacitorvalues between 100 and 470 uF. Here's a layout snippet for Cmedia CM108:










I could hardly believe that 100 uF or more is implemented in audio adapters. The arrow in the magnified picture below points to output capacitors. They are smaller than a corn grain.
 




audio adapter circuit board (Ewent EW3751)



The output caps on the partly disassembled adapter below are relatively 'large'. I have later desoldered them and measured capacitance: 47 uF. Amazingly high value for their size when compared to old skool radial caps. Still it is only one tenth of the 470 uF recommended for a similar chip.





audio adapter with connectors removed (Sabrent AU-MMSA)




For comparison here's the Griffin iMic. It seems to have 150 uF output caps. That is a better value. The sound is also as good as you can get from a tiny audio interface like this. I would not try to improve this one.





Griffin iMic circuit board




In a first experiment I soldered 220 uF electrolytic capacitors over existing caps in the adapter shown below. This greatly improved bass response for headphones, and output volume both for headphones and line. Later I found that the input capacitor which has the function of keeping the bias DC away could also use a better value (1 uF) to improve input frequency response. Of course a circuit board with such extensions won't fit in it's enclosure anymore.








Since a modded adapter needs a new enclosure anyway I decided to handle it as 'breakout board'. Connections of input, output and USB are wired to experiment board.Original caps are desoldered and replaced with plain wire:







The new capacitors, USB wires and input / output wires are all soldered on the experiment board. This board was mounted in a stereo DI box to make a custom audio interface for live sampling.




plaatje nog vervangen




generalized schematics











power supply noise


Small audio adapters generally do a good job in filtering noises from the USB voltage. Without documentation it is hard to tell how that is done. Inductors (indicated with character 'L') can be part of the filter. When tweaking a circuit, do not assume that USB ground is equivalent to signal ground even when a multimeter doesn't see resistance between them. I made that mistake, resulting in a whine that wasn't there before tweaking.


preamp noise


Preamp noise can be evaluated by ear through the monitor output. Toggling the monitor mute on and off quickly reveals the contribution of preamp noise. To assess S/R ratio you need an acoustic reference sound like your own voice or a familiar instrument.

I compared audio adapters under test with a Mackie Onyx Blackjack (using low z instrument input and external electret bias). Two identical microphones and two instances of Pure Data are used for each comparison. Microphone levels are set in such a way that an acoustic signal gives the same RMS value for both audio interfaces, measured with Pd's audio test patch. Without acoustic input the RMS level is then an indicator of relative preamp noise. The noise floor difference between my adapters and Mackie is less than +6 dB, meaning less than twice as loud. That isn't so bad, considering Mackie's reputation for low noise. Of course the Mackie isn't made for electret mics but for condenser mics which need more amplification and thus better preamps.


quantization noise


With only 16 bits of resolution, quantization noise is a serious hazard. From wikipedia I learned that 'noise shaping' techniques are used to transpose quantization noise to a frequency range where it can do no harm. How can we verify in practice whether noise shaping is done properly? Quantization distortion is best perceived with sine waves digitally defined at low magnitude, using fewer bits than maximum resolution. This test can be done with Pd's test tone patch again, or you could create a soft, almost invisible test tone in a wave editor. Listen if you hear a pure sine tone, or extra frequencies.

One audio adapter under test produces overtones on a sine wave around -50 dB. For percussive sounds I noticed a blurred decay, as if the instruments were played with brushes. I suspect that both effects are due to quantization noise. It is the Sabrent AU-MMSA with Cmedia HS100B audio codec. I would not recommend audio adapters with this chip for music purposes


clock jitter


AD / DA converters need a clock signal to convert samples at a specified stable rate. Because a computer can't guarantee stable USB transmission rate, audio adapters use 'adaptive transfer' to synchronize their sample clock with the USB transmission. Some chips need a crystal to drive their internal oscillator. Others don't and seem to rely on USB rate only. PLL (phase locked loop) techniques are used in both cases to keep up with USB transmission while minimizing clock fluctuations. Perfect stability is impossible with adaptive transfer. Remaining fluctuations, clock jitter, translate to undesired frequency variation in the audio signal. Since the host computer is responsible for USB transmission rate in adaptive transfer, it seems to me that clock jitter varies not only per audio adapter but also per computer.

To be honest I had never consciously heard clock jitter with my own ears so I started listening for it explicitly, using a sine test tone again. How would jitter sound like? Vibrato, like how a soprano sings? Or slower, like a record player with unstable speed? I heard nothing like that.

In a more objective test I had a Raspberry Pi playing test tones over audio adapters while detecting frequency with Pd external [helmholtz~] on my laptop with built in sound card. Now it became clear what clock jitter can look like: frequency steps. At the start of one test there were a few small but audible steps within a minute or so. Thereafter it stabilized, for my ears at least. But [helmholtz~] still observed up and down steps, in the order of one cent. In another test with a different adapter all frequency fluctuations were smaller than one cent. I don't think this can spoil my music performance.


audio glitches


When a segment in an audio stream is skipped or duplicated this can be audible as a click, sometimes very loud. Too tight latency settings in combination with CPU spikes aren mostly responsible for such glitches. Too much USB traffic and lost packets could be another cause. These are things we can influence.

Sometimes one audio adapter produces more glitches than another under the same conditions. Or one sample rate more than another. Or glitches happen in the first minutes only, as if the device needs a warming up. These things are mysteries.