Open-source USB interface: Audio Widget

Sounds interesting! But it was mainly to illustrate that NOS and 0th order CIC have mathematical similarities. For a DAC to be _easy_ to patch in it should accept standard I2S, 22/24MHz MCLK and a single <5V supply. If you have one of those it should be quite doable to patch it in on the AB-1.12 prototype board.

Børge

The problem is separating the data into 2 channels.
 
speaking of dollar-dacs, was the WM8524 ever considered?

Not by me anyway. Now sticking my cheek out - I just want USB - IS2 from the audio-widget, Börge has one, will George follow?

Börge - your pins seems to be fixed to fit whatever board the designer makes - he/she just have to comply to our design. I don't really like fixed stuff decided by someone else. Others do, so you have a market.

So, what do we have... George?

Brgds
 
Member
Joined 2004
Paid Member
It is easy to design an input sequence which gives a worst-case FIR output. But the good news is that the worst-case output is limited for any given FIR filter.

If designers claim that the worst-case input needed is somewhat esoteric, they are correct. But the least thing they should do is make sure that the FIR output is clipped. In the ES9023 the FIR output doesn't clip, it overflows! As in 0x7F+0x01=0x80 (full positive + 1 = full negative).

Cheers,
Børge

Borge:
It looks like your on. Can you create the particular sequence to get the overflow condition as a test signal? And, of course, something that could have originated as music, not some impossible for the real world signal. I have tried even FS square waves on the 9023 and not seen real nasty's.

There are other limitations for the 9023. Its distortion meets spec, just. And there are higher order artifacts in the output.
 
AK4430 and you have already implemented it.
A better DAC will require a lot more stuff and it won't be a lot better.

Thanks for your opinion Demian. My main line of thought is to combine that DAC with your LDO suggestion. Looking forward to powering up such a solution on the AB-1.13 board.

speaking of dollar-dacs, was the WM8524 ever considered?

Looks interesting. Anybody here familiar with it?

So the list of "buck-DACs" now include WM8524, ES9023, PCM5102, AK4430.

Børge
 
Fail to make dfu-programmer

Hey guys, I just dusted of my widget after a year in hiatus and thought I better upgrade the firmware. Trouble is I can't seem to make the custom dfu-programmer frmo the download section. Below is the output of configure and make:


Code:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBUSB_1_0... yes
checking for ANSI C header files... no
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking stdlib.h usability... yes
checking stdlib.h presence... no
configure: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: stdlib.h: proceeding with the compiler's result
checking for stdlib.h... yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
configure: creating ./config.status
config.status: creating fedora/dfu-programmer.spec
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

