Audio success!

27 views
Skip to first unread message

Børge Strand-Bergesen

unread,
Feb 8, 2011, 11:34:19 AM2/8/11
to audio-...@googlegroups.com
Alex you made my day!

Thanks to some intensive debugging across 7+ time zones I now have PLAYING AUDIO on my DIb hardware. This is essentially the USB-I2S module initially made for my existing DAC's connectors.

The DAC chip I got from John is gently dead-bugged into place. The honor went to A-Ha's Take on Me. The source is CD on PC, played back on 48ksps skip/insert with a special version of the v087_b firmware (2100_alex3). With 0603 16V 1µF caps, the PC doing the upsampling and a fascinating set of loose cables, I won't bother with too much sonic analysis. But there's nothing obvious wrong with it!

I'm glad we went through these steps before ordering the USB-I2S module (and AB-1) because it showed one important clock net being left out on DIb and the module. I have now fixed those two layouts.

The next stage for me now is to send a setup to Alex so that he can start playing with 44.1/88.2 ahead of module and AB-1 arrival. Alex, please PM me your details. The 11.2896 XP to be fitted to DIb supposedly won't do 176.4 on the ES9022.

Now that CNY celebrations are coming to an end, I hope to get quotes on initial module and AB-1 production. The changes I have done since then shouldn't change the price.


Cheers,
Børge

photo.jpg

jkenny

unread,
Feb 8, 2011, 11:55:22 AM2/8/11
to audio-...@googlegroups.com
Great progress, Borge,
Have you thought of using 22.xxxx & 24.xxxxMHz clocks & a flip-flop divider to send 11.xxx & 12.xxxxMHz to the USB-I2S device?

Børge Strand-Bergesen

unread,
Feb 8, 2011, 12:10:32 PM2/8/11
to audio-...@googlegroups.com
Hi John,

I'll probably save that approach for AB-1. I could do it on my current platform, and it would enable 176.4. But 44.1 is the first to shoot for. The 22's and 24's we have been lookng at have better specs than the XOs I patched in for now. But this is a functional prototype, not a Hi-End prototype, although I won't be disappointed if it plays well :-)

Børge

Alex Lee

unread,
Feb 8, 2011, 5:26:19 PM2/8/11
to audio-...@googlegroups.com
My shipping address:

98 Coronation Road
Singapore 269494

Phone:+65-98368954

Congrats !!!

Alex

Sent from my iPhone

> <photo.jpg>

Alex Lee

unread,
Feb 8, 2011, 9:03:27 PM2/8/11
to Audio-Widget
Hi Borge et al,

As we previously discussed, I'll concentrate on UAC2. When your
patched Dib board arrives, I will work on a UAC2 firmware for the
board, to get 44.1 --> 192 working.

With the current working UAC1 firmware as a base, you can try various
things, eg:

(1) 44.1khz - it will be useful to drive your present FPGA-DAC. Then
you can compare your DAC against ES9022;

(2) UAC1 Async Out with rate feedback under Windows.

You can reference the UAC1_osx, or UAC1_v100 firmware to see how async
out is done. I have been told the Windows rate feedback format is
10.14. (In OSX and Linux versions, I have been using 16.16 and
12.13.)

If you can get rate feedback working, it will be much easier to do
44.1khz. This is because you don't have to specify the USB data
transfer rate up front. You just receive whatever the PC sends to put
in the playback buffer, and you change the feedback rate to keep the
buffer half full. The buffer out rate is controlled by the n x
44.1khz XO so it will be very accurate.

Alex

Børge Strand-Bergesen

unread,
Feb 9, 2011, 7:33:28 AM2/9/11
to audio-...@googlegroups.com
Hi Alex,

What you say matches my ambitions very well! A skip/insert UAC1 at 44.1 would be great for my existing hardware, and I believe it is also the lowest hanging fruit. But I'll need async for proper audio testing. Hopefully, that will work on Windows. But for test purposes I'm planning to set up a Linux box anyway.

Could you please let me know which source files handle the skip/insert i v087 and async in the other examples? It'll help to look at the specifics as I'm reading up on USB, FreeRTOS, AVR32 capabilities and then some :-)

Ideally, firmware written for async on Windows/UAC1 should play on other host OSes as well. And even more ideally, UAC2 drivers for Windows should magically appear. I imagine a flip-switch (or Flash bit) which puts the firmware in either general UAC2 mode or async UAC1 limited to 44.1.


Cheers,
Børge

Alex Lee

unread,
Feb 9, 2011, 8:39:52 AM2/9/11
to Audio-Widget
Hi Borge,

To move from sync to async, you have to modify a number of files:

