现在的位置: 首页 > 综合 > 正文

android系统移植要点之六–以6410为例

2013年10月22日 ⁄ 综合 ⁄ 共 1976字 ⁄ 字号 评论关闭
Rockie's Android Porting Guide(6)——Add ALSA to your system

Rockie Cheng

(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
}

抱歉!评论已关闭.