刚开始我实现主线的uboot和主线的内核发现dts中缺少很多设备,根本没法使用,只能简单测试一下。
后来转向了 BSP kernel
使用@晕哥 提供的 f1c100s_c600sdk_16M_micropython.bin 启动发现有一个声卡,但是该镜像文件系统中没有alsa工具。
为了简便处理,我直接把晕哥这个镜像中的rootfs更换成我的带有alsa工具的rootfs。
替换rootfs后的镜像如下:
https://whycan.com/files/members/961/f1c100.rar
发现 aplay能使用的 rootfs中的 /usr下已经有一个400HZ的测试音频,但是发现arecord 不能录音不知道内核默认是line in 还是 mic 我两个都测试了没有声音,大家一起测试解决问题。
最近编辑记录 fly_to_bluesky@126.com (2018-06-20 11:10:50)
离线
@晕哥,昨天启动的问题已经搞定了。
是我rootfs的地址错误了,修改正确了,就能正常启动了。
现在就是声卡不能正常录音,我使用alsamix配置了mic 开启,还是不能正常录音。
离线
@晕哥 麻烦您了
离线
@晕哥,非常感谢,问题已经解决了,确实是我的配置问题。
amixer list 打出来大家看看。
Simple mixer control 'ADC FM volume',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 7
Mono: 0 [0%]
Simple mixer control 'ADC INPUT GAIN control',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 7
Mono: 0 [0%]
Simple mixer control 'ADC MIC Boost AMP en',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'ADC MIC Boost AMP gain control',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 7
Mono: 0 [0%]
Simple mixer control 'ADC PA speed select',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'ADC mixer mute for FML',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'ADC mixer mute for FMR',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'ADC mixer mute for left ouput',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'ADC mixer mute for linein',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'ADC mixer mute for mic',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'ADC mixer mute for right ouput',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'COS slop time control for Anti-pop',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 3
Mono: 1 [33%]
Simple mixer control 'LINEIN GAIN control',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 7
Mono: 0 [0%]
Simple mixer control 'MICIN GAIN control',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 7
Mono: 3 [43%]
Simple mixer control 'dac digital volume',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 63
Mono: 0 [0%]
Simple mixer control 'dac: left analog output mixer en',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'dac: left chanle en',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'dac: left hpout to right hpout',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'dac: left mixer mute: FM',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'dac: left mixer mute: left dac',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'dac: left mixer mute: linein',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'dac: left mixer mute: mic',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'dac: left mixer mute: right dac',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'dac: left mute',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'dac: right analog output mixer en',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'dac: right chanel en',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'dac: right hpout to left hpout',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'dac: right mixer mute: FM',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'dac: right mixer mute: left dac',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'dac: right mixer mute: linein',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'dac: right mixer mute: mic',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'dac: right mixer mute: right dac',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'dac: right mute',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'head phone power',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'head phone volume',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 63
Mono: 63 [100%]
Simple mixer control 'hp left source select: 0-dac, 1-mixer',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'hp right source select: 0-dac, 1-mixer',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
amixer 参数调整后不能自动保存的,需要特别保存一下。
alsactl store -f /var/lib/alsa/asound.state
重启后alsactl restore -f /var/lib/alsa/asound.state
离线
多谢 @fly_to_bluesky 分享!
可以详细列出来调用了哪些命令吗?
这样方便后来到这个帖子的同学参考.
直接把我保存好的文件发到这里:
https://whycan.com/files/members/961/asound.zip
下载解压后 直接restore就可以了
我上面提供的镜像里面已经有lsz 和 lrz工具,可以通过串口使用zmodern传进去。
离线
谢楼主分享!
测试可用
离线
@fly_to_bluesky
我想请教您一个问题,就是我在linux4.19的内核配置中应该怎么配置才能够配置好荔枝派nano的测试声卡呢?
我怎么配置都配置不出你的镜像中:
#cat /proc/asound/cards
0 [audiocodec ]: audiocodec - audiocodec
audiocodec
而我配来配去都没有出现这个声卡的信息,下面是我的声卡信息:
#cat /proc/asound/cards
0 [Dummy ] : Dummy - Dummy
Dummy 1
1 [Loopback ] : Loopback - Loopback
Loopback 1
2 [VirMIDI ] : VirMIDI - VirMIDI
Virtual MIDI Card 1
想请教下我的内核需要怎么配置的呢?还是需要自己编写驱动的呢?
离线
@fly_to_bluesky
我想请教您一个问题,就是我在linux4.19的内核配置中应该怎么配置才能够配置好荔枝派nano的测试声卡呢?
我怎么配置都配置不出你的镜像中:
#cat /proc/asound/cards
0 [audiocodec ]: audiocodec - audiocodec
audiocodec
而我配来配去都没有出现这个声卡的信息,下面是我的声卡信息:
#cat /proc/asound/cards
0 [Dummy ] : Dummy - Dummy
Dummy 1
1 [Loopback ] : Loopback - Loopback
Loopback 1
2 [VirMIDI ] : VirMIDI - VirMIDI
Virtual MIDI Card 1
想请教下我的内核需要怎么配置的呢?还是需要自己编写驱动的呢?
前面讨论的是 bsp linux 3.10 的声卡驱动, 与 linux 4.19 的套路不同。
离线
@晕哥
晕哥,那linux4.19的话需要怎么配置的呢?
离线
@晕哥
晕哥在官网上面没有呢,目前我的情况是在linux 4.19 上 make ARCH=arm menuconfig 后,到了选择sound card 时就不知选择哪个驱动和声卡才能够适应荔枝派nano的使用呢?想请教下晕哥,我该如何选择呢,或者是如果在linux3.10里我应该选择哪个声卡配置呢?
离线
@晕哥
晕哥,想问下我按照上面的C600的套路,因为上面的C600的帖子上没有配置声卡的问题,是不是说C600的套路里的默认声卡配置已经能够实现在f1c100s上发出声音的了?
离线
@晕哥
好的,我试一下用C600的套路
离线
@晕哥
晕哥,我想问下按照C600的套路,配置时输入:./build.sh config ,之后出现
All available boards:
0. aw_w01
1. aw_w02
2. evb
3. qc
对于荔枝派f1c100这块板子需要选择哪个选项的呢?
离线
@晕哥
晕哥你好,目前我按照C600的套路来,我能得到的dtb文件是sunivw1p1-evb.dtb,但是没有能够得到suniv-f1c100s-licheepi-nano.dtb;因为之前用的是linux4.19和打上补丁后就能够得到suniv-f1c100s-licheepi-nano.dtb,现在使用linux3.10就没办法得到了,这个问题我该怎么解决呢?
离线
@晕哥
晕哥你好,目前我按照C600的套路来,我能得到的dtb文件是sunivw1p1-evb.dtb,但是没有能够得到suniv-f1c100s-licheepi-nano.dtb;因为之前用的是linux4.19和打上补丁后就能够得到suniv-f1c100s-licheepi-nano.dtb,现在使用linux3.10就没办法得到了,这个问题我该怎么解决呢?
套路不同,有 sunivw1p1-evb.dtb 就可以了.
离线
@晕哥
晕哥,在使用C600的套路里面我遇到了几个问题呢,不知道怎么解决,请大神分析下:
1.单独编译linux3.10时,想提取出dtb和zImage文件,但是make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4,之后出现了错误:
include/linux/compiler-gcc.h:106:1: fatal error: linux/compiler-gcc7.h: No such file or directory
#include gcc_header(__GNUC__)
这个我尝试安装了gcc7.0还是没能解决。
2.为什么按照C600的套路我,我把镜像下载到板子之中,输入cat /proc/asound/cards之后还是提示no soundcards
请问下这个问题是不是跟我没有将alsa库移植进系统有关呢?
3.晕哥我还想请教下在C600的套路里面我想修改根文件系统,但是不知在哪个地方可以修改根文件系统?
离线
@晕哥
晕哥,是的,我是参考这个帖子的呢
离线
标记一下,等有空了按照这个方法测试下
离线