rk_mpi_ao_test -i /data/test1.wav --sound_card_name=hw:0,0 --device_ch=2 --device_rate=16000 --input_rate=16000 --input_ch=2
rk_mpi_ai_test --sound_card_name=hw:0,0 --device_rate=16000 --device_ch=2 --out_rate=16000 --out_ch=2 --output=/tmp
因为rkipc本身在后台运行,占用了录音的通道,导致自己想要用命令行录音时一直显示设备不存在或者在忙,但是当时/dev/snd/pcmC0D0c这个设备通过ls确认找不到
开发板打开失败:
rk_mpi_ai_test --sound_card_name=hw:0,0 --device_rate=16000 --device_ch=2 --ou
t_rate=16000 --out_ch=2 --output=/tmp
cmd parse result:
input file name : (null)
output file name : /tmp
loop count : 1
channel number : 1
open sound rate : 16000
record data rate : 16000
sound card channel : 2
output channel : 2
bit_width : 16
frame_number : 4
frame_length : 1024
sound card name : hw:0,0
device id : 0
set volume curve : 0
set volume : 100
set mute : 0
set track_mode : 0
get volume : 0
get mute : 0
get track_mode : 0
data read enable : 0
aed enable : 0
bcd enable : 0
buz enable : 0
vqe gap duration (ms) : 16
vqe enable : 0
get vqe result : 0
vqe config file : (null)
dump algo pcm data : 0
test mode : 0
aenc file name : (null)
input codec name : (null)
rockit log path (null), log_size = 0, can use export rt_log_path=, export rt_log_size= change
log_file = (nil)
RTVersion 17:07:09-746 {dump :064} ---------------------------------------------------------
RTVersion 17:07:09-746 {dump :065} rockit version: git-db9cb4065 Tue Jan 30 20:48:32 2024 +0800
RTVersion 17:07:09-746 {dump :066} rockit building: built- 2024-01-30 20:51:04
RTVersion 17:07:09-746 {dump :067} ---------------------------------------------------------
(null) 17:07:09-746 {log_level_init :207}
please use echo name=level > /tmp/rt_log_level set log level
name: all cmpi mb sys vdec venc rgn vpss vgs tde avs wbc vo vi ai ao aenc adec
log_level: 0 1 2 3 4 5 6
rockit default level 4, can use export rt_log_level=x, x=0,1,2,3,4,5,6 change
(null) 17:07:09-747 {read_log_level :098} text is all=4
(null) 17:07:09-747 {read_log_level :100} module is all, log_level is 4
RKSockServer 17:07:09-748 {initNetServer :088} bind failed, reason: Address already in use
cmpi 17:07:09-749 {sys_runtime_librar:089} success to open /dev/mpi/valloc(1), fd(4)
cmpi 17:07:09-750 {sys_runtime_librar:089} success to open /dev/mpi/vsys(2), fd(5)
cmpi 17:07:09-750 {sys_runtime_librar:089} success to open /dev/mpi/vrgn(3), fd(6)
cmpi 17:07:09-750 {sys_runtime_librar:089} success to open /dev/mpi/venc(4), fd(8)
cmpi 17:07:09-751 {sys_runtime_librar:089} success to open /dev/mpi/vpss(6), fd(9)
cmpi 17:07:09-752 {sys_runtime_librar:089} success to open /dev/mpi/vvi(8), fd(10)
cmpi 17:07:09-752 {sys_runtime_librar:089} success to open /dev/mpi/avs(17), fd(11)
cmpi 17:07:09-752 {sys_runtime_librar:089} success to open /dev/mpi/vrga(18), fd(12)
cmpi 17:07:09-752 {sys_runtime_librar:089} success to open /dev/mpi/venc(20), fd(13)
cmpi 17:07:09-753 {sys_runtime_librar:089} success to open /dev/mpi/aiisp(23), fd(14)
cmpi 17:07:09-755 {main :1778} start running loop count = 0
(null) 17:07:09-756 {monitor_log_level :149} #Start monitor_log_level thread, arg:(nil)
RKAiChn 17:07:09-758 {prepareGraph :213} check enabled - file_read:0 vqe:0 aed:0 bcd:0 buz:0 gbs:0
cannot open device '/dev/snd/pcmC0D0c': Device or resource busy
TinyAlsaHardWare 17:07:09-761 {tinyalsa_pcm_get_e:052} fail to tinyalsa_open_snd, error:cannot open device '/dev/snd/pcmC0D0c': Device or resource busy
RTTaskNodeBase 17:07:09-761 {prepareForRun :485} task node 0 open failed!
RTTaskGraph 17:07:09-761 {prepareNodeForRun :295} failed to prepareNodeForRun(id=0)! interrupt running
RTTaskGraph 17:07:09-764 {prepare :364} task graph prepare for run failed!, ret=-10
RKAiChn 17:07:09-764 {prepare :350} ai graph prepare failed, ret = -10
cmpi 17:07:09-765 {test_init_mpi_ai :689} ai enable channel fail, aiChn = 0, reason = a00a8010
cmpi 17:07:09-765 {main :1781} unit_test_mpi_ai failed: -1
(null) 17:07:10-761 {monitor_log_level :190} monitor_log_level quit
后来第二天想起这件事儿,然后把rkipc干掉,再次录音,就可以了
录音成功的日志如下
[root@luckfox ]# rk_mpi_ai_test --sound_card_name=hw:0,0 --device_rate=16000 --d
evice_ch=2 --out_rate=16000 --out_ch=2 --output=/tmp
cmd parse result:
input file name : (null)
output file name : /tmp
loop count : 1
channel number : 1
open sound rate : 16000
record data rate : 16000
sound card channel : 2
output channel : 2
bit_width : 16
frame_number : 4
frame_length : 1024
sound card name : hw:0,0
device id : 0
set volume : 100
set mute : 0
set track_mode : 0
get volume : 0
get mute : 0
get track_mode : 0
aed enable : 0
bcd enable : 0
buz enable : 0
vqe gap duration (ms) : 16
vqe enable : 0
vqe config file : (null)
dump algo pcm data : 0
test mode : 0
aenc file name : (null)
input codec name : (null)
rockit log path (null), log_size = 0, can use export rt_log_path=, export rt_log_size= change
log_file = (nil)
RTVersion 12:00:23-615 {dump :064} ---------------------------------------------------------
RTVersion 12:00:23-616 {dump :065} rockit version: git-8cb4d25b8 Tue Feb 28 11:12:39 2023 +0800
RTVersion 12:00:23-616 {dump :066} rockit building: built- 2023-02-28 15:23:19
RTVersion 12:00:23-616 {dump :067} ---------------------------------------------------------
rockit default level 4, can use export rt_log_level=x, x=0,1,2,3,4,5,6 change
(null) 12:00:23-617 {read_log_level :093} text is all=4
(null) 12:00:23-617 {read_log_level :095} module is all, log_level is 4
(null) 12:00:23-620 {monitor_log_level :144} #Start monitor_log_level thread, arg:(nil)
cmpi 12:00:23-627 {main :1295} start running loop count = 0
RKAiChn 12:00:23-628 {setAedAttr :789} pstAedConfig = (nil), set mAedEnable = false
RKAiChn 12:00:23-628 {setBcdAttr :852} pstBcdConfig = (nil), set mBcdEnable = false
RKAiChn 12:00:23-628 {setBuzAttr :915} pstBuzConfig = (nil), set mBuzEnable = false
RKAiChn 12:00:23-628 {setGbsAttr :979} pstGbsConfig = (nil), set mGbsEnable = false
RKAiChn 12:00:23-628 {setVqeAttr :1045} pstVqeConfig = (nil), set mVqeEnable = false
RKAiChn 12:00:23-628 {prepareGraph :221} check enabled - vqe:0 aed:0 bcd:0 buz:0 gbs:0
RTFlowGraph 12:00:23-633 {setMaxInputStreamQ:287} ai: Illegal operation, no input port exists.
RKAiChn 12:00:23-747 {setVqeEnable :1019} not support veq algo
cmpi 12:00:23-749 {commandThread :829} test info : mute = 0, volume = 100
cmpi 12:00:23-751 {saveFile :708} create file(/tmp/cap_out.pcm) succeed