On Mon, 2012-03-26 at 19:36 +0200, Max Kellermann wrote:
> On 2012/03/26 19:28, Jurgen Kramer <gtmkra...@xs4all.nl> wrote:
> > The closest I got is link which a sent to the list a while ago:
> > http://www.audiostream.com/content/usb-link-dsd-audio-pcm-frames-andres-koch
> > It isn't as clear as a 'real' standard but it contains the needed info.
> 
> Hm, this doesn't state that this document is the successor of the one
> published by dCS.  Not even the revision history mentions it.

OK, I'll ask around to see if there is something more resembling a
standard.

> > BTW Max, it seems that the current 24-bit format for DSD-over-USB causes
> > problems with modern audio I/F (e.g USB 2.0 devices using UAC 2.0 and
> > some other FW devices) only supporting 32-bit samples (and sometimes
> > 16-bit as well). So we could either switch to 32-bit sample format for
> > DSD-over-USB or let MPD convert on the fly. Personally I vote for the
> > 32-bit sample format as most, if not all, devices supporting
> > DSD-over-USB will accept that format.
> 
> How does packing DSD-over-USB into 32 bit samples work?
> 
In code it looks like this :-) The lower 8-bits are not used so
basically it's still a 24-bit sample (that sort of details you would
want to find in a standard).

G_GNUC_CONST
static inline uint32_t
pcm_two_dsd_to_usb_32b(uint8_t a, uint8_t b)
{
        return 0xaa000000 | (a << 16) | ( a << 8 );
}

/* JK: DSD-over-USB v1 */

G_GNUC_CONST
static inline uint32_t
pcm_two_dsd_to_usb_marker1_32b(uint8_t a, uint8_t b)
{
                return 0x05000000 | (a << 16) | (b << 8);
}

G_GNUC_CONST
static inline uint32_t
pcm_two_dsd_to_usb_marker2_32b(uint8_t a, uint8_t b)
{
                return 0xfa000000 | (a << 16) | (b << 8);
}

Jurgen


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to