页次: 1
有内核参考吗?声卡出来了就是一直播放失败,不知道哪里少改还是什么
https://www.bilibili.com/video/BV1pi421a7iZ/?spm_id_from=333.999.0.0
这个视频有教程
使用的linux6.1.54版本内核,移植论坛大佬提供的驱动。
目前现象是驱动加载后引脚上能有1.5V电压,声卡也能正常的显示出来。
内核启动时有以下输出:
[ 1.191964] ALSA device list:
[ 1.195021] #0: Loopback 1
[ 1.197913] #1: suniv Audio Codec
然后使用speaker-test播放时喇叭只有一个上电的吧嗒声。
在DMA和声卡驱动中加上日志输出,从日志看DMA和声卡都有正常工作。
按理speaker-test播放应该会输出噪音,不知道有没有哪位大佬知道什么情况?
附播放时DMA驱动和声卡驱动日志:
[ 491.569777] !!!sun4i_dma_prep_dma_cyclic,len:524288,per:131072, dir:1!!!
[ 491.577985]
[ 491.577985] !!!generate_ndma_promise,len:131072,src:-2118123520,dest:29506572!!!
[ 491.586836]
[ 491.586836] !!!sanitize_config!!!
[ 491.591623] dma dma0chan0: src burst 4, dst burst 4, src buswidth 2, dst buswidth 2
[ 491.599265]
[ 491.599265] !!!convert_burst_f1c100s!!!
[ 491.604553]
[ 491.604553] !!!convert_burst_f1c100s!!!
[ 491.609846]
[ 491.609846] !!!convert_buswidth!!!
[ 491.614707]
[ 491.614707] !!!set_src_data_width_f1c100s, w:1!!!
[ 491.620866]
[ 491.620866] !!!convert_buswidth!!!
[ 491.625727]
[ 491.625727] !!!set_dst_data_width_f1c100s, w:1!!!
[ 491.631888]
[ 491.631888] !!!generate_ndma_promise,len:131072,src:-2117992448,dest:29506572!!!
[ 491.640730]
[ 491.640730] !!!sanitize_config!!!
[ 491.645509] dma dma0chan0: src burst 4, dst burst 4, src buswidth 2, dst buswidth 2
[ 491.653145]
[ 491.653145] !!!convert_burst_f1c100s!!!
[ 491.658439]
[ 491.658439] !!!convert_burst_f1c100s!!!
[ 491.663732]
[ 491.663732] !!!convert_buswidth!!!
[ 491.668593]
[ 491.668593] !!!set_src_data_width_f1c100s, w:1!!!
[ 491.674753]
[ 491.674753] !!!convert_buswidth!!!
[ 491.679614]
[ 491.679614] !!!set_dst_data_width_f1c100s, w:1!!!
[ 491.685773]
[ 491.685773] !!!generate_ndma_promise,len:131072,src:-2117861376,dest:29506572!!!
[ 491.694615]
[ 491.694615] !!!sanitize_config!!!
[ 491.699393] dma dma0chan0: src burst 4, dst burst 4, src buswidth 2, dst buswidth 2
[ 491.707030]
[ 491.707030] !!!convert_burst_f1c100s!!!
[ 491.712324]
[ 491.712324] !!!convert_burst_f1c100s!!!
[ 491.717618]
[ 491.717618] !!!convert_buswidth!!!
[ 491.722478]
[ 491.722478] !!!set_src_data_width_f1c100s, w:1!!!
[ 491.728637]
[ 491.728637] !!!convert_buswidth!!!
[ 491.733497]
[ 491.733497] !!!set_dst_data_width_f1c100s, w:1!!!
[ 491.739657]
[ 491.739657] !!!generate_ndma_promise,len:131072,src:-2117730304,dest:29506572!!!
[ 491.748499]
[ 491.748499] !!!sanitize_config!!!
[ 491.753278] dma dma0chan0: src burst 4, dst burst 4, src buswidth 2, dst buswidth 2
[ 491.760915]
[ 491.760915] !!!convert_burst_f1c100s!!!
[ 491.766210]
[ 491.766210] !!!convert_burst_f1c100s!!!
[ 491.771504]
[ 491.771504] !!!convert_buswidth!!!
[ 491.776364]
[ 491.776364] !!!set_src_data_width_f1c100s, w:1!!!
[ 491.782523]
[ 491.782523] !!!convert_buswidth!!!
[ 491.787384]
[ 491.787384] !!!set_dst_data_width_f1c100s, w:1!!!
[ 491.793546]
[ 491.793546] !!!sun4i_dma_issue_pending!!!
[ 491.799013]
[ 491.799013] !!!__execute_vchan_pending!!!
[ 491.804480]
[ 491.804480] !!!find_and_use_pchan!!!
[ 491.809516]
[ 491.809516] !!!to_sun4i_dma_contract!!!
[ 491.814812]
[ 491.814812] !!!set_pchan_interrupt,half:1,num:0!!!
[ 491.821060]
[ 491.821060] !!!configure_pchan,-2118123520,29506572,131072,-2119401071!!!
[ 491.829307]
[ 491.829307] !!!sun4i_codec_start_playback!!!
[ 492.516437]
[ 492.516437] !!!sun4i_dma_interrupt!!!
[ 492.521605]
[ 492.521605] !!!half done interrupt, 1!!!
[ 492.527012]
[ 492.527012] !!!sun4i_dma_tx_status,ret:1,state!!!-1060102820
[ 492.534135]
[ 492.534135] !!!to_sun4i_dma_contract!!!
[ 492.539431]
[ 492.539431] !!!bytes:524288!!!
[ 493.199899]
[ 493.199899] !!!sun4i_dma_interrupt!!!
[ 493.205069]
[ 493.205069] !!!get_next_cyclic_promise!!!
[ 493.210544]
[ 493.210544] !!!configure_pchan,-2117992448,29506572,131072,-2119401071!!!
[ 493.218811]
[ 493.218811] !!!sun4i_dma_tx_status,ret:1,state!!!-1060102820
[ 493.225933]
[ 493.225933] !!!to_sun4i_dma_contract!!!
[ 493.231227]
[ 493.231227] !!!bytes:393216!!!
[ 493.900203]
[ 493.900203] !!!sun4i_dma_interrupt!!!
[ 493.905368]
[ 493.905368] !!!half done interrupt, 1!!!
[ 493.910776]
[ 493.910776] !!!sun4i_dma_tx_status,ret:1,state!!!-1060102820
[ 493.917901]
[ 493.917901] !!!to_sun4i_dma_contract!!!
[ 493.923199]
[ 493.923199] !!!bytes:393216!!!
[ 494.583653]
[ 494.583653] !!!sun4i_dma_interrupt!!!
[ 494.588824]
[ 494.588824] !!!get_next_cyclic_promise!!!
[ 494.594296]
[ 494.594296] !!!configure_pchan,-2117861376,29506572,131072,-2119401071!!!
[ 494.602562]
[ 494.602562] !!!sun4i_dma_tx_status,ret:1,state!!!-1060102820
[ 494.609684]
[ 494.609684] !!!to_sun4i_dma_contract!!!
[ 494.614979]
[ 494.614979] !!!bytes:262144!!!
[ 494.619511]
[ 494.619511] !!!sun4i_codec_stop_playback!!!
[ 494.625168]
[ 494.625168] !!!sun4i_dma_terminate_all!!!
[ 494.630641]
[ 494.630641] !!!set_pchan_interrupt,half:0,num:0!!!
[ 494.636892]
[ 494.636892] !!!release_pchan!!!
[ 494.641496]
[ 494.641496] !!!to_sun4i_dma_contract!!!
[ 494.646791]
[ 494.646791] !!!sun4i_dma_free_contract!!!
[ 494.652408]
[ 494.652408] !!!sun4i_codec_prepare!!!
[ 494.657576]
[ 494.657576] !!!sun4i_codec_prepare_playback!!!
使用sunxi-fel直接把uboot,kernel,rootfs烧录到内存中启动方法:
1.修改uboot配置
bootargs=“console=ttyS0,115200 earlyprink panic=5 rootwait root=/dev/ram0 rdinit=/linuxrc rw”
bootcommand=“bootz 0x80008000 0x80d00000 0x80c00000”
2.生成uImage格式的rootfs
cd /opt/buildroot-2018.08.2/output/target
find . | cpio -o -Hnewc |gzip -9 > ../rootfs.cpio.gz
mkimage -A arm -T ramdisk -C none -n uInitrd -d ../rootfs.cpio.gz /var/www/html/rootfs.cpio.gz.uImage
3.烧录文件
sudo ./sunxi-fel -p uboot ./u-boot-sunxi-with-spl.bin write 0x80c00000 ./suniv-f1c100s-licheepi-nano.dtb write 0x80008000 ./zImage write 0x80d00000 ./rootfs.cpio.gz.uImage
页次: 1