usb_descriptors(h/c) - basically to change the playback EP to Async
out attribute, and to add a feedback EP
usb_specific_request.c - to initialize the feedback EP
usb_audio_task(h/c) - to change the playback EP stuffing from fixed
rate to variable rate and to provide the feedback

Right now UAC1 codes have one fixed sampling rate, ie 48khz. It will
be easier to just change that to 44.1khz.

If you want to have multiple sample rates (like in the UAC2 code),
then you will have to make some more changes in the descriptors,
alternate setting processing, etc, and more files are involved: eg:

usb_standard_request.c
taskAK5394A.c

The specification and selection of sampling rate clocks are VERY
different between UAC1 and UAC2.

So my suggestion is to get the single rate 44.1khz working first.

Since you are going have a Linux box, you might like to look at
demo_UAC1_v104, which has async out implemented for Linux. It will
not work out-of-the-box as it has the AK5394A and Mobo codes. It has
Audio as well as HID. However, it will be easy for you to study that
to see what mods are needed to get from sync to async out.

You will definitely want to change the rate feedback format to 10.14
for Windows (whether FULL speed or HIGH speed). I suspect that the
12.13 used for Linux is the cause of BSOD in Windows.

Alex

Børge Strand-Bergesen

unread,
Feb 9, 2011, 2:48:40 PM2/9/11
to audio-...@googlegroups.com
Hi Alex,

thanks for the overview! It'll be a while until I'm done with this homework :-)

UAC1 may as well be fixed. It's only 44.1 and 48 that are within reach with today's MCU anyway, so locking it at 44.1 (where most of the content is) makes sense. I was hoping that one feedback scheme would work across platforms on UAC1. I'll try to figure these things out.

In the meantime I'm looking at how to manufacture the module and AB-1. With my DIb functional I'm getting more confident about AB-1 and the module.


Børge

Børge Strand-Bergesen

unread,
Feb 10, 2011, 12:16:32 PM2/10/11
to audio-...@googlegroups.com
Hi Alex,

i'm getting your kit ready. Anything I should know about for customs,
stated value etc? Do you have acces to basic soldering tools?

Børge

Børge Strand-Bergesen

unread,
Feb 10, 2011, 4:17:52 PM2/10/11
to audio-...@googlegroups.com
Hi Alex,

I saw your posts on the ALSA forum and learned much more about feedback. I'm trying to understand the feedback mechanisms correctly.

From the UAC1 (Section 3.7.2.2) and USB1 (Section 5.10.4.2) specifications it seems the async feedback format 10.14 is a feature of UAC1, not of Windows. Is this your understanding, too? Am I right to assume that OS X and Linux implementations uf UAC1 must also use 10.14?

Then, in UAC2 (Section 3.16.2.2) and USB2 (Section 5.12.4.2) it looks like 10.10 or 10.14 is a feature of full-speed interfaces whereas 12.13 or 16.16 is a feature of hi-speed interfaces.

What this is telling me is that the specified feedback format depends on audio class and interface type, not on OS.

Will your firmware only enumerate on a hi-speed interface, or on full-speed as well?


By the way I have changed the USB headers and XO settings for 44.1 in the latest code you sent me. It's getting late here now, and I'm eager to try it out during my lunch break tomorrow.

Cheers,
Børge



On Wed, Feb 9, 2011 at 03:03, Alex Lee <alexl...@gmail.com> wrote:

Alex Lee

unread,
Feb 10, 2011, 6:18:05 PM2/10/11
to audio-...@googlegroups.com
Best to declare as amateur radio parts, gift valued $10. No problems with customs here so far :-)

I have a fine tipped Hakko soldering iron and a $20 embossing hot air gun so can rework smt's .

Alex

Sent from my iPhone

Alex Lee

unread,
Feb 10, 2011, 6:33:55 PM2/10/11
to audio-...@googlegroups.com
Hi Borge,

I have not tried running the firmware in FS.  It is possible theoretically as the code is designed to fall back to full speed if HS is not available.  May work for UAC1.  Will not work for UAC2.

The problem with the rate feedback format is that under UAC1, fomat us 10.14.  Under USB2 (ie HS), it is 16.16.  Now if u run UAC1 at USB2, what is the format ?  Another issue is that the rate can be specified in samples per ms, or samples per frame/microframe.

As it is not clear,  different OS has different interpretation.  Linux 2.6.25 uses 12.13.  OSX understands both 10.14 and 16.16.

Linux 2.6.37 or later understands all formats.

Alex


Sent from my iPhone

Børge Strand-Bergesen

unread,
Feb 11, 2011, 1:45:28 PM2/11/11
to audio-...@googlegroups.com
Hi Alex,

