Open-source USB interface: Audio Widget - Page 111 - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 12th February 2012, 09:37 AM   #1101
rsdio is offline rsdio  United States
diyAudio Member
 
Join Date: Feb 2008
Location: Seattle
Quote:
Originally Posted by alexlee188 View Post
What may not be apparent to many people is that there are ambiguities in the UAC2 specs. Different OS driver implementations then can interprete the uac2 specs differently, leading to minor incompatibilities. The rate feedback format is one of these ambiquities. So OSX is not out of specs. So Linux uac2 driver is not out of specs. But they are different !!!
Hi Alex,

I do not wish to dilute this thread, but if you have any links to details about the ambiguities in the UAC2 specifications, then please share.

I am well aware that Microsoft's lack of a complete USB-MIDI implementation on any of their operating systems dooms all viable hardware from fully implementing the specification, simply because a full implementation results in a device that will bomb under Windows. I am also aware that even in an ideal world where Windows did not ignore a complete implementation, there is still the fact that the USB-MIDI specification itself is sorely lacking in terms of accurate timing, and thus random latency plagues these devices.

In other words, I have no illusion that the UAC2 spec is perfect - I simply stated that I am not aware of any problems with the spec. Thus, I am very interested in learning more about the ambiguities that you allude to.

Thanks for any pointers.
  Reply With Quote
Old 12th February 2012, 10:52 AM   #1102
diyAudio Member
 
Join Date: Apr 2011
Hi rsdio,

OK. This is a very technical subject and is very confusing. But I will just give some pointers and you can do more research :-)

1. In UAC2 specs, page 40, section 3.16.2.2, it says the feedback format to " refer to Section 5.12.4.2, “Feedback” and Section 9.6.6, “Endpoint” in the USB Specification.

2. In the USB2.0 specs, page 73, section 5.12.4.2, it basically says the format should be:

10.14 for full-speed device and 16.16 for high speed device.

For full speed device, it should be per frame (ie 1 msec). For high speed device, it should be per uFrame (ie per 125us).

3. HOWEVER, there is no mention of what this per microframe is referring to. Is this the absolute per every 125us realtime clock time, or what happens everytime a USB ISO packet is sent from the device to the host. This IS the ambiguity.

4. This is because the device can specify whether it is sending data every microframe, or every other uFrame, of every 4th uFrame etc.

5. Now when folks tested the OSX driver for uac2, and also the Win driver under uac1 BUT at HIGH speed, it is found that these drivers treat the rate feedback format as 16.16 per uFrame of data sent. (ie NOT absolute 125uS time).

6. So for devices that send every 2 uFrame (such as the AW), the rate feedback format becomes the number of samples per 0.250 ms, or number of samples >> 2 every 1 ms.

7. With this rate feedback format and value, we found that OSX and Windows uac2 drivers (and also uac1 driver running at HIGH speed) are all happy.

8. However, Linux implemented a 12.13 format in the old days (before kernel 2.6.37) and since then, an automatic rate format detection algorithm was implemented which will automatically adjust the feedback format recognized by comparing the norminal sampling rate with the feedback rate. If it is off by -25% or +50%, it is assumed to be a wrong frmat and the bits are shifted left or right a number of times to find a match.

9. This has worked well for the AW with the standard code that works under OSX and Wndows.

10. However, when folks like Demian started stress testing Linux and mpd, with playback of mixed sampling rate tracks in the same album, it revealed possible problems. We are still investigating the root cause of the problems, but it looks like this at the moment:

(a) When playing music at say 44.1khz, the nominal freq is 44.1khz and the rate feedback is within -25% and +50% of nominal freq. So all is well;

(b) Now under Linux, mpd and alsa uac2 driver, when suddenly the track goes from 44.1khz to 96khz (say), the nominal freq somehow is not changed, and the rate feedback changes to around 96khz. The alsa uac2 driver then assumes that the feedback format has changed (which has not) and you can see that it will cause severe problems.

(c) This does not occur under Windows or OSX as the rate feedback format is deemed to be fixed. Also , under Windows or OSX, with the music player software that we have tested, when a track is changed to the next one, and if the sampling rate has changed, the software and driver will change the norminal freq accordingly. So there is no problem.

(d) Playback software may not be "well behaved" and it can give problems to the uac2 driver. For example, changing tracks (with different sample rates) without informing the driver to issue the correct uac2 change sampling rate commands, or stopping playback stream suddenly without informing the driver to issue USB commands to change the ISOCHRONOUS alternate back to 0 to conserve USB bandwidth etc. How the uac2 driver should respond (eg, should there be a time out when no more data comes through from the player software so that the ISO pipe can be shut down? ).

Alex
  Reply With Quote
Old 12th February 2012, 10:04 PM   #1103
diyAudio Member
 
oneoclock's Avatar
 
Join Date: Oct 2010
Quote:
Originally Posted by borges View Post
Here is a draft sch and layout for the regulator ...
Excellent work.
What size board have?
  Reply With Quote
Old 12th February 2012, 10:27 PM   #1104
diyAudio Member
 
oneoclock's Avatar
 
Join Date: Oct 2010
Quote:
Originally Posted by alexlee188 View Post
This is a very technical subject and is very confusing. But I will just give some pointers and you can do more research :-)Alex
Master class. It is difficult to understand completely, but gives a good idea of how USB post data in Windows, Linux and OSX.
  Reply With Quote
