From: Takashi Iwai <tiwai@suse.de>
To: Jussi Laako <jussi@sonarnerd.net>
Cc: alsa-devel@alsa-project.org, Jurgen Kramer <gtmkramer@xs4all.nl>
Subject: Re: [PATCH] pcm: add new 32-bit DSD sample format
Date: Thu, 20 Nov 2014 10:58:29 +0100 [thread overview]
Message-ID: <s5hy4r6xkfu.wl-tiwai@suse.de> (raw)
In-Reply-To: <546CF486.7010009@sonarnerd.net>
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.
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
>
next prev parent reply other threads:[~2014-11-20 9:58 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 [this message]
2014-11-20 16:34 ` Jurgen Kramer
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=s5hy4r6xkfu.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=gtmkramer@xs4all.nl \
--cc=jussi@sonarnerd.net \
/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