Open-source USB interface: Audio Widget

Good to know! Thanks. The 132 and 144 cases aren't really supported. I think there were some simplifications done in the USB enumeration which makes them come up.

I'll try to add some tweaks and see if that helps. It'll be a bit like hunting with a shot gun in the dark because I don't have a Mac :)

Børge


I tried AB1.2 new firmware in MAC OSX 10.8.2.

UAC1:
44 Bad.
48 OK.

UAC2:
44 OK
48 OK
88 Bad.
96 Bad.
132 Bad
144 Bad
176 OK
192 OK
 
Borge-
What is required to build the firmware in Linux?

No GUI!

You'll need a Toolchain from Atmel. Typically something like Atmel AVR Toolchain 3.4.1 for Linux- Atmel Corporation

Atmel keep updating those the whole time... If you look at the script make-widget (at least in the audio-widget* branches) you'll see how the compiler is instructed as to where to find the toolchain. The toolchain has slightly different locations with and without the GUI installed.

I personally use the GUI in Windows to navigate the project but I build with "make clean audio-widget" in Cygwin.

Børge
 
Member
Joined 2004
Paid Member
New firmware- I have tried the normal sample rates (44.1, 48,88.2,96,176.4,192) on Linux 3.6.6 and mpd 0.17.2 with no glitches burps or any other sign of distress. All working fine.

Interesting observation on difference between Linux driver and windows/OSX driver-

for Windows/Mac:
1) Set sample rate
2) set interface

For Linux it is reversed:
1) set interface
2) set sample rate

Both are legit but can have a big impact on how the device responds if its not prepared to handle the differences. Also Linux turns around much faster than the other drivers.
 
Hi Demian,

which one did you try? 20121206 or 20121207? Thanks for the insight. Unfortunately, I'm not quite sure how to use that information... What I'm trying to do right now is understand the logic in the feedback system. Patching on a simulator in Octave before translating the mods back to firmware C and executing it is a big boon.

Hopefully, I'll learn more about the structure of UAC2 as I go along.

Børge
 
audio_widget_20121004_AB-1.2.elf
UAC1:
Win7_64 Foobar
44.1 BAD
linux - alsa/pulseaudio
44.1 OK
UAC2:
Win7_64 Foobar
44.1 OK
96 OK
192 OK
linux - alsa/pulseaudio
44.1 OK
96 OK
192 BAD
awx_20121206.elf
UAC1:
Win7_64 Foobar

44.1 BAD
linux - alsa/pulseaudio
44.1 OK
UAC2:
Win7_64 Foobar
44.1 OK
96 OK
192 OK
linux - alsa/pulseaudio
44.1 OK
96 OK
192 BAD

Code:
watch -n 1 "cat /proc/asound/card1/stream0"
UAC2: 44.1 OK awx_20121206.elf 3.2.0-35-generic
Code:
Every 1,0s: cat /proc/asound/card1/stream0 
Fri Dec  7 22:48:03 2012
Audio-Widget QNKTC USB DAC AB-1.2 at usb-0000:00:12.2-1, high speed : USB Audio
Playback:
  Status: Running
    Interface = 2
    Altset = 1
    URBs = 7 [ 7 8 8 7 8 8 8 ]
    Packet Size = 392
    Momentary freq = 44073 Hz (0x5.8253)
    Feedback Format = 15.17
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 2 OUT (ASYNC)
    Rates: 44100, 88200, 132300, 176400, 48000, 96000, 144000, 192000
    Data packet interval: 250 us
UAC2: 96 OK awx_20121206.elf 3.2.0-35-generic
Code:
Every 1,0s: cat /proc/asound/card1/stream0
Fri Dec  7 22:52:51 2012
Audio-Widget QNKTC USB DAC AB-1.2 at usb-0000:00:12.2-1, high speed : USB Audio
Playback:
  Status: Running
    Interface = 2
    Altset = 1
    URBs = 4 [ 6 6 6 7 ]
    Packet Size = 392
    Momentary freq = 96059 Hz (0xc.01e0)
    Feedback Format = 15.17
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 2 OUT (ASYNC)
    Rates: 44100, 88200, 132300, 176400, 48000, 96000, 144000, 192000
    Data packet interval: 250 us
UAC2: 192 BAD awx_20121206.elf 3.2.0-35-generic
Code:
Every 1,0s: cat /proc/asound/card1/stream0
Fri Dec  7 22:51:31 2012
Audio-Widget QNKTC USB DAC AB-1.2 at usb-0000:00:12.2-1, high speed : USB Audio
Playback:
  Status: Running
    Interface = 2
    Altset = 1
    URBs = 2 [ 6 7 ]
    Packet Size = 392
    Momentary freq = 191938 Hz (0x17.fe00)
    Feedback Format = 15.17
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 2 OUT (ASYNC)
    Rates: 44100, 88200, 132300, 176400, 48000, 96000, 144000, 192000
    Data packet interval: 250 us
 
Member
Joined 2004
Paid Member
Hi Demian,

which one did you try? 20121206 or 20121207? Thanks for the insight. Unfortunately, I'm not quite sure how to use that information... What I'm trying to do right now is understand the logic in the feedback system. Patching on a simulator in Octave before translating the mods back to firmware C and executing it is a big boon.

Hopefully, I'll learn more about the structure of UAC2 as I go along.

Børge

I was using 20121206. Should I try 20121207? It wasn't there when I downloaded the file.

A simulator is a great idea. Save a lot of time.
The USB spec is huge. I understand you would start with chapter 9 of the UAC part.
 
To debug on the Mac, please use the avx_20121207 and '06 .elf files. A while ago Alex, Demian & Co. did a great job in tracking down a feedback bug on Linux. My suspicion is that this fix for Linux may have had an adverse effect on Mac.

To test for this, please do as follows: Use Mac and UAC2. Try to change sampling frequencies back and forth. (The Linux instability was observed for changes from 44.1 to 88.2 or 96ksps.) Firmware '06 does have the Linux fix in while '07 has the Linux fix commented out.

If you observe something strange on one firmware version, try to replicate it systematically on that version and then see if you can observe the same pattern with the other version.

If '06 and '07 behave differently on UAC2/Mac at 88.2 and 96, there may be a connection.

Børge