(十二)A64
一、AC108驱动移植
1、驱动添加
cp r18/lichee/linux-4.4/sound/soc/codecs/ac108.* a64/linux-3.10/sound/soc/codecs/
2、Kconfig、Makefile修改
linux-3.10\sound\soc\codecs\Kconfig修改:
menu "CODEC drivers"
config SND_SOC_ALL_CODECS
# ac108 config
config SND_SOC_AC108
tristate "ac108 mic array "
depends on ARCH_SUN50IW1
select SND_SUNXI_SOC_SUNXI_DAUDIO
default n
help
say Y or M if you want to add support for AC108.
endmenu
r18 sound/soc/codecs/Kconfig配置
SND_SUNXI_SOC_SUNXI_DAUDIO
ac108添加
Device Drivers --->
<*> Sound card support --->
<*> Advanced Linux Sound Architecture --->
<*> ALSA for SoC audio support --->
CODEC drivers --->
<*> ac108 mic array
sunxi-snddaudio0添加
Device Drivers --->
<*> Sound card support --->
<*> Advanced Linux Sound Architecture --->
<*> ALSA for SoC audio support --->
<*> ASoC support for SUNXI --->
<*> ASoC support for daudio0 machine
二、buildroot
https://www.cnblogs.com/zhangshenghui/p/11008115.html
三、耳机喇叭驱动
查看A64开发板声卡驱动
在linux-3.10内核代码中搜索audiocodec关键字,查找到如下:
推断在sunxi_sndcodec.c中,查看linux-3.10\sound\soc\sunxi\目录下Kconfig和Makefile查看内核配置信息打开。
四、内核配置文件
1、驱动设备树
linux-3.10/arch/arm64/boot/dts/sun50iw1p1.dtsi
五、R18 ac108、tas5731驱动
ac108 驱动目录:
linux-4.4\sound\soc\codecs\ac108.c
tas5731驱动目录:
linux-4.4\sound\soc\codecs\tas5731.c
sun50iw1p1-tulip-noma.dts文件查看设备树配置:
跟踪查找snddaudio-codec-dai关键字,sunxi-snddaudio.c
查看 /proc/asound/cards文件
在SDK 查找 sndac10810035发现:
ERROR (duplicate_label): Duplicate label 'twi0' on /soc@01c00000/twi@0x0x01C2AC00 and /soc@01c00000/twi@0x01c2ac00
ERROR: Input tree has errors, aborting (use -f to force output)
make[1]: *** [arch/arm64/boot/dts/sun50iw1p1-soc.dtb] Error 2
六、adb
参考网站:
https://www.cnblogs.com/zengjfgit/p/6289873.html
1. 编译拷贝模块:make modules && make modules_install INSTALL_MOD_PATH=~/rootfs
2. modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 iSerialNumber="buildroot"
3. mkdir -p /dev/usb-ffs/adb
4. mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000
5. adbd &
6. 插上USB OTG线,会先安装驱动,安装完成后,可以使用adb工具了。
7. Ubuntu里可以直接安装一下android adb tool就可以连接了。
备份:
改后:
七、A64喇叭播放
amixer cset name='Earpiece Switch' 'on'
amixer cset name='earpiece volume' '31'
aplay music_16_2.wav &
喇叭和耳机同时播放,Earpiece Switch控制开关,earpiece volume控制音量
八、A64移植tina系统
ERROR: "sunxi_wlan_get_oob_irq_flags" [drivers/net/wireless/bcmdhd/bcmdhd.ko] undefined!
ERROR: "sunxi_wlan_get_bus_index" [drivers/net/wireless/bcmdhd/bcmdhd.ko] undefined!
ERROR: "sunxi_wlan_set_power" [drivers/net/wireless/bcmdhd/bcmdhd.ko] undefined!
ERROR: "sunxi_wlan_get_oob_irq" [drivers/net/wireless/bcmdhd/bcmdhd.ko] undefined!
make[6]: *** [__modpost] Error 1
make[5]: *** [modules] Error 2
make[5]: Leaving directory `/home/danny/share/allwinner/sdk/A64/r18_tina/lichee/linux-4.4'
make[4]: *** [/home/danny/share/allwinner/sdk/A64/r18_tina/out/tulip-noma/compile_dir/target/linux-tulip-noma/linux-4.4.89/.image] Error 2
make[4]: Leaving directory `/home/danny/share/allwinner/sdk/A64/r18_tina/target/allwinner/tulip-noma'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/home/danny/share/allwinner/sdk/A64/r18_tina/target/allwinner'
make[2]: *** [target/allwinner/install] Error 2
make[2]: Leaving directory `/home/danny/share/allwinner/sdk/A64/r18_tina'
make[1]: *** [/home/danny/share/allwinner/sdk/A64/r18_tina/out/tulip-noma/staging_dir/target/stamp/.target_install] Error 2
make[1]: Leaving directory `/home/danny/share/allwinner/sdk/A64/r18_tina'
make: *** [world] Error 2
九、麦克风采集与喇叭播放放到I2S0上
static void sunxi_daudio_txctrl_enable(struct sunxi_daudio_info *sunxi_daudio,
int enable)
static void sunxi_daudio_rxctrl_enable(struct sunxi_daudio_info *sunxi_daudio,
int enable)
pinctrl_select_state
static int sunxi_daudio_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
最新文章
- Windows下安装pip(转自http://www.cnblogs.com/yuanzm/p/4089856.html)
- [Nginx] - PHP+FPM相关的配置
- ctype.h库函数----字符操作函数
- SSH中的jar包讲解(1)
- BZOJ1001 [BeiJing2006]狼抓兔子(平面图最小割转最短路)
- 让 cell 显示底部线条时,总是有几个线条被隐藏.
- mysql sql获取上条插入id,update影响行数
- [iOS翻译]《iOS 7 Programming Pushing the Limits》系列:你可能不知道的Objective-C技巧
- 透透彻彻IoC(你没有理由不懂!)
- MVC ViewEngineResult实际上是一种设计
- 创建 maven 本地仓库; (五)
- NDK(7)NDK debugging without root access
- 基于jquery扩展漂亮的分页控件(ajax)
- 公司内部SQUID代理HTTPS访问资料网站
- extend vg(pv,lv)use HotPlug Storage PV for VMI(ECC Env)
- 统计0到n之间1的个数[数学,动态规划dp](经典,详解)
- UML之时序图
- 阿里云—Gartner 2018 亚太区WAF魔力象限唯一云WAF提供商
- STlinkSWD模式连线方式
- 菜鸟学Java(十四)——Java反射机制(一)
热门文章
- pod install报错 [!] Error installing......
- windows下node.js安装配置
- Windows下Tesseract-OCR的安装
- iOS-AVFoundation实现二维码(ios7以上,转载)
- python基础--字符串、元组
- CodeForces 1251A --- Broken Keyboard
- Paid consultation (currently free 20190901)
- 【ARM-Linux开发】内核3.x版本之后设备树机制
- 最新 用友网络java校招面经 (含整理过的面试题大全)
- 如何在视图中启用thymeleaf