Here's some tracking information for you:
http://sporing.posten.no/sporing.html?q=CD482141241NO&lang=en

Enjoy Japan!

Børge

Børge Strand-Bergesen

unread,
Feb 14, 2011, 12:00:06 PM2/14/11
to audio-...@googlegroups.com
Whey, 2nd DIb board playing audio at 44.1. This has to be more than a coincidence :-)

Next on my agenda is to move code out of the 104 tree and into the modified 087 tree which the board currently runs on. With a little luck that will hopefully result in async 44.1 on UAC1.

Alex, when you are back from Japan we'll hopefully be able to debug on identical DIb hardware. But that is only until the arrival of the module and AB-1. Quotes are starting to arrive. With DIb (the mother of the module) playing with a patched-in ES9022 I'm getting more and more positive that the module and AB-1 will actually play too.

Fruits of labor to be enjoyed while reading up on USB!


Cheers,
Børge

Alex Lee

unread,
Feb 14, 2011, 5:58:08 PM2/14/11
to Audio-Widget

HI Borge,

Excellent. Hope we can get UAC1 async 44.1/48 and UAC2 async 44.1-192
working on the Dib-ES9022 soon :-)

I agree that with the experience with Dib-ES9022, we can be confident
of the AB-1 working. You can play safe and have a small run of AB-1
for a few developers, or you can make an announcement at diyaudio to
have a large BETA.

Alex

On 2月15日, 午前1:00, Børge Strand-Bergesen <borge.str...@gmail.com>
wrote:

Børge Strand-Bergesen

unread,
Feb 15, 2011, 3:53:32 AM2/15/11
to audio-...@googlegroups.com
Hi Alex,

that would be nice! There are a few differences between DIb and module+AB-1. They are not very critical:

1) module+AB-1 will have a VBUS power enable pin to support suspend. It basically needs to be set to 1 in order to power the DAC and clocks. DIb doesn't have this pin.

2) DIb has a functional RS232 (works on your board, untested on mine). The module has IO for UART. I'll add an RS232 amp and connector on AB-1 but probably not populate the parts. The same may go for a display header. These two debug fuctions will probably not be power-gated by the VBUS power enable pin.

3) DIb receives its MCLK from the PLL in an off-board FPGA. So it has no clock selection. On your board I have patched in one 12.288MHz XO and one at 11.2896. The latter is connected to the MCLK net, and to switch to the former you'll have to bring out the soldering iron. Both XOs have an active-high enable pin with a week pull-up. These pins are not connected. It should be fairly easy to add 1k pull-downs and separate GPIO lines to turn them on one at a time. That way their outputs can be shorted to the MCLK net with small resistors. The module will support both this mechanism and a discrete Maxim MUX circuit.

But aside from testing the effects of XO swaps in SW, DIb should enable full debug of 44.1, 48, 88.2 and 96. We'll have to see how the DAC responds to 176.4 and 192, something it supposedly won't do on 11.2896 and 12.288MHz MCLK, respectively. But on AB-1 we will use twice the MCLK frequency and halve it before it enters the module.

At low volumes the NRE dominates over parts and labor. What I'm currently planning is to order maybe 10 module+AB-1 kits for early adopters, and hope that there are only major changes (not necessitating another full NRE) to make it work well. And then, with the protocols you outline working, I wish to go public with it. As it is now, the rarer parts (XOs and DACs) will not be mounted by the manufacturers, but after initial prototyping they will.

Cheers,
Børge

Alex Lee

unread,
Feb 24, 2011, 11:21:21 PM2/24/11
to Audio-Widget
Hi Borge,

The post office informed me yout package has arrived. I will collect
it on Monday.

Please email me any latest firmware project files u have developed for
the Dib board, especially fir 44.1 and maybe async out UAC1 for win ?

Alex


On Feb 15, 4:53 pm, Børge Strand-Bergesen <borge.str...@gmail.com>
wrote:

Børge Strand-Bergesen

unread,
Feb 25, 2011, 4:32:47 AM2/25/11
to audio-...@googlegroups.com
Hi Alex,

software progress on my side has been slow. Instead I was able to
place the order for the module and AB-1. I also built another copy of
the board I sent you so that we can debug on idential hardware.

The board I sent you runs the attached code with one minor change. On
my board of the same type I have also installed the I2S MUX which
requires PX52 to be cleared. This is in the attached source but wasn't
there in the build your board is flashed with. On your board it makes
absolutely no difference.

Let me know if the zip file works. I did a project clean before I
zipped it down.

Børge

demo_UAC1_v087_b_WinXP_DIb_2102.zip
Reply all
Reply to author
Forward
0 new messages