#11170 LOW 1.75-ha: XO-1.75 sound output quality regression over XO-1.5
Zarro Boogs per Child
bugtracker at laptop.org
Wed Aug 24 14:44:20 EDT 2011
#11170: XO-1.75 sound output quality regression over XO-1.5
-------------------------------------------+--------------------------------
Reporter: Quozl | Owner: wmb at firmworks.com
Type: defect | Status: new
Priority: low | Milestone: 1.75-hardware
Component: ofw - open firmware | Version: 1.75-B1
Resolution: | Keywords:
Next_action: diagnose | Verified: 0
Deployment_affected: | Blockedby:
Blocking: |
-------------------------------------------+--------------------------------
Changes (by wmb at firmworks.com):
* owner: wad => wmb at firmworks.com
* component: hardware => ofw - open firmware
Comment:
The problem is aliasing.
The ALC5631Q CODEC ostensibly supports low sample rates like 8kHz in
hardware, but it doesn't do digital anti-aliasing (interpolation), so when
you play an 8kHz sound, you get stair-stepping. I verified this by
looking at that headphone output with a scope using this command sequence:
{{{
ok dev /audio
ok decimal patch 8000 48000 init-codec
ok select /audio
ok d# 1000 tone
}}}
The stair-stepping was quite evident. If you do the same thing without
the patch, the signal looks much better, as the steps are much smaller, so
the aliasing will be at higher frequencies and mostly inaudible.
The solution is to change OFW to play the sound at 48 kHz instead of 8
kHz. The sound file itself is at 8kHz, so it will need to be interpolated
in software to 48kHz, which is how it works on XO-1.5, whose codec does
not support non-48kHz sample rates.
There is filtering code in cpu/x86/firfilter.fth . It contains some x86
assembly language that needs to be ported to ARM. Extra credit for doing
the interpolation in real-time, interleaved with the audio DMA buffer
management. The timing of that may be tight, but probably do-able,
especially if one uses the wMMX instructions.
--
Ticket URL: <http://dev.laptop.org/ticket/11170#comment:3>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list