[Top] [All Lists]

The puzzle that is IP32 audio

Subject: The puzzle that is IP32 audio
From: Stuart Longland <>
Date: Sat, 01 Jul 2006 23:45:40 +1000
Openpgp: id=63264AB9; url=
Organization: Gentoo Foundation
Original-recipient: rfc822;
User-agent: Thunderbird (X11/20060623)
Hi All...

        I've just been tinkering with my O2's audio... and whilst looking
around at OpenBSD... it seems I might have some pieces to the puzzle
which may explain the rather poor audio quality one gets under Linux.

        The sound board is based around an Analogue Devices AD1843 codec
(datasheet here[1]), which is a 16-bit device.  The interesting note,
was in the OpenBSD source code for their mavb[2] driver... The mabv.c
file[3] contains this comment:

> /*
>  * For some reason SGI has decided to standardize their sound hardware
>  * interfaces on 24-bit PCM even though the AD1843 codec used in the
>  * Moosehead A/V Board only supports 16-bit and 8-bit formats.
>  * Therefore we must convert everything to 24-bit samples only to have
>  * the MACE hardware convert them back into 16-bit samples again.  To
>  * complicate matters further, the 24-bit samples are embedded 32-bit
>  * integers.  The 8-bit and 16-bit samples are first converted into
>  * 24-bit samples by padding them to the right with zeroes.  Then they
>  * are sign-extended into 32-bit integers.  This conversion is
>  * conveniently done through the software encoding layer of the high
>  * level audio driver by using the functions below.  Conversion of
>  * mu-law and A-law formats is done by the hardware.
>  */

        I'm wondering... I don't see any logic that does this in the ALSA
code... Could this be the reason we get such craptastic audio from this

        I'll have a tinker, and see if I can use my limited coding skills to
fix up the current IP32 driver to the point the sound at least works...
without sounding terrible. :-)

Stuart Longland (aka Redhatter)              .'''.
Gentoo Linux/MIPS Cobalt and Docs Developer  '.'` :
. . . . . . . . . . . . . . . . . . . . . .   .'.'             :.'

International Asperger's Year (1906 ~ 2006)


Attachment: signature.asc
Description: OpenPGP digital signature

<Prev in Thread] Current Thread [Next in Thread>
  • The puzzle that is IP32 audio, Stuart Longland <=