Old 13th February 2012, 12:26 AM   #1105
rsdio is offline rsdio  United States
diyAudio Member
 
Join Date: Feb 2008
Location: Seattle
Quote:
Originally Posted by alexlee188 View Post
1..10,(a..d)
Thanks.
  Reply With Quote
Old 13th February 2012, 12:38 PM   #1106
borges is offline borges  Norway
diyAudio Member
 
Join Date: Dec 2003
Location: Oslo, Norway
Default AB-1.12 proto updates

Quote:
Originally Posted by oneoclock View Post
Excellent work.
What size board have?
Here's a little update I prepared on the plane last night. The answer to your question is at the very bottom...

Work on the AB-1.12 prototype board is progressing. I have noted your consern about regulator heat dissipation.

Recently I have added a CS8406 SPDIF transmitter. Please see the attached schematic and let me know if you have any opinions. Both sch and layout are mostly done. The transmitter runs from the same ADP151 LDO as the DAC usually gets its power from. The reason simply being that the DAC is likely to be of less importance with SPDIF output. The keen eye will discover an SPDIF output pin on the module interface. Take no alarm, this is merely for reserving a pin for such a signal should it occur later. (The CS8406 can act as a "smart" transmitter with I2S in, or as a driver only, in which case a CMOS buffer can probably do the same job.)

Also, I have set it up in Software mode with I2C. That means a bit of MCU programming is needed in order to make it work. There are also GPIO pins for a few controls which we will probably not need anyway. One of them is a (probably never used) interrupt generated at the CS8406. I have not yet checked if this maps to an interrupt on the MCU. A word of warning:
I will probably not have the time to do the programming job myself. Actually, I don't even own equipment with SPDIF in. (Although I do consider a Juli@ card.) So if you're keen on SPDIF output feel free to read up on the CS8406 and I2C for the AVR32.

The SPDIF header will be placed on the front, opposite the logo from the LED. At the moment I'm only reserving footprint space for an SPDIF output. But both differential AES/EBU and TOSLINK should be easy to patch in.


Cheers,
BÝrge

P.S. Like stated before, the AB-1.12 will be a naked board the size of the bottom board in the AB-1.1 kit. It will ship with two loose Golledge XOs and new front/back plates. You will need the box and module from an existing AB-1.1 for it to work. (There is no reason to postpone that AB-1.1 purchase until the availability of the AB-1.12 board :-) It will feature an PCM5102 main DAC, SPDIF output, 3 free-floating Demian/Oneoclock regulators, and finally 2 free-floating ES9012/8 footprints for which you are on your own and must provide own power, IVC etc.
Attached Files
File Type: pdf AB-1.12_20120212_pC03_Sch.pdf (179.7 KB, 124 views)

Last edited by borges; 13th February 2012 at 12:41 PM.
  Reply With Quote
Old 13th February 2012, 03:03 PM   #1107
diyAudio Member
 
linuxworks's Avatar
 
Join Date: Jul 2008
Location: santa clara, CA
why the cs8406? why not the wolfson 8804, which I think is a better grade part.
__________________
My Photostream:http://www.flickr.com/photos/linux-works/
  Reply With Quote
Old 13th February 2012, 10:25 PM   #1108
diyAudio Member
 
Onvinyl's Avatar
 
Join Date: Aug 2002
Location: Germany
Hi,
a beaglebone would probably make a nice companion for the widget, especially with a serious distro aboard...

RŁdiger
__________________
"I can feel what's going on inside a piece of electronic equipment. I have a sense that I know what's going on inside the transistors." Robert Moog
  Reply With Quote
Old 14th February 2012, 12:17 AM   #1109
1audio is online now 1audio  United States
diyAudio Member
 
Join Date: Mar 2004
Location: SF Bay Area
Blog Entries: 3
I had a quick meeting with the AKM guys today. I was not asking but they suggested two digital transmitters, the AK4103 and the AK4104. The AK4103 has an on-board driver that can drive SPDIF/AES transformers directly. The AK4104 has a digital output and needs a driver or Toslink output only.

For the output function there should be very little difference if any between all the parts available since its a very well defined function and all digital. Setting all the special header bits is possible with the AKM parts in either static or programmed modes. Although it seems no one uses the sample rate info encoded in the header, probably because its often wrong.

If you want to be obsessive you could use the 4104 with a clocked latch on the output to resync to the clock edges removing any internal prop delays. I can think of much better ways to burn through time.
__________________
Demian Martin
Product Design Services
  Reply With Quote
Old 14th February 2012, 12:48 AM   #1110
diyAudio Member
 
linuxworks's Avatar
 
Join Date: Jul 2008
Location: santa clara, CA
are the AKM chips 'buyable' via the usual single-unit qty sellers? I don't think I've run across them on mouser, etc.
__________________
My Photostream:http://www.flickr.com/photos/linux-works/
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Async 192Khz USB - the SDR-Widget collaborative project SunRa PC Based 5 26th April 2011 07:38 PM
usb audio interface david12 Equipment & Tools 14 10th October 2010 03:58 AM
Cheap Audio Interface (USB?) to PC agm2003 Instruments and Amps 11 16th September 2007 08:48 AM
Open call for suggestions on Open Source DIY Audio Design gfergy Everything Else 1 15th April 2007 08:33 AM
USB Interface Perfect?- Computer Audio fmak Digital Source 3 4th December 2004 11:24 PM


New To Site? Need Help?

All times are GMT. The time now is 04:00 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2