The puzzle that is IP32 audio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
device?

	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. :-)

Regards,
-- 
Stuart Longland (aka Redhatter)              .'''.
Gentoo Linux/MIPS Cobalt and Docs Developer  '.'` :
. . . . . . . . . . . . . . . . . . . . . .   .'.'
http://dev.gentoo.org/~redhatter             :.'

International Asperger's Year (1906 ~ 2006)
http://dev.gentoo.org/~redhatter/iay

Footnotes:
1. http://www.analog.com/UploadedFiles/Data_Sheets/314303384ad1843.pdf
2. http://www.openbsd.org/cgi-bin/man.cgi?query=mavb&sektion=4&arch=sgi
3.
http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/arch/sgi/dev/mavb.c?rev=1.6&content-type=text/plain

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux