IPB

Welcome Guest ( Log In | Register )

If the output is digital does the player make any difference to the so
db579
post Jul 31 2012, 00:21
Post #1





Group: Members
Posts: 30
Joined: 16-August 11
Member No.: 93077



I'm wondering whether if you had two media playing pieces of hardware outputting digital music would the quality of the device make any difference? For example say you had a cheap-to-mid range android phone or mp3 player playing a flac file and outputting over HDMI to a receiver, and a higher spec digital media player like say the Olive 06HD playing the same flac file output over HDMI to a receiver would you hear/should there theoretically even be any difference in audio quality?

Thanks
Go to the top of the page
+Quote Post
 
Start new topic
Replies
[JAZ]
post Aug 6 2012, 19:00
Post #2





Group: Members
Posts: 1778
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



phofman: Yes and no.

With windows Vista and upwards, microsoft changed the way the audio stack worked inside the OS.
With windows XP, I can almost halt the PC if I run an audio thread at high priority and uses all the cpu (ok, one core), but with Vista, you get audio skips.
They moved the audio stack out of the kernel, and that way it lost part of the "privileges" that it had until then.

When defining the buffer in an application, you're defining the buffers that it gives to the driver. With ASIO (and real drivers, not API emulators like ASIO4All), the same buffers are then sent to the soundcard, but with other APIs, that's not necessarily the case.


Now, don't forget that the meaning of multithreading is, in fact, slice tasks of different threads/programs in time fractions determined by the Operating System, and then run each one sequentially, determined by task priority and other order mechanisms.

And here is where the DPC latency plays a role. Basically, the problem is that once the soundcard driver needs audio, it schedules a callback that will provide this data, and this acts as a queue. (separated from user programs and with higher priority).
The latency of the DPC queue is determined by the different drivers that run, and the code it executes. It is expected that these calls are fast, but when they are not, the scheduled callback might not return in time to avoid audio skips.

