Rockie's Android Porting Guide(6)——Add ALSA to your system
(1)First,you need download alsa libs and tools from Android GIT.
git clone git://android.git.kernel.org/platform/external/alsa-lib.git
git clone git://android.git.kernel.org/platform/external/alsa-utils.git
git clone git://android.git.kernel.org/platform/hardware/alsa_sound.git
check each fold and run below command:
git branch -a
git checkout origin/eclair
(2)build/target/board/idea6410/BoardConfig.mk
#HAVE_HTC_AUDIO_DRIVER := true
#BOARD_USES_GENERIC_AUDIO := true
BOARD_USES_ALSA_AUDIO := true
BUILD_WITH_ALSA_UTILS := true
(3)make clean and rebuild
(4)add asound.conf to your final system/etc/
# #
# # Mixer devices
# #
ctl.AndroidPlayback {
type hw
card 0 # Can replace with drivers name from /proc/asound/cards
}
ctl.AndroidRecord {
type hw
card 0
}
# #
# # Playback devices
# #
pcm.AndroidPlayback {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Speaker {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Speaker_normal {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Speaker_ringtone {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Speaker_incall {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Earpiece {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Earpiece_normal {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Earpiece_ringtone {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Earpiece_incall {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Bluetooth {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Bluetooth_normal {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Bluetooth_ringtone {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Bluetooth_incall {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Headset {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Headset_normal {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Headset_ringtone {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Headset_incall {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Bluetooth-A2DP {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Bluetooth-A2DP_normal {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Bluetooth-A2DP_ringtone {
type hw
card 0
device 0
}
pcm.AndroidPlayback_Bluetooth-A2DP_incall {
type hw
card 0
device 0
}
pcm.AndroidRecord {
type hw
card 0
device 0
}
pcm.AndroidRecord_Microphone {
type hw
card 0
device 0
}
阅读(845) | 评论(0) | 转发(0) |