From: Jurgen Kramer <gtmkramer@xs4all.nl>
To: Takashi Iwai <tiwai@suse.de>
Cc: Jussi Laako <jussi@sonarnerd.net>, alsa-devel@alsa-project.org
Subject: Re: [PATCH] pcm: add new 32-bit DSD sample format
Date: Thu, 20 Nov 2014 17:34:48 +0100 [thread overview]
Message-ID: <1416501288.2996.1.camel@xs4all.nl> (raw)
In-Reply-To: <s5hy4r6xkfu.wl-tiwai@suse.de>
On Thu, 2014-11-20 at 10:58 +0100, Takashi Iwai wrote:
> At Wed, 19 Nov 2014 21:50:30 +0200,
> Jussi Laako wrote:
> >
> > Hi,
> >
> > Sorry for catching up late on this patch...
> >
> > On 10.09.2014 10:00, Jurgen Kramer wrote:
> > > + FORMATD(DSD_U32_LE, "Direct Stream Digital, 4-byte (x32), little endian, oldest bits in MSB"),
> >
> > There is bug in this patch. The spec for these formats is, as above says
> > "little endian, oldest bits in MSB", however with the iFi iDSD Nano this
> > doesn't seem to be the case. Oldest bits are in MSB of the byte, but
> > byte order is big endian.
>
> Is it a bug of spec, or a bug of device?
> In the latter case, we'd need to introduce DSD_U32_BE format and apply
> a quirk, for example.
DSD is a bit odd wrt LE/BE. Both formats are allowed and used.
The device (XMOS based/Marantz+Denon) want the following order of
samples:
L1 L2 L3 L4 R1 R2 R3 R4. Where Lx/Rx are 8-bit DSD samples, L1-L4 are
packed to 1 32-bit sample.
I do think real BE will not work.
Jurgen
>
> Takashi
>
> > IOW, following alone will produce incorrect
> > output:
> >
> > size_t N = 32;
> > uint32_t x = 0;
> > while (N--)
> > {
> > x <<= 1;
> > x |= nextbit;
> > }
> >
> > But if you add __builtin_byteswap32(x) then the output is correct.
> >
> > I guess this has not been caught because of just memcpy()'ing the
> > oldest-bit-in-MSB byte stream to the sample buffer instead of
> > constructing the words...
> >
> >
> > Best regards,
> >
> > - Jussi
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
next prev parent reply other threads:[~2014-11-20 16:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 7:00 [PATCH] pcm: add new 32-bit DSD sample format Jurgen Kramer
2014-11-19 19:50 ` Jussi Laako
2014-11-20 9:58 ` Takashi Iwai
2014-11-20 16:34 ` Jurgen Kramer [this message]
2014-11-20 19:07 ` Jussi Laako
2014-11-21 9:11 ` Jussi Laako
2014-11-21 9:54 ` Takashi Iwai
2014-11-20 18:59 ` Jussi Laako
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=1416501288.2996.1.camel@xs4all.nl \
--to=gtmkramer@xs4all.nl \
--cc=alsa-devel@alsa-project.org \
--cc=jussi@sonarnerd.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox