本文主要是介绍Android ALSA porting to smartq7,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1. system/core/init/device.c加上一段代碼以創建/dev/snd:
......
} else if(!strncmp(uevent->subsystem, "mtd", 3)) {
base = "/dev/mtd/";
mkdir(base, 0755);
} else if(!strncmp(uevent->subsystem, "sound", 5)) {
base = "/dev/snd/";
mkdir(base, 0755);
2. 修改system/core/init/devices.c,增加设备节点及权限:
static struct perms_ devperms[] = {
...
{ "/dev/snd/", 0664, AID_SYSTEM, AID_AUDIO, 1 },
...
3. 修改/build/target/board/generic/BoardConfig.mk
#BOARD_USES_GENERIC_AUDIO := true
BOARD_USES_ALSA_AUDIO := true
BUILD_WITH_ALSA_UTILS := true
4. 下载android上的alsa lib 和alsa utils到external目录
Downloading ALSA projects
Create the local_manifest.xml file which tells repo about the eee_701 branch:
$ cd .repo
$ touch local_manifest.xml
Open local_manifest.xml in your favorite text editor. Paste the following text into local_manifest.xml.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="external/alsa-lib" name="platform/external/alsa-lib"/>
<project path="external/alsa-utils" name="platform/external/alsa-utils"/>
<project path="hardware/alsa_sound" name="platform/hardware/alsa_sound"/>
</manifest>
Or use git clone:
For git please refer to
http://blog.csdn.net/stevenliyong/archive/2009/10/27/4732103.aspx
#cd android/external/
#git clone git://android.git.kernel.org/platform/external/alsa-lib.git
#git clone git://android.git.kernel.org/platform/external/alsa-utils.git
#cd android/hardware/
#git clone git://android.git.kernel.org/platform/hardware/alsa_sound.git
For pre-eclair version, you may need
#git -log
#git checkout v???
这篇关于Android ALSA porting to smartq7的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!