Chinaunix首页 | 论坛 | 博客
  • 博客访问: 271885
  • 博文数量: 95
  • 博客积分: 2047
  • 博客等级: 大尉
  • 技术积分: 1022
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-14 16:18
文章分类

全部博文(95)

文章存档

2013年(1)

2011年(94)

我的朋友

分类: 嵌入式

2011-08-14 19:59:32

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
}


阅读(805) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~