这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » 国产MCU » ROC-RK3308B-CC-PLUS如何修改DTS以支持PDM呢

共8条 1/1 1 跳转至

ROC-RK3308B-CC-PLUS如何修改DTS以支持PDM呢

工程师
2023-10-07 18:10:04     打赏

目前官方提供的roc-rk3308b-cc-plus dts 只有amic,没有dmic,需要如何修改dts才能支持pdm 麦克风阵列




关键词: ROC-RK3308B-CC-PLUS     DTS     P    

助工
2023-10-07 18:11:19     打赏
2楼

https://gitlab.com/firefly-linux ... c-dmic-pdm_emmc.dts 


工程师
2023-10-07 18:11:35     打赏
3楼

你好,这个是roc-rk3308b-cc的,不是roc-rk3308b-cc-plus,不过我也试过,使用该dts时,内核启动有问题,串口打印一直卡在starting kernel......


助工
2023-10-07 18:11:49     打赏
4楼

这个dts同样适用于ROC-RK3308B-CC-PLUS,因为ROC-RK3308B-CC使用的调试串口是UART2,ROC-RK3308B-CC-PLUS使用的是UART4。你可以将我发给你的dts,改下chosen和fiq_debugger

chosen {
                bootargs = "earlycon=uart8250,mmio32,0xff0e0000 swiotlb=1 console=ttyFIQ0 root=PARTLABEL=rootfs rootfstype=ext4 rootwait snd_aloop.index=7 snd_aloop.use_raw_jiffies=1 overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1";
        };


&fiq_debugger {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&uart4_xfer>;
    rockchip,serial-id = <4>;
};

&uart4 {
    status = "disabled";
}; 


工程师
2023-10-07 18:12:04     打赏
5楼

你好,我使用改后的dts,内核可以正常起来,但是使用arecord录音时,好像时钟有点问题

# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: rockchiprk3308v [rockchip,rk3308-vad], device 0: dailink-multicodecs multicodec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: UAC1Gadget [UAC1_Gadget], device 0: UAC1_PCM [UAC1_PCM]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 7: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 7: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 7/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
#

录音
# arecord -f dat -t wav -r 48000 -c 8 -D hw:0,0 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Channels 8
[  142.674604] clk_pdm_frac parent_rate(589823999) is low than rate(61440000)*20, fractional div is not allowed
[  142.676548] dma-pl330 ff2d0000.dma-controller: pl330_submit_req:1680 Try increasing mcbufsz (372/256)
[  142.676603] dma-pl330 ff2d0000.dma-controller: fill_queue:2211 Bad Desc(3)
[  142.676627] dma-pl330 ff2d0000.dma-controller: pl330_submit_req:1680 Try increasing mcbufsz (372/256)
[  142.676642] dma-pl330 ff2d0000.dma-controller: fill_queue:2211 Bad Desc(3)


助工
2023-10-07 18:12:13     打赏
6楼

windows装个软件Audacity,分析下音频文件中,8个通道是否有通道录到音了,一般有波形就说明通道有录取到音了


工程师
2023-10-07 18:12:23     打赏
7楼

没有波形


助工
2023-10-07 18:12:32     打赏
8楼

检查下硬件了,可以录音的时候,用示波器测量下时钟线和数据线是否有波形出来

录音命令:
arecord -D 6mic_loopback -r 16000 -f S16_LE /tmp/record.wav -c 8
或者arecord -D hw:0,0 -r 16000 -f S16_LE -c 8 /tmp/record.wav 


共8条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]