(Better explained in http://www.thesycon.de/deu/latency_check.shtml#background )

Go to the top of the page
+Quote Post
phofman
post Aug 6 2012, 20:19
Post #3





Group: Members
Posts: 300
Joined: 14-February 12
Member No.: 97162



QUOTE ([JAZ] @ Aug 6 2012, 20:00) *


When defining the buffer in an application, you're defining the buffers that it gives to the driver. With ASIO (and real drivers, not API emulators like ASIO4All), the same buffers are then sent to the soundcard, but with other APIs, that's not necessarily the case.


I am talking about the direct DMA buffer, not a buffer which gets redefined by the mixing layer.

QUOTE ([JAZ] @ Aug 6 2012, 20:00) *

Now, don't forget that the meaning of multithreading is, in fact, slice tasks of different threads/programs in time fractions determined by the Operating System, and then run each one sequentially, determined by task priority and other order mechanisms.

And here is where the DPC latency plays a role. Basically, the problem is that once the soundcard driver needs audio, it schedules a callback that will provide this data, and this acts as a queue. (separated from user programs and with higher priority).
The latency of the DPC queue is determined by the different drivers that run, and the code it executes. It is expected that these calls are fast, but when they are not, the scheduled callback might not return in time to avoid audio skips.


DPC is in single milliseconds at worst, while soundcards easily handle DMA buffers of hundreds of millisecs, some even seconds. The trick (unless low latency required) is to raise the buffer sufficiently.

QUOTE ([JAZ] @ Aug 6 2012, 20:00) *


Well, that document does not mention the DMA buffer at all. Raising the buffer fixes any DPC problems (unless a really buggy driver hogs the CPU), provided one does not need to keep latency low for recording/authoring work. That is a situation very different to pure playback scenario.

I am aware of the fact that raising the buffer is often not an option on windows. That is why I use linux for audio. But the hardware itself is OK, fault of the rigid software stack. I have not heard of the SB Live problem in linux - every PCI card communicates over PCI constantly, reading the sound samples via DMA. IMO the cause is a too low DMA buffer chosen by the proprietary driver, causing underruns for slower PCI hardware.

This post has been edited by phofman: Aug 6 2012, 20:20
Go to the top of the page
+Quote Post
[JAZ]
post Aug 6 2012, 22:08
Post #4





Group: Members
Posts: 1778
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



QUOTE (phofman @ Aug 6 2012, 21:19) *
DPC is in single milliseconds at worst, while soundcards easily handle DMA buffers of hundreds of millisecs, some even seconds. The trick (unless low latency required) is to raise the buffer sufficiently.


Tested latency monitor this afternoon:
CODE
REPORTED DPCs
____________________________________________________________________________________________________
_____
Highest DPC routine execution time (Ás):              19488,501337
Driver with highest DPC routine execution time:       ACPI.sys - Controlador ACPI para NT, Microsoft Corporation

Highest reported total DPC routine time (%):          2,344699
Driver with highest DPC total execution time:         ACPI.sys - Controlador ACPI para NT, Microsoft Corporation

Total time spent in DPCs (%)                          3,438667

DPC count (execution time <250 Ás):                   381482
DPC count (execution time 250-500 Ás):                0
DPC count (execution time 500-999 Ás):                1334
DPC count (execution time 1000-1999 Ás):              6675
DPC count (execution time 2000-3999 Ás):              887
DPC count (execution time >=4000 Ás):                 0


Yes, that says the maximum has been 19 milliseconds. Just playing a song with directsound set at 5 buffers of 1576 samples (176ms of audio latency, 44Khz).
And obviously, i had audio skips.

I can get as low as 59ms with directsound and 25ms with WASAPI (And even less with ASIO and Asio4all). It really depends if the system wants to lag or not.

I was going to ask why you talk about DMA buffers, but I guess this sentence of yours is the key "I am aware of the fact that raising the buffer is often not an option on windows. That is why I use linux for audio."

So, now that we're on linux... What problems have you experienced with USB Audio over it? It's just so that we can conclude that Windows is more prone to the problem, and as such, it's audio stack, and not the USB protocol.
Go to the top of the page
+Quote Post
phofman
post Aug 7 2012, 11:46
Post #5





Group: Members
Posts: 300
Joined: 14-February 12
Member No.: 97162



QUOTE
Yes, that says the maximum has been 19 milliseconds.


Well, I do not know what that number means, since the output also says:

CODE
DPC count (execution time >=4000 Ás):                 0


It could as well be a total time spent in DPCs of ACPI.sys during the test period. No source code available to find out, but you can try to ask the developer.

QUOTE
Just playing a song with directsound set at 5 buffers of 1576 samples (176ms of audio latency, 44Khz).
And obviously, i had audio skips.


I do not know if these are DMA buffers the soundcard is using, or some intermediate buffer for the windows audio subsystem which allocates a different size buffer for the actual transfer to the soundcard. My knowledge of windows audio is almost zero smile.gif

QUOTE
I can get as low as 59ms with directsound and 25ms with WASAPI (And even less with ASIO and Asio4all). It really depends if the system wants to lag or not.


For pure playback the figures do not have to be so low. E.g. MPD uses 500 ms buffer by default.

QUOTE
I was going to ask why you talk about DMA buffers...


Because that is the buffer which counts when dealing with audio nondelivery to the soundcard. For PCI/e devices (not USB) the ASIO buffer is the direct DMA buffer, buffer allocated by linux alsa for raw hw:X device (e.g. used by MPD playing to hw:X device) is the direct DMA buffer too. This is to show that the DMA buffer is accessible, it does not have to be something hidden deep in the driver layer. I have no idea about other windows sound systems. In fact there are developers of some commercial closed-source audio players (I will not name, it is googleable smile.gif ) who have no idea about the DMA transfer and believe the CPU sends data directly to the soundcard.

USB devices work a bit differently, the audio buffer is used by the USB driver to prepare/mix final USB frames for all current USB streams to the actual DMA buffer for the USB controller to read.


QUOTE
So, now that we're on linux... What problems have you experienced with USB Audio over it? It's just so that we can conclude that Windows is more prone to the problem, and as such, it's audio stack, and not the USB protocol.


In the end every OS communicates with the hardware in basically the same manner, unless one features a bug in the driver. Linux offers access to even the lowest software layers which means an advanced user can tweak the params at will. I have tried to torture the USB audio stack and it proved to be surprisingly resilient - http://www.diyaudio.com/forums/pc-based/93...tml#post1719044

Go to the top of the page
+Quote Post

Posts in this topic
- db579   If the output is digital does the player make any difference to the so   Jul 31 2012, 00:21
- - xnor   I'd say that if you stay in the digital domain...   Jul 31 2012, 01:05
- - db579   Wouldn't jitter occur in the DAC process if at...   Jul 31 2012, 01:13
- - xnor   I think with HDMI it's entirely in the 'ha...   Jul 31 2012, 01:18
- - db579   Same thing for digital optical?   Jul 31 2012, 01:50
- - hlloyge   I think it's the same with all modern devices ...   Jul 31 2012, 07:33
- - probedb   Plus from reading around here, if you can actually...   Jul 31 2012, 08:15
- - db579   So with that in mind if you wanted portable audiop...   Jul 31 2012, 13:56
|- - Nessuno   QUOTE (db579 @ Jul 31 2012, 14:56) if you...   Jul 31 2012, 14:09
|- - Kohlrabi   QUOTE (db579 @ Jul 31 2012, 14:56) So wit...   Jul 31 2012, 14:14
|- - skamp   QUOTE (db579 @ Jul 31 2012, 14:56) So wit...   Jul 31 2012, 14:21
|- - greynol   QUOTE (db579 @ Jul 31 2012, 05:56) a good...   Jul 31 2012, 15:30
|- - Arnold B. Krueger   QUOTE (db579 @ Jul 31 2012, 08:56) So wit...   Aug 2 2012, 18:35
- - db579   I'm asking more out of theoretical interest th...   Jul 31 2012, 15:36
- - xnor   I think that portable players can easily sound bet...   Jul 31 2012, 15:39
- - greynol   The answer is yes, it is possible to get the same ...   Jul 31 2012, 15:43
|- - xnor   QUOTE (greynol @ Jul 31 2012, 16:43) To d...   Jul 31 2012, 16:54
- - db579   Interesting responses and not what I expected, tha...   Jul 31 2012, 15:48
- - skamp   The O2/ODAC is a portable DAC + headphone amp that...   Jul 31 2012, 16:46
- - db579   Thanks guys, really appreciate the detailed and he...   Jul 31 2012, 18:01
- - DVDdoug   QUOTE xnor - He seems to suggest that the response...   Jul 31 2012, 19:12
|- - xnor   QUOTE (DVDdoug @ Jul 31 2012, 20:12) It d...   Jul 31 2012, 20:07
||- - andy o   QUOTE (xnor @ Jul 31 2012, 12:07) I don...   Aug 1 2012, 15:46
||- - xnor   For example the Yamaha RX-V3900 was measured to ha...   Aug 1 2012, 16:37
||- - andy o   QUOTE (xnor @ Aug 1 2012, 08:37) For exam...   Aug 1 2012, 20:34
|- - mzil   QUOTE (DVDdoug @ Jul 31 2012, 14:12) ...D...   Jul 31 2012, 20:41
- - greynol   Identical numbers are fine and dandy, but they don...   Jul 31 2012, 20:08
- - db579   QUOTE (xnor @ Jul 31 2012, 20:07) Very fe...   Jul 31 2012, 21:14
- - yourlord   All things being equal, the delivered data should ...   Jul 31 2012, 22:33
|- - xnor   QUOTE (yourlord @ Jul 31 2012, 23:33) [.....   Jul 31 2012, 23:21
||- - Roseval   QUOTE (xnor @ Jul 31 2012, 23:21) Unlike ...   Aug 1 2012, 18:13
||- - xnor   QUOTE (Roseval @ Aug 1 2012, 19:13) As an...   Aug 1 2012, 18:34
||- - greynol   QUOTE (xnor @ Aug 1 2012, 10:34) I guess ...   Aug 1 2012, 18:40
|- - mzil   The signal the HDMI output sends gets transfered p...   Aug 1 2012, 00:16
|- - yourlord   QUOTE (mzil @ Jul 31 2012, 19:16) The sig...   Aug 1 2012, 03:33
- - mzil   ^Do you have any evidence that level is audible to...   Aug 1 2012, 17:07
- - xnor   Nope and that's why I didn't make that cla...   Aug 1 2012, 17:17
|- - pdq   QUOTE (xnor @ Aug 1 2012, 12:17) Nope and...   Aug 1 2012, 19:51
|- - Arnold B. Krueger   QUOTE (xnor @ Aug 1 2012, 12:17) Nope and...   Aug 2 2012, 18:50
- - mzil   If you are allowed to turn up the volume and liste...   Aug 1 2012, 17:31
- - greynol   Do DACs matter? Perhaps, but if you can't dem...   Aug 1 2012, 17:59
- - Roseval   QUOTE If frames need to arrive every ms but do not...   Aug 1 2012, 18:50
|- - Arnold B. Krueger   QUOTE (Roseval @ Aug 1 2012, 13:50) QUOTE...   Aug 2 2012, 18:41
- - greynol   How about the word horrible? EDIT: Just saw your ...   Aug 1 2012, 20:38
- - xnor   As I said, isochronous (adaptive) transfer can wor...   Aug 2 2012, 18:50
|- - Arnold B. Krueger   QUOTE (xnor @ Aug 2 2012, 13:50) As I sai...   Aug 2 2012, 18:55
|- - xnor   QUOTE (Arnold B. Krueger @ Aug 2 2012, 19...   Aug 2 2012, 21:21
|- - saratoga   QUOTE (xnor @ Aug 2 2012, 16:21) QUOTE (A...   Aug 2 2012, 21:28
|- - xnor   QUOTE (saratoga @ Aug 2 2012, 22:28) What...   Aug 2 2012, 21:38
|- - saratoga   QUOTE (xnor @ Aug 2 2012, 16:38) On my ol...   Aug 2 2012, 21:44
||- - xnor   QUOTE (saratoga @ Aug 2 2012, 22:44) I...   Aug 2 2012, 21:57
||- - saratoga   QUOTE (xnor @ Aug 2 2012, 16:57) QUOTE (s...   Aug 5 2012, 00:55
||- - phofman   QUOTE (saratoga @ Aug 5 2012, 01:55) No, ...   Aug 5 2012, 21:03
||- - [JAZ]   QUOTE (phofman @ Aug 5 2012, 22:03) Actua...   Aug 5 2012, 21:40
||- - xnor   QUOTE ([JAZ] @ Aug 5 2012, 22:40)...   Aug 5 2012, 23:39
|- - Arnold B. Krueger   QUOTE (xnor @ Aug 2 2012, 16:38) QUOTE (s...   Aug 3 2012, 13:15
|- - xnor   QUOTE (Arnold B. Krueger @ Aug 3 2012, 14...   Aug 3 2012, 15:01
|- - probedb   QUOTE (xnor @ Aug 3 2012, 15:01) Right, i...   Aug 3 2012, 16:25
||- - xnor   QUOTE (probedb @ Aug 3 2012, 17:25) You m...   Aug 3 2012, 16:55
||- - Arnold B. Krueger   QUOTE (xnor @ Aug 3 2012, 11:55) QUOTE (p...   Aug 3 2012, 16:59
|- - Arnold B. Krueger   QUOTE (xnor @ Aug 3 2012, 10:01) QUOTE (A...   Aug 3 2012, 16:55
||- - xnor   QUOTE (Arnold B. Krueger @ Aug 3 2012, 17...   Aug 3 2012, 17:19
||- - Arnold B. Krueger   QUOTE (xnor @ Aug 3 2012, 12:19) QUOTE (A...   Aug 3 2012, 22:26
||- - xnor   QUOTE (Arnold B. Krueger @ Aug 3 2012, 23...   Aug 3 2012, 22:38
||- - Arnold B. Krueger   QUOTE (xnor @ Aug 3 2012, 17:38) QUOTE (A...   Aug 4 2012, 23:43
||- - xnor   QUOTE (Arnold B. Krueger @ Aug 5 2012, 00...   Aug 5 2012, 00:36
||- - Arnold B. Krueger   QUOTE (xnor @ Aug 4 2012, 19:36) QUOTE (A...   Aug 6 2012, 08:14
|- - yourlord   QUOTE (xnor @ Aug 3 2012, 10:01) All I...   Aug 3 2012, 17:17
|- - xnor   QUOTE (yourlord @ Aug 3 2012, 18:17) That...   Aug 3 2012, 17:28
- - greynol   ...and poor subject/verb agreement, lol.   Aug 2 2012, 18:58
- - Roseval   A test by Jim Lesurf: http://www.audiomisc.co.uk/L...   Aug 2 2012, 19:05
|- - Arnold B. Krueger   QUOTE (Roseval @ Aug 2 2012, 14:05) A tes...   Aug 2 2012, 19:26
- - [JAZ]   @ xnor: That example does not apply. I do have hi...   Aug 2 2012, 22:13
|- - xnor   QUOTE ([JAZ] @ Aug 2 2012, 23:13)...   Aug 2 2012, 22:35
- - Roseval   It is very simple. USB Audio is a isochronous stre...   Aug 4 2012, 09:43
|- - db579   Thanks for that Roseval really clear helpful expla...   Aug 4 2012, 16:29
- - Roseval   Thanks There are a couple of exiting developments...   Aug 4 2012, 21:22
|- - db579   @roseval So am I right in thinking this would be i...   Aug 5 2012, 15:02
|- - Roseval   The USB DACs being UAC1 or UAC2 compliant (use the...   Aug 5 2012, 17:14
- - phofman   If you raise playback buffer/playback latency, wil...   Aug 6 2012, 17:43
- - [JAZ]   phofman: Yes and no. With windows Vista and upwa...   Aug 6 2012, 19:00
|- - phofman   QUOTE ([JAZ] @ Aug 6 2012, 20:00)...   Aug 6 2012, 20:19
|- - [JAZ]   QUOTE (phofman @ Aug 6 2012, 21:19) DPC i...   Aug 6 2012, 22:08
|- - phofman   QUOTE Yes, that says the maximum has been 19 milli...   Aug 7 2012, 11:46
- - Roseval   Maybe this link is of use: http://www.rme-audio.de...   Aug 6 2012, 22:43


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st August 2014 - 00:00