cp r18/lichee/linux-4.4/sound/soc/codecs/ac108.* a64/linux-3.10/sound/soc/codecs/
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
https://www.cnblogs.com/zhangshenghui/p/11008115.html
查看A64开发板声卡驱动
在linux-3.10内核代码中搜索audiocodec关键字,查找到如下:
推断在sunxi_sndcodec.c中,查看linux-3.10\sound\soc\sunxi\目录下Kconfig和Makefile查看内核配置信息打开。
linux-3.10/arch/arm64/boot/dts/sun50iw1p1.dtsi
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
参考网站:
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就可以连接了。
备份:
改后:
amixer cset name='Earpiece Switch' 'on'
amixer cset name='earpiece volume' '31'
aplay music_16_2.wav &
喇叭和耳机同时播放,Earpiece Switch控制开关,earpiece volume控制音量
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
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)
手机扫一扫
移动阅读更方便
你可能感兴趣的文章