Open-source USB interface: Audio Widget

Hi Demian,

The code fragment I posted is from the Linux alsa driver. So some of your questions/comments should be directed to Daniel et al :)

I'm looking at the mpd source code now and it appears that mpd decodes "chunks" of data continuously (even across song boundaries) and then passes the chunks to a player controller to play. It does check the audio_format (which includes the sampling rate) of the chunks to see whether it has changed half-way, but it DOES NOT seem to do anything about it (such as sending commands to the alsa output to change format etc.) A pause or stop, however, RESETS the audio_format to the new format of the chunks.

when I have studied mpd source code well enough to understand better, I may be able to just patch mpd to reset the audio_format when playing a new song for testing :)

It is easier to patch mpd than to meddle with the alsa driver and Linux kernel :)

Alex
 
Of course the MPD rate change bug must be fixed.

Nevertheless, just for the sake of curiosity, I wonder: is the -25% to +50% limit required by the standard or some other very good reason? couldn't / shouldn't the driver just obey whatever rate feedback it receives?

And, from "our" side, would it be possible to change the widget firmware so that it never issue rate feedback changes larger than -25% or +50% at once?

Back to clock power supply and noise, another interesting discussion in the "http://www.diyaudio.com/forums/digi...timate-weapon-fight-jitter-5.html#post2878804" thread.
 
Last edited:
Hi Demian, UnixMan et al,

After studying the alsa uac2 driver auto rate feedback format detection code again, I now have a workaround in the firmwware :)

Please test:

audio-widget-nik-2012-01-27.elf - sdr-widget - Unified firmware for audio-widget. For Linux alsa uac2 driver and mpd playback only May not work properly under Win or OSX. - Audio and Control Interface for Amateur Radio SDR and Audiophile USB-DAC - Go

Note that this firmware specifically addresses the low-->high sampling rate change issue when using Linux uac2 driver (with mpd), and it may NOT work under Win or OSX.

So it looks like there is no need to fix mpd or the Linux uac2 driver for now :)

In fact, the more I study mpd source code, I more I think it is NOT the problem. It does check all the chunks for the audio_format to make sure that the audio_format in the chunks are the same as the audio_format of the player control.

So I have to say sorry to mpd for saying bad things about it :)

Alex
 
Member
Joined 2004
Paid Member
Alex:
It all works. I can't get it to fail no matter which combination of sequences of sample rate switching I use. Any combination of up-down just works.
There is only one very small thing I have noticed. When shifting up or down the beginning of a track seems to "glitch" slightly. If the track starts with silence you hear nothing. Zero cut tracks have a sort of pop and cut off part of the first syllable. I have noticed this on other DACs under other circumstances. Its just a reality of trying to figure out the new sample rate.

I'll try it on Windows UAC2 and see what I find.
 
USB5102 now available

Hi,

I finally got around to assembling my USB5102 DAC card. Other than the usual missed solder joints it worked like a charm. It is currently running Alex's latest code and was tested with an antique 2.6.38 kernel. I also ran it on a Win7 netbook with no problems. I am only testing for electrical and not the quality of the firmware or drivers. :) I leave that rats nest to others.

I assembled the card using a temp controlled soldering iron with a 1/32" tip and a pair of quinquagenarian eyes. I built the card in stages: blinkyflashy, power supplies + clock and finally the DAC. If I can mount 0603 size parts anyone can :)

The USB5102 comes with a custom .3ps SI532 clock. There are ADP151 regulators for clock, Dvdd and Avdd. The board can be power from the USB port or any or all regulators my be bypassed.

Sound quality: sounds fine to me but I am biased. :)

I have inventory for 13 kits and they can be ordered from
Yoyodyne Consulting//Audio Hardware/USB5102
You can see a pic of the finished board and download the document archive located on the page for schematics and layout.

Happy listening
George Boudreau
Yoyodyne Consulting.
 
Member
Joined 2004
Paid Member
I suggest (strongly) that you use a transformer for the mclk. This might work: Digi-Key - 553-1655-ND (Manufacturer - CX2074NL) Optos for the others are fine, especially if they are latched synchronously with the clock. Opto's will have higher jitter, not that that should be an issue with this architecture.

I don't have any changes for the regulator circuit (except the protection diode, which ideally should be a Shottky or Germanium).
 
OK guys,

regulator: Demain, could you please point to the latest schematic?

isolators: It is hard to make room for everything on the new AB-1.12 prototype board. Instead I have finished the design of a new module which uses both today's somewhat impractical 2.0mm pitch AND a 2.54mm/100mil pitch for its IO. That way it'll be easy to design any kind of go-between that inserts isolation (or what not) between module and Analog Board.

The revised module's 100mil IO and all analog board 100mil IO will be on the same grid.

The new module has slightly improved USB beads. It also has room for XOs. I know it's far from ideal to move those away from the DAC, but a lot of people wish to interface DAC boards without clocks.

Unfortunately, there is no room for I2S or SPDIF headers on the module. But those can be fit on a veroboard the new module will fit on.


Børge
 
I have planned for this weekend's new TL431 boards: 0.1 uF capacitor replaced by 100 uF(I think probably not necessary but I'm going to try) and for analog supply AVCC: 2200 Oh. to 120 Oh. which lowers the output impedance.

