usb audio aes oslo 2015-04-13 børge strand-bergesen

20
USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

Upload: kristina-bell

Post on 21-Jan-2016

222 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

USB Audio

AES Oslo 2015-04-13

Børge Strand-Bergesen

Page 2: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

2

Børge Strand-Bergesen

• Has been making a CD player for >20 years

• Experience from design and manufacturing of electronics

• The CD player was in need of a USB input• The Open Source SDR Widget was better

than commercial USB chips 5 years ago• Has commercialized the Audio Widget

project• Has a daytime job as Product Manger at

Miros AS

Page 3: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

3

Introduction

• What is time?

• What is digital audio?

• What does a DA converter really do?

• How is digital audio transferred?

• Why is an asynchronous protocol so good?

• Tips and tricks for good digital audio

• Demo

Page 4: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

4

What is time?

• We notice how fast things happen– Changes in rhytm– Offset hole in LP– Timing in DA converter

• Computers are not as sensitive– As long as things happed before they

are due– The clock may well vary

Page 5: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

5

What is digital audio?

• Sound is an analog phenomenon– Continuous signals– No sudden changes– Noise = “Fireplace”

• Digital sound has undergone a translation– “Chopped up” in time– Rounded off to nearest integer– Noise = Quantization & Jitter

Page 6: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

6

What does a DAC do?

• The DAC makes the audio signal continuous again– It plays back each sample– It fills in the gaps

= +

Page 7: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

7

Errors in DACs

– Quantization noise, level errors• Out of the DAC vs. into the ADC• A CD has the samples rounded off to the

closest of 65536 available integers (16 bits)• More bits help!

– Jitter, timing errors in when the samples are played back

• Darn good clocks help• … and the right transfer method

→ Time (jitter)→ L

eve

l (q

ua

ntiz

atio

n)

Digital audio has two fundamental errors:

Page 8: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

8

How is digital audio transferred?• Synchronous protocol

– Transmitter controls the timing– Receiver regenerates clock signal– SPDIF (coax) and TOSLINK (optical)– Some people can tell cables apart by

their sound!– They carry a very digital data signal– and a very analog timing reference– Transmitter, receiver and cable are never

100% matched

– Some CD players transmit well– Some DACs receive well– PCs in general don’t transmit well

Page 9: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

9

Digital audio with USB

• USB is packet based (1 or 8 packets/ms)– CD audio with 44.1ksps is sent as 9 packets

of 44 samples and one packet of 45– It is hard to synchronize to this scheme!

Page 10: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

10

Transfer methods in USB audioSynchronous, DAC locks to USB clock

– PCs are really, really bad at making good analog clocks!

Adaptive, DAC has an adjustable clock– Adjustable clocks are expensive and somewhat noisy– Analog control loop

Asynchronous USB, DAC controls timing– The DAC can be made with a built-in, really good analog clock– Digital control

Asynchronous sample rate conversion– The clock in the DAC is completely independent of PC’s clock– Every single sample is digitally modified

Page 11: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

11

Asynchronous transfer = good!The DAC becomes the timing reference– Good clock chips placed right by the DAC chip– The DAC controls the source– USB is a very good fit– Asynchronous USB says “Speed up” or “Relax”

back to PC/Mac/iPad

Page 12: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

12

Sample rate conversion1. The task has 44.1 points per foot of line2. Draw it up with curve ruler #43. On translucent paper: draw 48 points per foot4. Ask Junior to solve the task

Page 13: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

13

Sample rate conversion1. 44.1 points / foot = Sample rate of CD2. Curve ruler #4 = digital FIR filter3. 48 points / foot = Sample rate out4. Junior = DAC

Windows and OS X do this without asking you!This was expensive at the time of DAT. Today it has no cost.

44.1 in and 48 out means:• Each 147. input sample == each 160. output sample• Every other sample is calculated, and different from the

original!

Page 14: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

14

Playback tips and tricks Decide ambition level

1. Everyday use• Plug’n’play• MP3• YouTube

2. Informed use• CD quality• Tidal / Wimp-HiFi

3. Hi-res• Needs a bit more setup• >48ksps• No “pling, you got mail”• Dedicated music player SW

4. Über geek

Page 15: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

15

Informed use on Windows

Page 16: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

16

Advanced use on Windows– If CD quality is sufficient, use WASAPI protocol– Download ASIO driver from www.henryaudio.com– Use DAC in UAC2 mode (USB Audio Class 2)– Use an ASIO compliant player program

• foobar2000 with its ASIO plugin• JRiver Media Center

– Use a virtual audio device• JRiver Media Center

http://www.jriver.com/• Hi-Fi CABLE & ASIO Bridge

http://vb-audio.pagesperso-orange.fr/Cable/

– Read the Henry Audio Blog

Page 17: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

17

Informed use on a Mac

Page 18: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

18

Informed use on iPad / iPhone– Use latest iOS– Purchase Apple’s

"Lightning to USB Camera Adapter“ or "Apple iPad Camera Connection Kit".

– Purchase a USB hub with its own power supply

– Use DAC in UAC2 mode– Read the Henry Audio Blog

Page 19: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

19

Driver summary• USB Audio Class 1 = OK for CD quality ●• USB Audio Class 2 = Hi-Res, 192 ksps

●Windows OS X Linux iOS

UAC1

Built-in driver with resampling. Works with all software.

Built-in driver with resampling.

Built-in driver with resampling.

Edit mpd-config.

Doesn’t work with UAC1 in current firmware.

UAC2

No OS support

No “Pling …”

Very good with ASIO and dedicated players.

Built-in driver with resampling.

Built-in driver with resampling.

Edit mpd-config.

Built-in driver without resampling!

Page 20: USB Audio AES Oslo 2015-04-13 Børge Strand-Bergesen

20

Demo!