Bug in the generation of IEC958 subframes
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.
src/pcm/pcm_iec958.c +3 -3
@@ -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' */
Takashi Iwai
AppliedAt Wed, 16 Nov 2005 01:45:01 +0100,
Quoted 9 lines · Nicolas Boullis
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.
Thanks, applied to CVS now.
Quoted 3 lines
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.
Hmm, the segfault is more serious. Could you get a backtrace via gdb?
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
Hi,
Yesterday, I could manage to acces the bugtracking system, and file bugs 0001570 and 0001571.
Quoted 5 lines · Takashi Iwai
At Wed, 16 Nov 2005 01:45:01 +0100,
Quoted 3 lines · Nicolas Boullis
Hi,
Quoted 8 lines
Quoted 6 lines
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.
Thanks, applied to CVS now.
Thanks. I think you can close bug #0001570 then.
Quoted 5 lines
Quoted 3 lines
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.
Hmm, the segfault is more serious. Could you get a backtrace via gdb?
I submitted some test .asoundrc file + a backtrace I got with valgring in bug #0001571. Is it sufficient or should I also get a gdb backtrace?
Thanks,
Nicolas
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
At Thu, 17 Nov 2005 20:47:37 +0100,
Quoted 9 lines · Nicolas Boullis
Quoted 6 lines
Quoted 4 lines
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.
Hmm, the segfault is more serious. Could you get a backtrace via gdb?
I submitted some test .asoundrc file + a backtrace I got with valgring in bug #0001571. Is it sufficient or should I also get a gdb backtrace?
Yes, it's preferred. We may be able to see more details.
thanks,
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
Quoted 2 lines · Takashi Iwai
Yes, it's preferred. We may be able to see more details.
OK, I just submitted the gdb backtrace to bug #0001571.
(To be honnest, the valgring backtrace looks much more informative than the gdb backtrace, as far as I can see...)
Cheers,
Nicolas
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click