It has to be measured. And then make listening tests. But these two things do not change their board, they are just different values.

The Demian circuit has two qualities in the analog AVCC AB-1.1, This circut works well with only 5 V. input. It can get better analog source supply but it takes a higher initial voltage. The other is flat impedance with frequency, and I hope that lower impedance get more in dynamic.
 
Last edited:
The filter switching is done by a control line from the processor. Alex modified the configuration program to support the function. Alex just notified me of the modification and I have not tried it yet.

Sound Quality: My ears are too old to tell the difference between my two cards. I just design 'em and let others beat them to death.

George

Nice. Have you seen this:

http://www.diyaudio.com/forums/digi...ntered-direct-output-two-digital-filters.html

Question: which setting have you used for the filter? is it possible to switch between the FIR and IIR mode?

What about the sound, how does it compare to the ES9023?
 
Member
Joined 2004
Paid Member
Latest version of the power supply + clock

Below is the latest version of the supply regulator as it was intended to be used. The transformer isolation is also shown. The idea is to remove as much stuff as possible from leaking back into the oscillator. The secondary of the transformer should be connected as close as possible to the clock distribution/clocked device. The 100 pF caps will probably need to be bigger.

Why a transformer if the jitter is isolated? Follow this- you have two fairly closely located signals of about the same frequency and its RF so they can detect the radiation from each other. Oscillators when close will tend to lock to each other, and map noise and jitter to each other. If we have a jittery signal at the same frequency as the clock it could pick up some of that jitter. This is a real phenomena. For precision measurements of phase noise NIST has amplifiers with 180 dB of reverse isolation to prevent this. We don't need to go that far but keeping it clean with a transformer is not a major burden. And the coupling won't be much more than the opto.
 

Attachments

  • XO Supply Noise Filter v2.JPG
    XO Supply Noise Filter v2.JPG
    83.4 KB · Views: 608
Hi USB5102 users:

You can use the firmware and WidgetControl GUI tool for the ES9023 based audio-widgets for USB5102. However, to be able to configure the USB5102 to use FIR or IIR fitler, you need the new firmware and the WidgetControl GUI tool to set things up.

The new firmware is here:
audio-widget-PCM5012-2012-01-29.elf - sdr-widget - Unified firmware for audio-widget USB5102 from George. You can installed this firmware for other audio-widgets such as ES9023, but you have to do factory reset and setup properly using WidgetControl

You need to use WidgetControl GUI tool to set things up before the USB5102 will work properly. You also use the GUI tool to select the filter mode, FIR or IIR. Once the features are selected, you reset the USB5102 by pressing and releasing the "RESET" button on the USB5102. The feature selections are stored in the non-volatile memory of the widget and will remain there until you change it the next time.

The Windows WidgetControl GUI tool is here:
WidgetControl GUI Tool for PCM5102 2012-01-29.zip - sdr-widget - WidgetControl GUI tool for PCM5102 audio-widgets. packaged for Windows 2012-01-29 Extract into 'dist' directory and run 'WidgetControl.exe' You may need some Windows system .dll files t

The Linux WidgetControl GUI tool si here:
WidgetControlGUI for PCM5102 - 2012-01-29.tar.gz - sdr-widget - WigetControl GUI tool for PCM5102 audio-widgets. For Linux You need python26, pythoncard, wxpython2.8, pyusb etc. installed. - Audio and Control Interface for Amateur Radio SDR and Audio

Now for ES9023 audio-widget users:

You should stick with the non-PCM5102 firmware and WidgetControl GUI tool. However, it is possible to flash the PCM5102 version of the firmware for the ES9023 audio-widgets. BUT you MUST do a factory reset and ONLY use the PCM512 version of the WidgetControl GUI tool to set up your audio-widget before use. The FIR/IIR selection setting will NOT affect your widget as the ES9023 has no selectable digital filter. For your information all my ES9023 based audio-widgets are now running the latest PCM5102 firmware.

Currently the FIR/IIR settings are fixed and stored in the non-volatile memory, and you can change it by using the WidgetControl GUI tool to set it to a new setting and then RESET the widget for it to take effect.

In future our plan is to develop another GUI tool that is used to control the audio-widgets in RUN TIME. That is, you can change the settings when the widget is playing music. Of course, this will only be useful for some settings only. There will be other settings that SHOULD NOT be changed in run time. This will be more relevant when we have i2c controllable DAC's such as ES9018 or WMxxxx.

Alex
 
Hi Demian,

thanks for the schematic. Do you recommend one regulator circuit per XO? Do you also recommend it for the DAC chip?

As you know, the XOs on the AB-1.1 are shorted together with 68R resistors while their enable pins are in opposite phase. I don't know how much is actually turned off in there then.

Børge

Below is the latest version of the supply regulator as it was intended to be used.....
 
Hi Alex,

I assume the new branch is a direct decendant from audio-widget-nik. Is that correct?

Børge

Hi USB5102 users:
You can use the firmware and WidgetControl GUI tool for the ES9023 based audio-widgets for USB5102. However, to be able to configure the USB5102 to use FIR or IIR fitler, you need the new firmware and the WidgetControl GUI tool to set things up.Alex