Monday, February 24, 2014

USB Audio Class 2.0, Windows and Computer HiFi

One of the reasons we never completed a commercial product was because we didn't have a very good interface between our hardware and the software player. I'm going to explain this in really simple terms, because I don't really want to get into all the technical details.

A device driver, in this case an audio driver, is the software that controls the audio hardware attached to your computer. Our DAC/amp will not function without a driver. The prototype we built long ago, relied on a FireWire driver for operation, meaning our hardware connects to a PC using a FireWire connection. It has a "FireWorks" circuit board, designed by Echo Digital Audio, that supports 8 channels of audio at 24-bit and 192 KHz (the FireWorks can handle many more channels, but we only use 8). Echo uses this board in the AudioFire FireWire audio interfaces they sell to audio engineers. Recording studios use audio editing software like Avid's Pro Tools, Yamaha's Steinberg Cubase, Sony's Vegas/Sound Forge and Roland's Cakewalk Sonar with Echo's FireWire audio interface hardware to provide multiple connections for microphones and musical instruments to record and edit audio. Echo created custom drivers for working in Windows. The audio editing software usually works with Echo's ASIO drivers to get the best performance and Echo also provides a standard WDM (Windows Device Manager) driver so their hardware will also work as a basic soundcard in Windows.

Our product was designed for listening to stereo and multichannel surround sound (I've written several posts explaining how to rip and play multichannel surround audio from DVD-Audio, SACD and Blu-ray discs), not as a recording and mastering device for pro-audio. Unfortunately, Echo's FireWire WDM driver didn't work with popular Windows programs for playing surround, like Windows Media Player or Windows Media Center. If you configured your PC to use Echo's WDM driver, you would get 4 stereo channels instead of an 8-channel device. So we contracted with Echo to update their driver to support an 8-channel WDM device. For those of you using Echo's AudioFire devices with your PCs for listening to surround music or movies, you can thank us for paying for the development of the multichannel driver. Our contract didn't say anything about exclusive use, so now all of Echo's customers benefit from these updated multichannel drivers. You can now choose between stereo mode (which will provide the 4 stereo pairs) or multichannel mode (for an 8-channel setup). Now Windows Media Center can use any FireWorks based product as a multichannel device and you can listen to full surround when you watch TV or play movies and surround audio recordings.

If you were to purchase a device like ours, after connecting it to your PC (via FireWire), you'd have to install the custom driver before you could listen to surround recordings. It wouldn't be plug and play. And, if you get a new operating system, like Windows 8.1, you may need to download an update to remain compatible. So we'd have to continue paying Echo to make sure our device was supported in the case of bug fixes or updates for new operating systems. Also, back when we started this project, FireWire ports were included on most PC motherboards. That's not the case anymore, especially with the smaller form factor PCs that have great potential as HTPCs. Every PC and motherboard has multiple USB ports. So if we were to develop a commercial product, we'd switch to a USB interface and we wouldn't want to depend on a custom or proprietary driver that you'd need to install and keep up to date. Ideally, we'd want an audio device that'd work with drivers that are native to the operating system.

Here's the problem, at least for Windows (including Windows 7 and Windows 8/8.1). All popular operating systems (Windows, Mac OS X and Linux) support USB Audio Class 1.0 natively. Only Mac OS X and Linux support USB Audio Class 2.0 natively. We wanted to sell our product to Windows users because that's where the best apps are for playing high resolution, surround audio and video files. USB Audio Class 1.0 was the standard developed back in 1998 and because of its limited bandwidth only supports 2 channel audio. USB Audio Class 2.0, which became a standard in 2009, has plenty of bandwidth to support multichannel audio. Since Microsoft doesn't have a native USB Audio Class 2.0 driver for Windows, you'd need a proprietary 3rd party driver. We can't afford the licensing fees and we don't want our users to deal with the hassles of installing and maintaining drivers.

Microsoft's Frank Yerrace, who's part of the Windows sound team, asked the WDM driver development community (wdmaudiodev) several years ago why they would want USB Audio 2.0 in Windows. Many responded that they would like USB Audio 2.0 because of support for higher sample rates, bit depth and channel counts.

I agree with David Hoatson, an engineer from Lynx Studio Technology, a manufacturer of pro audio interfaces, who responded:
"now that there are more USB Audio 2.0 solutions coming to market, each company is having to develop its own driver and of course each will have varying degrees of success. Audio driver development is generally not the core competence for a chip-set company so they end up having a 3rd party company develop the driver. OEMs end up with the "not our fault" situation where the chip-set company blames the driver company and the driver company isn't being paid to fix bugs. The end result is products that don't work very well on Windows, but work better on OS X."
David went on to say that he thought the key issue is market acceptance:
"Microsoft never supported audio on FireWire in the OS, and I would say there are fewer FireWire audio devices on the market as a result. If Microsoft supports USB Audio 2.0 in Windows, I think you will see many USB Audio 2.0 devices hit the market." 
A later response from David spoke more to the marketing issues when he wrote:
"I understand the need to convince the upper-level management to get on-board with developing something new. Our VP of Marketing is famous for pushing his "Faster, Cheaper, Better" phrase. I think the phrase applies very well in this instance. Right now the choices for anything more than 16-bit/48kHz are VERY limited. This certainly limits the ability to create a product that will work well with Windows. USB Audio 2.0 does it faster and better, but at the moment it certainly isn't cheaper. If most of the responses were from the pro side, I think that is because we are the people that care about higher quality audio the most... and trickle down does work. Satisfy the top end client and the lower end will thrive filling the low-price-point void.  In other-words, if Microsoft makes the price of entry to the market less expensive to develop, you will see the consumer price-point fill with products.  ("If you build it, they will come"). Besides, do they really want Apple to beat them with USB Audio 2.0? :-)"
Bernt Ronningsbakk, with the Norwegian software company that develops 'Audiolense', responded to Frank Yerrace's post:
"Our customers are basically consumers who are conscious about sound quality. The standard USB implementation is not good for audio. The limitations are not simply about channel count, bit depth and driver problems. It is also about the protocol used to transmit the data. It is basically a S/PDIF-equivalent protocol where the clock on the transmitter (the computer) puts a signature on the sound. S/PDIF is an inferior protocol to begin with. Add to that some added challenges with USB and it stands out as the worst alternative. Some of the jitter out of the PC will manifest itself in the analog waveform regardless of how the receiver side works. A couple of consumer/prosumer manufacturers have developed USB interfaces with asynchronous audio transmission. I don't know the details, but I assume it is equivalent to block processing or callback based buffer filling where the clock in the DAC is the only one that matters. USB has the potential to provide bit perfect transmission. As it is today, a high quality non-USB sound card is required for top quality audio rendering. USB sound cards with multichannel/bit depth capability that reflects the new waveformextensible standards with regards to channel count and bit depth would be a huge selling point to the masses. Callback-based audio streaming would be an added bonus that would bring USB into the picture also amongst those who pay whatever it takes to get the best possible sound quality. Computer based hifi has so much going for it, and a good USB audio solution would lower the threshold of entry significantly."
Like I said, that discussion was several years ago. I think it was around the time Windows 7 was first released and I was very disappointed that Microsoft didn't include native support for USB Audio Class 2.0. We didn't hear anything back from Microsoft or Frank Yerrace. Well actually, Frank did respond to thank everyone for their feedback, but he didn't offer any words of encouragement that would indicate Microsoft was moving toward developing a USB Audio Class 2.0 driver. Following this discussion there were a few people speculating that Microsoft doesn't think there's enough demand to justify the investment needed to develop a driver. Perhaps they are right. I've read a few other forum threads on the same topic and I haven't come across any comments that sound promising. A person (Petter103) who supposedly has close ties to Microsoft offered:
"It would cost Microsoft $50K to have a third party develop this for them (OK let's quadruple that, it is still inexpensive and enabling for consumer scenarios). Until recently, however, Microsoft has not been all that concerned with consumers. It has always been much more important to add 1000 group policy objects per year ..." and, "I have had deep contacts with Microsoft on this very topic for about 8 years now - was pushing very hard for a number of years including walking into program managers and developers offices unannounced. The sad story is that their USB Audio developer who actually contributed to the UAC2 standard quit the company, no idea what is going on now other than hearing through the grapevine that no UAC2 support is forthcoming for Windows 8. My history with Microsoft on this suggests that this will not be a feature of Windows 8, so if it is of interest to you, get yourself a third party driver (not even sure how to do that as a consumer without also buying hardware) with the benefits and caveats that implies, or switch to a platform that offers it. It is sad that this is so, because lack of driver causes fragmentation of driver model (a big third party driver vendor makes the audio driver a non-audio device ....) which in the longer term causes more problems for consumers."
Now that Windows 8 has shipped with no USB Audio Class 2.0 driver, it looks like Petter103 was correct. However, Windows 8 hasn't been very successful and they've had to deal with lots of media reports about its supposed big failures. The market is different now. Not only are Macs more popular than a few years ago, but now Microsoft has to compete with iPads and Android tablets. Windows 8 was suppose to tie together the smartphone, tablet and PC platforms, which you'd think would help keep loyal customers from switching, but that doesn't seem to be working. Maybe Microsoft will pay more attention to their home consumers (not just their corporate customers) and offer better audio capabilities. I was pleasantly surprised to see a new post dated 2/13/2014 from Frank Yerrace on the wdmaudiodev listserv saying:
"I had asked this list several years ago about the level of interest in USB Audio 2 and reasons for the interest. I received some private responses as well as responses to this public list. Even though in-box support ultimately was not included in Windows 8, those responses were greatly appreciated and very helpful. As you can imagine, we are constantly evaluating where to invest for future versions of Windows. I assume the interest in in-box USB Audio 2 support is still quite high. If interest has further increased or perhaps decreased for any reason, please don't hesitate to speak out." 
First to respond was Kevin Halverson, CTO of High Resolution Technologies, LLC., a manufacturer of high quality DACs for consumers. Kevin wrote:
"USB Audio Class 2.0 support is important for a number of reasons. First, the ability to run High Speed USB is becoming a more important issue as the number of new platforms shipped with USB controllers and root hubs which properly support Full Speed USB devices properly diminishes on a nearly daily basis. Second, USB Audio Class 1.0 precludes higher sample rate, high channel count audio which for many companies like ours, means that we have to provide our own USB Audio Class 2.0 drivers. Third, the amount of maintenance necessary to keep custom drivers patched and working well across many different versions of Windows is a considerable challenge. The final point is, we constantly hear from customers that are looking to other host platforms running other operating systems just in order to get native USB Audio Class 2.0 support (and hence why we went to the time and expense of developing our own). While support of Audio Class 1.0 is important to support legacy hardware, it is fairly absurd that all these years later Microsoft still hasn't done what nearly every other operating system supplier has in terms of keeping current with audio requirements. Certainly if a small company such as ours can accomplish this, the task should be rather trivial for an industry powerhouse such as Microsoft."
Again, in this thread there are responses that, depending on your point of view, are pessimistic or realistic. Tim Roberts, a consultant with Providenza & Boekelheide, Inc. and Microsoft Partner, was quick to argue:
"There has to be a business case to justify the considerable development and testing expense. Standards are only interesting if they are used. If USB Audio 2 is a niche standard that is only interesting to a tiny fraction of the market (and the current evidence suggests that is the case), then it doesn't make sense to develop a class driver. To four decimal places, Audio Class 1.0 satisfies 100% of the Windows users in the world." 
To which Timothy Knudtson, a Software Engineer with iConnectivity, replied:
"Where does this number come from? In the audio industry things are moving towards using USB Audio 2.0. USB Audio 1 may work for 100% of the Windows users because for those users who want USB Audio 2.0 they are simply switching to Mac." 
Tim responded:
"The problem is sheer volume. There are a billion Windows machines in the world.  How many really need to use USB Audio 2 devices right now? Maybe 1,000? Maybe 10,000?  999,990,000 out of a billion is 100%, to four significant digits. That's the problem Microsoft faces. They need to make sure all of the corporate secretaries in the world can listen to Michael Bolton through iTunes. 16-channel 192 kHz audio is cool, but there just isn't widespread business demand for it yet."
Jerry Evans, who I believe is a developer with Instrumental Innovations, replied:
"Lack of standards compliance from Microsoft is a barrier for vendors and dissuades consumers from purchasing ‘unsupported’ hardware. Build it and they will come. WASAPI has enabled us to push this project forward. I’m not convinced anyone could have made a business case for its provision. But eventually it arrived, and was quickly supported by all the major DAW’s. Surely a much, much tougher nut to crack than a relatively mundane driver … "
And Philip Gruebele added:
"I think that the lack of standards support is not a strategy that Microsoft can continue pursuing in today's competitive market. It is doing the same thing as the lack of Bluetooth Low Energy support under Windows Phone. The competition (aka Apple & Google) is simply leaving Microsoft behind in this regard."
I thought this response to Frank was very interesting. Børge Strand-Bergesen, who's a hardware guy working on an open source DAC project (Audio Widget Project), had this to say:
"We have an open source Windows UAC2 ASIO driver. Ideally, we'd have a Windows UAC2 driver like the one on Mac and Linux. But since we don't, what I wish to do next is gather enough force to make a fully fledged UAC2 driver and release it under GPL. One centrally distributed device driver with the potential of supporting all UAC2 hardware. The 30-60 demographic has a lot of users who still prefer a PC over a tablet, and who love their music. My doctor is the perfect fit. He loves classical music. After trying a couple different DACs he's ended up with quite the driver collection and resulting DLL version inconsistencies. Now he's in the market for a Mac to play his music, even though he has no other use for one. I have watched the HiEnd audio scene and built DACs for some years now. People borrow and test each other's DACs the whole time. The lack of native UAC2 drivers on Windows is the single largest inhibitor of growth for high resolution audio. Having to install a driver scares away a large chunk of today's customer base, and it prevents that customer base from growing. DLL conflicts and crappy user interfaces push even more users into the Mac camp, where things work out of the box. Getting the promised sample rate in real life is important. Kbps sells just like megapixels. The hardware brand owners also have to struggle with the costly licensing terms of commercial drivers. Those are actually among the largest inhibitors of growth among those who supply to the early adopter users in the DAC market. The demand for UAC2 support on Win7 and onwards does not yet come from Logitech and Sony. It comes from the little guy like me who sells a couple hundred DACs to early adopters. Satisfy those, and HiFi brands like NAD and Rotel will start selling to larger groups. Satisfy those, and the Logitechs will follow. UAC2 support can easily be made a winning sales pitch for Windows PCs. 
In response to Børge, Kevin Halverson, said:
"An open source driver is an interesting idea, but native Windows support for both USB Audio Class 1.0 and 2.0 devices would be infinitely better. While we ship nowhere near the numbers of products as a Logitech and Sony, we do ship +50k units annually and a disproportionate percentage are to Mac and Linux users than one would expect based upon market share of these two platforms. I find it hard to believe that Microsoft's vast resources would even notice the trivial effort necessary to provide a USB Audio Class 2.0 driver (host stack), our small engineering staff accomplished our own in a matter of a few months and that included a lot of research and coming up to speed on what would be well known internally at Microsoft. I really wonder how this could even be something that would have to be considered for more than a moment, it just shouldn't be much of a task. Well, if nothing else. Its getting discussed again."
Here's another person with a good response to Frank's query, from Chris Barker: 
"I've been a lurker on this thread for a while. I'm not actively involved in the industry, but I am an audiophile and been dealing with PC (e.g. Windows) audio for decades. If there is a need to further prove the audience size for improved high bitrate audio support built in Windows, one only has to contact the guys at LH Labs and their very successful Kickstarter and Indiegoo Geek DAC projects. Anything that can improve and make Windows more "plug'n play" and "it just works"  for high quality audio devices would be a good thing for the world in general and users (and thus Microsoft by better perception) in particular. Also check out your favorite consumer audio magazine like Stereophile and The Absolute Sound. Each month's cover always features computer audio articles and now DSD in particular. Many of the writers who are very analog and not computer savvy revert to Mac machines because of the perceived easier experience in getting these systems working. Microsoft should be concerned at this example of quality and ease of use gap."
To counter Chris's enthusiasm, Tim Roberts, the devil's advocate of the group, responded:
"It is really hard to talk about topics like this in an objective and business-oriented way, because the whole arena is filled with so much astrology and incense and pyramids. Physiologically, 384kHz audio is just dumb, as is 192kHz and 96kHz. Anything more than 48kHz is just wasted bits. Sure, a few people are willing to spend money for that kind of equipment -- those are the same people keep telling themselves that tube amplifiers are better. They are buying Macs because Macs are cooler. I'm just not sure that a company like Microsoft can ever have mindshare in that population. Even if they released a USB Audio 2 driver stack tomorrow, I don't think it would be trusted."
So Marc Lindahl of Bowery Engineering, responded:
"Wow, clearly not a pro audio guy. While there is ongoing debate in the professional audio community and the audiophile community regarding 176.4KHz and up, there is little anymore that there is great utility for 96K and 88.2K in addition to generally superior sound quality to 44.1K/48K. The market shows there is a demand for high sample rates and bit depths, Microsoft should be interested in that. It's not 'just a few people'. Windows continues to enjoy popularity among audio pros for running various DAW software, and audiophiles as well.  The market is there."
And Børge wrote:
"I'm sorry Tim, but this is like saying Canon should've stopped adding megapixels once their cameras got 4 or so of them. kHz is a simple number. Comparing the kHz of your audio system will be done in the consumer crowds just like they compared the MHz of their CPUs and the megapixels of their cameras. The more you have of that simple metric, the better they will feel. And at the moment, Microsoft is the audio equivalent of a 3 megapixels camera or a Pentium 4 computer."
 To which Tim replied:
"No, this is not a valid comparison. Our eyes can tell the difference between 300 dpi and 600 dpi, and a 4 MP camera can only do about 200 dpi when printed at 8.5x11. Those extra pixels ARE being put to use. The same is simply not true of audio. You don't "zoom in" on an audio track. The concept doesn't make sense. The best human ears are physically unable to sense frequencies above about 20 kHz. Per Nyquist, anything above twice that frequency serves no purpose at all. They CANNOT, physically, alter what we sense in the sound. That's voodoo, not engineering.  Those MHz and megapixels are being used. Those extra kHz are utterly pointless.  Unlike the other two, we have reached a physical limit."
 Philip Gruebele replied to Tim by writing:
"Three points worth making:
  1. Whether or not it is technically necessary to support higher sample rates is not relevant. What is relevant is whether the market demands it, and it undeniably does. Otherwise why would so many companies - hardware manufacturers and download services - invest so many resources to make it happen?
  2. Using Nyquist and human hearing to make a case for not supporting higher sample rates is looking at the issue too narrowly. The reason higher sample rates can be better are complex and include things like simplifying DAC design and out-of-band filtering. Also some protocols like DSD64 over DoP require 176.4Khz and DSD128 requires double that just to get the data across. UA2.0 also supports certain use cases which are not possible with UA1.0. The minimum sample rate that should be supported is at least 384Khz and UA2.0 has handled all these cases for many years.
  3. The lack of USB Audio 2.0 support causes a headache for consumers because they have to deal with low quality, poorly tested, third party drivers. These drivers are not going away because of point (1). There are a LOT of high-end audio enthusiasts who voted against Windows by using Apple products because they provide a better end-user experience."
There were a few followup responses that went into technical details about the advantages of USB Audio Class 2.0 ver Class 1.0, but what you read above covers the main debate. The last posting was about a week ago on 2/16/2014. I hope these responses to Frank's inquiry will have some effect at Microsoft and convince them to develop a native USB Audio Class 2.0 driver for a future version of Windows. Time will tell. If I hear anything, I'll keep you posted.

1 comment:

  1. For playing back recordings on your hi-fi, Tim Roberts is absolutely correct that "anything more than 48kHz is just wasted bits", and trying to play ultrasound can actually degrade the sound by intermodulating into the audible band.

    But for RECORDING, for audio production, high bit depths and sampling rates are essential. High bit depths allow for wider dynamic range, which can then be compressed to good listening levels, and high sampling rates allow for less severe analog filters and for resampling ultrasound into the audible range (sampling synthesizers, etc). UAC 2.0 is necessary for pro audio recording and production.