>This is how it looks as of now. Can anyone tell me what are hooks ?
Let me give you an example of hooks.
Lets say you have asound.conf file as shown below:
pcm.AndroidPlayback_Speaker {
type hooks
slave.pcm {
type hw
card omap3beagle
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
name 'DAC2 Digital Fine Playback Volume'
value.0 63
value.1 63
}
}
So in your audiohardwarealsa.cpp file you will have something like
this
open(AndroidPlayback_Speaker) for playing audio from the
speaker.However you can use the same name(AndroidPlayback_Speaker) for
playing it from the earphone also by just changing the hooks value.
This hook value will be checked in your codec driver and based on the
value you can set the route.
Your driver will have something like this logic as shown below:
If(value == 63)
set_codec_register_to_speaker
else
set_codec_register_to_earphone
Hope it helps.
--anish
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting