完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
rk3399声卡调试可以通过查看 cat /proc/asound/cards 找到已经在dts中配置好的声卡
一、声卡配置项 正常情况下,如果声卡是通过 i2c 配置参数的,需要在设备树里配置 i2c 例如: &i2c1 { status = "okay"; i2c-scl-rising-time-ns = <140>; i2c-scl-falling-time-ns = <30>; es8316: es8316@11 { //声卡 #sound-dai-cells = <0>; compatible = "everest,es8316"; reg = <0x11>; clocks = <&cru SCLK_I2S_8CH_OUT>; clock-names = "mclk"; pinctrl-names = "default"; pinctrl-0 = <&i2s_8ch_mclk>; spk-con-gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>; }; }; 但是fm1288我们是通过串口配置参数的,所以这步可以不要,通过apk读写串口直接配置参数就可以。 除此之外,主要是配置设备树,以及驱动代码修改。 二、配置步骤 1.i2s配置 因为声卡要接 i2s ,所以先要打开 i2s &i2s0 { status = "okay"; rockchip,i2s-broken-burst-len; rockchip,playback-channels = <8>; rockchip,capture-channels = <8>; #sound-dai-cells = <0>; }; 2.声卡配置 因为是用串口配置参数,所以使用虚拟声卡 dummy_codec: dummy-codec { status = "okay"; compatible = "rockchip,dummy-codec"; #sound-dai-cells = <0>; clocks = <&cru SCLK_I2S_8CH_OUT>; clock-names = "mclk"; pinctrl-names = "default"; pinctrl-0 = <&i2s_8ch_mclk>; }; fm1288_sound: fm1288-sound { status = "okay"; compatible = "simple-audio-card"; //声卡通用驱动匹配 simple-audio-card,name = "rockchip,fm1288-sound"; //注册的声卡名 simple-audio-card,format = "i2s"; simple-audio-card,mclk-fs = <256>; //这两段是麦克风喇叭配置,因为麦克风喇叭直接接在了fm1288上所以不需要配置,若是接在rk3399上,则需要 /* simple-audio-card,widgets = "Microphone", "Mic Jack", "Headphone", "Headphone Jack"; simple-audio-card,routing = "Mic Jack", "MICBIAS1", "IN1P", "Mic Jack", "Headphone Jack", "HPOL", "Headphone Jack", "HPOR"; */ simple-audio-card,cpu { //cpu段audio主控 sound-dai = <&i2s0>; }; simple-audio-card,codec { //codec段,用于跟cpu绑定 sound-dai = <&dummy_codec>; }; }; 注册后的声卡可以看到 2.麦克风,喇叭配置 上述讲过麦克风喇叭因为没有接在rk3399平台上,所以此时在android层放录音是没有声音的,需要配置 fm1288声卡数据直接输出到 rk3399平台。 hardware/rockchip/audio/tinyalsa_hal/audio_hw.c 修改在麦克风,喇叭处添加fm1288声卡: static bool is_speaker_out_sound_card(char* buf) { /*add sound card name of speaker here*/ const char* NAME [] = { "rockchiprk", "realtekrt5651co", "rockchipes8316c", "rockchiprk809co", + "rockchipfm1288s", }; static bool is_mic_in_sound_card(char* buf) { /*add sound card name of mic here*/ static char* NAME [] = { "rockchiprk", "realtekrt5651co", "rockchipes8316c", "rockchiprk809co", + "rockchipfm1288s", }; 原作者:紫叶dk |
|
相关推荐
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1567 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
1790 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
4465 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-10 20:25 , Processed in 0.380997 second(s), Total 37, Slave 32 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号