From: Nicolas Boullis <nboullis@debian.org>
To: alsa-devel@lists.sourceforge.net
Subject: Bug in the generation of IEC958 subframes
Date: Wed, 16 Nov 2005 01:45:01 +0100 [thread overview]
Message-ID: <20051116004500.GA5622@home> (raw)
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
Hi,
While working on an ALSA driver for the audio part of em8300-based MPEG
decoder boards (Sigma Designs' Hollywood+ boards and Creative Labs' DXR3
boards), I think I discovered a bug in the code that generates IEC958
subframes from linear samples (iec958 plugin): M and W preambles are
swapped, and B preambles should only be used on even subframes. The
attached patch fixes this issue.
Moreover, (using debian's 1.0.9-3 package, I haven't checked with
1.0.10rc3), I get segfaults whenever I try to specify the preambles in
my ~/.asoundrc file.
(https://bugtrack.alsa-project.org/alsa-bug/ times out, that's why I'm
sending this report here.)
Cheers,
Nicolas
PS: please CC replies to me, as I don't read the alsa-devel ML.
[-- Attachment #2: alsa-lib.patch --]
[-- Type: text/plain, Size: 668 bytes --]
diff -ruN alsa-lib-1.0.10rc3.orig/src/pcm/pcm_iec958.c alsa-lib-1.0.10rc3/src/pcm/pcm_iec958.c
--- alsa-lib-1.0.10rc3.orig/src/pcm/pcm_iec958.c 2005-05-24 16:14:35.000000000 +0200
+++ alsa-lib-1.0.10rc3/src/pcm/pcm_iec958.c 2005-11-16 01:35:46.000000000 +0100
@@ -116,10 +116,10 @@
data |= 0x80000000;
/* Preamble */
- if (! iec->counter)
- data |= iec->preamble[PREAMBLE_Z]; /* Block start, 'Z' */
- else if (! channel)
+ if (channel)
data |= iec->preamble[PREAMBLE_Y]; /* odd sub frame, 'Y' */
+ else if (! iec->counter)
+ data |= iec->preamble[PREAMBLE_Z]; /* Block start, 'Z' */
else
data |= iec->preamble[PREAMBLE_X]; /* even sub frame, 'X' */
next reply other threads:[~2005-11-16 0:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-16 0:45 Nicolas Boullis [this message]
2005-11-17 12:09 ` Bug in the generation of IEC958 subframes Takashi Iwai
2005-11-17 19:47 ` Nicolas Boullis
2005-11-18 19:58 ` Takashi Iwai
2005-11-19 0:37 ` Nicolas Boullis
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=20051116004500.GA5622@home \
--to=nboullis@debian.org \
--cc=alsa-devel@lists.sourceforge.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 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.