Research Pre Audio

From WebOS Internals
Revision as of 18:24, 21 October 2009 by StefanSchmidt (talk | contribs) (update about audio scripts)
Jump to navigation Jump to search

This side should cover the audio architecture used on the Palm Pre.

Hardware

The used TWL4030 PMIC covers the audio part.

Soundcards

root@castle:/var/home/root# aplay -l    
**** List of PLAYBACK Hardware Devices ****
card 0: mcbsp2 [twl4030-i2s (mcbsp2)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: mcbsp3 [btsco (mcbsp3)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Scripts

Palm uses scripts to configure the lower levels of the sound system that are executed inside the kernel. Audiod triggers them over a sysfs interface.

echo "#list" > /sys/devices/platform/twl4030_audio/scdebug
for example lists you all available scripts over the kernel message output which you can view with dmesg. You can also try
#all
#volume
#init

These scripts can be triggered by writing is name as a string into

/sys/devices/platform/twl4030_audio/scrun

A good start to dive into this is sound/arm/omap-twl4030/script.c in the kernel patch from palm.