Code:
make  all-recursive
make[1]: Entering directory `/home/anders/Temp/Audio widget/dfu-programmer-0.5.4'
Making all in src
make[2]: Entering directory `/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src'
gcc -DHAVE_CONFIG_H -I. -I..    -Wall -g -O2 -I/usr/include/libusb-1.0   -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -I..    -Wall -g -O2 -I/usr/include/libusb-1.0   -MT arguments.o -MD -MP -MF .deps/arguments.Tpo -c -o arguments.o arguments.c
mv -f .deps/arguments.Tpo .deps/arguments.Po
gcc -DHAVE_CONFIG_H -I. -I..    -Wall -g -O2 -I/usr/include/libusb-1.0   -MT atmel.o -MD -MP -MF .deps/atmel.Tpo -c -o atmel.o atmel.c
mv -f .deps/atmel.Tpo .deps/atmel.Po
gcc -DHAVE_CONFIG_H -I. -I..    -Wall -g -O2 -I/usr/include/libusb-1.0   -MT commands.o -MD -MP -MF .deps/commands.Tpo -c -o commands.o commands.c
commands.c: In function ‘execute_flash_eeprom’:
commands.c:73:18: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
commands.c: In function ‘execute_flash_user_page’:
commands.c:157:18: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
commands.c: In function ‘execute_dump_normal’:
commands.c:525:18: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
commands.c:536:18: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
commands.c: In function ‘execute_dump_eeprom’:
commands.c:572:18: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
commands.c:583:18: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
commands.c: In function ‘execute_dump_user_page’:
commands.c:612:18: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
commands.c:623:18: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
mv -f .deps/commands.Tpo .deps/commands.Po
gcc -DHAVE_CONFIG_H -I. -I..    -Wall -g -O2 -I/usr/include/libusb-1.0   -MT dfu.o -MD -MP -MF .deps/dfu.Tpo -c -o dfu.o dfu.c
mv -f .deps/dfu.Tpo .deps/dfu.Po
gcc -DHAVE_CONFIG_H -I. -I..    -Wall -g -O2 -I/usr/include/libusb-1.0   -MT intel_hex.o -MD -MP -MF .deps/intel_hex.Tpo -c -o intel_hex.o intel_hex.c
mv -f .deps/intel_hex.Tpo .deps/intel_hex.Po
gcc -DHAVE_CONFIG_H -I. -I..    -Wall -g -O2 -I/usr/include/libusb-1.0   -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -Wall -g -O2 -I/usr/include/libusb-1.0    -lusb-1.0   -o dfu-programmer main.o arguments.o atmel.o commands.o dfu.o intel_hex.o util.o  
main.o: In function `main':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/main.c:58: undefined reference to `libusb_init'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/main.c:108: undefined reference to `libusb_release_interface'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/main.c:121: undefined reference to `libusb_close'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/main.c:131: undefined reference to `libusb_exit'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/main.c:79: undefined reference to `libusb_set_debug'
dfu.o: In function `dfu_transfer_out':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:836: undefined reference to `libusb_control_transfer'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:836: undefined reference to `libusb_control_transfer'
dfu.o: In function `dfu_transfer_in':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:863: undefined reference to `libusb_control_transfer'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:863: undefined reference to `libusb_control_transfer'
dfu.o: In function `dfu_transfer_out':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:836: undefined reference to `libusb_control_transfer'
dfu.o:/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:863: more undefined references to `libusb_control_transfer' follow
dfu.o: In function `dfu_device_init':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:388: undefined reference to `libusb_get_device_list'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:394: undefined reference to `libusb_get_device_descriptor'
dfu.o: In function `dfu_find_interface':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:677: undefined reference to `libusb_get_config_descriptor'
dfu.o: In function `dfu_device_init':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:415: undefined reference to `libusb_open'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:417: undefined reference to `libusb_set_configuration'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:445: undefined reference to `libusb_close'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:451: undefined reference to `libusb_free_device_list'
dfu.o: In function `dfu_find_interface':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:716: undefined reference to `libusb_free_config_descriptor'
dfu.o: In function `dfu_device_init':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:419: undefined reference to `libusb_claim_interface'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:436: undefined reference to `libusb_release_interface'
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:426: undefined reference to `libusb_free_device_list'
dfu.o: In function `dfu_make_idle':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:814: undefined reference to `libusb_reset_device'
dfu.o: In function `dfu_device_init':
/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src/dfu.c:431: undefined reference to `libusb_free_device_list'
collect2: ld returned 1 exit status
make[2]: *** [dfu-programmer] Error 1
make[2]: Leaving directory `/home/anders/Temp/Audio widget/dfu-programmer-0.5.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/anders/Temp/Audio widget/dfu-programmer-0.5.4'
make: *** [all] Error 2

I have made sure that I have libusb-1.0-0-dev installed (also tried with libusb-dev). The configure script seems to identify libusb1 and the header file is there in /usr/include and it contains the functions referenced, but make still reports them as undefined.

I'm running ubuntu 11.10. Nothing special otherwise. Any ideas?
 
My last fw build was in Cygwin. It looks pretty stable to me.

For Windows you'll need cygwin with make and git, AVR32Studio 2.7, Atmel Flip with 64-bit extension package, batch files which I uploaded a while ago to the SDR-Widget downloads section.

I'll be travelling for a few days, so the finer points of build process details will have to wait a bit. But the SDR-Widget wiki should still teach you what you need. I just updated the section on git.

Børge
 
Updated audio-widget firmware

The firmware is updated in firmware branch audio-widget.

You may download the firmware (audio-widget-20120427) here:
Downloads - sdr-widget - Audio and Control Interface for Amateur Radio SDR and Audiophile USB-DAC - Google Project Hosting

And Nikolay's Windows utilities (AWsetup.exe) here:
https://sites.google.com/site/nikkov/home/microcontrollers/audio-widget/

Check out the source code from git if you need the .py or .c implementations of widget control. See:
gitRepository - sdr-widget - git Repository - Audio and Control Interface for Amateur Radio SDR and Audiophile USB-DAC - Google Project Hosting

Please test them out and report any errors. I've been running the same code on the AB-1.1 for some time now.

Cheers,
Børge
 
The firmware is updated in firmware branch audio-widget.

You may download the firmware (audio-widget-20120427) here:
installed on my AB1.1. Seems to work fine on Linux (debian Wheezy, kernel 3.2). Have yet to try on windoze.

I've also downloaded WidgetControl.py from experimental git branch. Seems to work fine too.

About windoze driver: would it be possible to make AWsetup.exe to work without manual intervention also on XP?
 
Could you try to rerun the test cases which needed the _LINUX_QUIRK?
what was it? playlist with mixed sample-rate files?

Does it work OK on Linux in UAC1 mode?
yes.

BTW: upon plugin or reset I get these messages:
Code:
Apr 28 19:23:33 spmc kernel: [66580.580014] usb 4-2: new full-speed USB device number 12 using uhci_hcd
Apr 28 19:23:33 spmc kernel: [66580.758031] usb 4-2: New USB device found, idVendor=16c0, idProduct=03e9
Apr 28 19:23:33 spmc kernel: [66580.758035] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 28 19:23:33 spmc kernel: [66580.758037] usb 4-2: Product: DG8SAQ-I2C
Apr 28 19:23:33 spmc kernel: [66580.758039] usb 4-2: Manufacturer: www.obdev.at
Apr 28 19:23:33 spmc kernel: [66580.758041] usb 4-2: SerialNumber: 1.0.0.0.0.0.A
Apr 28 19:23:33 spmc kernel: [66580.768299] generic-usb 0003:16C0:03E9.000C: hiddev0,hidraw2: USB HID v1.11 Device [www.obdev.at DG8SAQ-I2C] on usb-0000:00:1a.1-2/input1
Apr 28 19:23:33 spmc mtp-probe: checking bus 4, device 12: "/sys/devices/pci0000:00/0000:00:1a.1/usb4/4-2"
Apr 28 19:23:33 spmc mtp-probe: bus: 4, device: 12 was not an MTP device
Long ago I had manually included some udev rules (IIRC it was to allow firmware programming). Have some ID changed or...?
 
Last edited: