Hi... I'm writing to you my porting status about audio.
Kernel
ALSA and Intel HD enabled as built-in (no module).
It correctly creates device nodes at bootup. Also sysfs seems right
(different cat display right outputs).
BoardConfig.mk
[...]
HAVE_HTC_AUDIO_DRIVER := false
BOARD_USES_ALSA_AUDIO := true
BUILD_WITH_ALSA_UTILS := true
[...]
asound.conf and asound.state
I placed them into /etc/ folder.
===asound.conf===
ctl.AndroidPlayback {
type hw
card 0
}
ctl.AndroidRecord {
type hw
card 0
}
pcm.AndroidPlayback {
type hooks
slave.pcm {
type hw
card 0
device 16
}
hooks.0 {
type ctl_elems
hook_args [
{ name 'Speaker Playback Switch' value [ true
true ] }
{ name 'Line-Out Playback Volume' value [ 64 64 ]
}
{ name 'Line-Out Playback Switch' value [ true
true ] }
{ name 'e-Mic Boost' value [ 0 0 ]
}
{ name 'e-Mic Playback Volume' value [ 10 10 ]
}
{ name 'e-Mic Playback Switch' value [ false
false ] }
{ name 'i-Mic Boost' value [ 0 0 ]
}
{ name 'i-Mic Playback Volume' value [ 10 10 ]
}
{ name 'i-Mic Playback Switch' value [ false
false ] }
{ name 'Capture Volume' value [ 0 0 ]
}
{ name 'Capture Switch' value [ false
false ] }
{ name 'Input Source' value i-Mic
}
{ name 'Master Playback Volume' value 64
}
{ name 'Master Playback Switch' value true
}
]
}
}
[... And so on ...]
===asound.state===
state.Intel {
control.1 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'Speaker Playback Switch'
value.0 true
value.1 true
}
control.2 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 64'
comment.dbmin -6400
comment.dbmax 0
iface MIXER
name 'Line-Out Playback Volume'
value.0 64
value.1 64
}
control.3 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'Line-Out Playback Switch'
value.0 true
value.1 true
}
control.4 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 3'
comment.dbmin 0
comment.dbmax 3000
iface MIXER
name 'e-Mic Boost'
value.0 0
value.1 0
}
control.5 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 31'
comment.dbmin -3450
comment.dbmax 1200
iface MIXER
name 'e-Mic Playback Volume'
value.0 0
value.1 0
}
control.6 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'e-Mic Playback Switch'
value.0 false
value.1 false
}
control.7 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 3'
comment.dbmin 0
comment.dbmax 3000
iface MIXER
name 'i-Mic Boost'
value.0 0
value.1 0
}
control.8 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 31'
comment.dbmin -3450
comment.dbmax 1200
iface MIXER
name 'i-Mic Playback Volume'
value.0 0
value.1 0
}
control.9 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'i-Mic Playback Switch'
value.0 false
value.1 false
}
control.10 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 31'
comment.dbmin -1350
comment.dbmax 3300
iface MIXER
name 'Capture Volume'
value.0 0
value.1 0
}
control.11 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'Capture Switch'
value.0 false
value.1 false
}
control.12 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
comment.item.0 i-Mic
comment.item.1 e-Mic
iface MIXER
name 'Input Source'
value i-Mic
}
control.13 {
comment.access 'read write'
comment.type INTEGER
comment.count 1
comment.range '0 - 64'
comment.dbmin -6400
comment.dbmax 0
iface MIXER
name 'Master Playback Volume'
value 64
}
control.14 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
iface MIXER
name 'Master Playback Switch'
value true
}
}
alsa-lib alsa_sound and alsa-utilis
Added to the tree. I did not modified them ( I have some doubt about
LOCAL_ARM_MODE := arm definition ... )
All is built correctly.
I can launch alsa_ctr store / restore and it is ok.
I can launch alsa_aplay -l and audio card is listed.
Launching alsa_aplay file.wav it tells me "unable to install hw
params".
Launching alsa_amixer -c 0 it goes on segfault when parsing the first
control 'Master', after it prints Limits: Playback 0 - 64.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---