From: Jussi Laako <jussi@sonarnerd.net>
To: Jurgen Kramer <gtmkramer@xs4all.nl>, alsa-devel@alsa-project.org
Subject: Re: [PATCH] pcm: add new 32-bit DSD sample format
Date: Wed, 19 Nov 2014 21:50:30 +0200 [thread overview]
Message-ID: <546CF486.7010009@sonarnerd.net> (raw)
In-Reply-To: <1410332428-16571-1-git-send-email-gtmkramer@xs4all.nl>
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. 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
next prev parent reply other threads:[~2014-11-19 19:50 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 [this message]
2014-11-20 9:58 ` Takashi Iwai
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=546CF486.7010009@sonarnerd.net \
--to=jussi@sonarnerd.net \
--cc=alsa-devel@alsa-project.org \
--cc=gtmkramer@xs4all.nl \
/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.