From: Daniel Mack <zonque@gmail.com>
To: Andreas Koch <andreas@akdesigninc.com>
Cc: Jussi Laako <jussi@sonarnerd.net>, Takashi Iwai <tiwai@suse.de>,
clemens@ladisch.de, alsa-devel@alsa-project.org,
demian@auraliti.com, ray@auraliti.com
Subject: Re: [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work
Date: Tue, 26 Mar 2013 20:58:05 +0100 [thread overview]
Message-ID: <5151FDCD.2080103@gmail.com> (raw)
In-Reply-To: <7.0.0.16.2.20130323183543.0605ddb0@akdesigninc.com>
Hi Andreas,
On 24.03.2013 02:50, Andreas Koch wrote:
> At 01:01 PM 3/23/2013, Jussi Laako wrote:
>> On 03/22/2013 06:05 PM, Andreas Koch wrote:
>>> The 8-bit raw format is for 2.8MHz DSD and the 16-bit format is for
>>> 5.6MHz DSD. In both cases the driver sets the sample rate to 352.8kHz on
>>> the DAC,
>>
>> I see, this is different from how I've been dealing with it. Since I
>> always use uint8 format, but instead vary the rate to 352.8/705.6/etc...
>>
>> Just because it's much more straightforward form the application's
>> perspective -> output rate is always bit rate divided by eight
>> (=packet rate). And switch between uint8 / uint32 sample format
>> equals to switch between DSD <-> PCM.
>
> Since the sample rate is defined on the interface level, not on the
> alternate interface level, it becomes a problem to vary the sample
> rate. For instance, for 5.6MHz DSD a sample rate of 705.6kHz would be
> necessary with 8-bit data. But most likely the DAC will not support
> that rate for PCM. If you plug that DAC into a Mac, the Mac will
> automatically select 705.6kHz for PCM and then nothing will work
> because the DAC doesn't support that in PCM. So then, the DAC would
> have to define 2 complete interfaces: one for PCM and one for DSD.
> That increases the size of the descriptor file (which can be a
> problem with some hardware implementations) and increases the
> overhead a bit during enumeration and sample rate queries. For the
> hardware it is easier to bundle all into one single interface and
> then define alternate interfaces for PCM and DSD.
> Just my 2 cents from the hardware perspective.
Ok. So we could define 3 DSD formats, for 8-bit, 16-bit and 32-bit. On
that three formats, arbitrary samples can be transported, and the
mapping between the configured sample rate and the resulting DSD rates
would be as follows (please tell me if I'm correct):
352.8kHz 705.6KHz 1411.2KHz
8-bit 2.8MHz 5.6MHz 11.2MHz
16-bit 5.6MHz 11.2MHz
32-bit 11.2MHz
So driver would mark a stream as DSD capable (8, 16, 32bit, depending on
the USB descriptors), and then leave it up to the application to do the
sample frequency determination according to the above table, and also as
stated in the DoP document. Other drivers for more sound cards
(presumable on other bus types) might follow.
I think it's ok to handle it like this, because after all, what an
application sets as sample rate for the stream is the number of actual
words that are transported, where as the DSD rate is referring to bits/s.
Jussi, for your application, that means that you'd have to add these 3
new formats, and teach your application that they can be used for DSD
right away.
The question is whether all DSD-capable USB DACs behave correctly in
order to make this logic work. Andreas?
Thanks,
Daniel
next prev parent reply other threads:[~2013-03-26 19:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-17 12:07 [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work Daniel Mack
2013-03-17 12:07 ` [PATCH 1/3] ALSA: snd-usb: handle the bmFormats field as unsigned int Daniel Mack
2013-03-17 12:07 ` [PATCH 2/3] ALSA: snd-usb: handle raw data format of UAC2 devices Daniel Mack
2013-03-17 12:07 ` [PATCH 3/3] ALSA: snd-usb: add delay quirk for "Playback Design" products Daniel Mack
2013-03-18 9:07 ` [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work Takashi Iwai
2013-03-18 9:15 ` Daniel Mack
2013-03-18 9:30 ` Takashi Iwai
2013-03-18 13:49 ` Daniel Mack
2013-03-19 2:51 ` Gabriel M. Beddingfield
2013-03-19 6:48 ` Takashi Iwai
2013-03-21 21:21 ` Jussi Laako
2013-03-22 8:11 ` Daniel Mack
2013-03-22 19:37 ` Jussi Laako
2013-03-23 11:31 ` Support for DSD streams (was: Re: [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work) Daniel Mack
2013-03-23 19:53 ` Support for DSD streams Jussi Laako
[not found] ` <7.0.0.16.2.20130322082602.0605cbc0@akdesigninc.com>
2013-03-23 11:50 ` Support for DSD streams (was: Re: [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work) Daniel Mack
[not found] ` <7.0.0.16.2.20130323101939.0605d748@akdesigninc.com>
2013-03-23 18:43 ` Support for DSD streams Daniel Mack
[not found] ` <7.0.0.16.2.20130323182911.0605db20@akdesigninc.com>
2013-03-27 9:53 ` Daniel Mack
2013-03-23 20:01 ` [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work Jussi Laako
[not found] ` <7.0.0.16.2.20130323183543.0605ddb0@akdesigninc.com>
2013-03-24 10:50 ` Jussi Laako
2013-03-26 19:34 ` Daniel Mack
2013-03-28 0:10 ` Jussi Laako
2013-03-26 19:58 ` Daniel Mack [this message]
[not found] ` <7.0.0.16.2.20130326224120.13b063e0@akdesigninc.com>
2013-03-27 9:45 ` Clemens Ladisch
2013-03-27 9:48 ` Daniel Mack
[not found] ` <7.0.0.16.2.20130327080219.13b06900@akdesigninc.com>
2013-03-27 18:22 ` Daniel Mack
2013-03-27 23:48 ` Jussi Laako
2013-03-28 0:00 ` Jussi Laako
2013-03-27 19:02 ` Daniel Mack
[not found] ` <7.0.0.16.2.20130321181551.0605bc60@akdesigninc.com>
2013-03-22 10:15 ` Jussi Laako
2013-03-22 10:23 ` Takashi Iwai
2013-03-22 11:08 ` Jussi Laako
2013-03-19 2:37 ` Gabriel M. Beddingfield
2013-03-19 6:49 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5151FDCD.2080103@gmail.com \
--to=zonque@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=andreas@akdesigninc.com \
--cc=clemens@ladisch.de \
--cc=demian@auraliti.com \
--cc=jussi@sonarnerd.net \
--cc=ray@auraliti.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.