|
RK3288使用USB麦克风语音通话变声
发表于 2018-2-7 16:22:01
浏览:9788
|
回复:2
打印
只看该作者
[复制链接]
楼主
本帖最后由 Monster_Mr 于 2018-2-8 10:37 编辑
最近做一个任务,需要用rk3288进行语音通话,我们的方案是利用RK3288的USB口接一个USB麦克风来作为语音输入,本以为会很顺利,但是后面发现进行QQ电话和QQ视频的时候通话正常,双方都能正常听到声音,但是客户要求使用skype进行通话,使用skype通话的时候RK3288端可以正常听到对方声音,但是对方听到usb麦克风的声音却是很尖很快,查询使用的USB麦克风的采样率为16000,然后我就修改hardware/rockchip/audio/tinyalsa_hal下 audio_hw.h里的采样率,原来是44100,将它修改为16000,发现没有效果,声音还是很尖很快
#ifdef BOX_HAL
struct pcm_config pcm_config = {
.channels = 2,
.rate = 44100,
.period_size = 2048,
.period_count = 4,
.format = PCM_FORMAT_S16_LE,
};
struct pcm_config pcm_config_in = {
.channels = 2,
.rate = 16000,
.period_size = 1024,
.period_count = 4,
.format = PCM_FORMAT_S16_LE,
};
#else
struct pcm_config pcm_config = {
.channels = 2,
.rate = 44100,
.period_size = 1024,
.period_count = 4,
.format = PCM_FORMAT_S16_LE,
};
struct pcm_config pcm_config_in = {
.channels = 2,
.rate = 16000,
.period_size = 1024,
.period_count = 4,
.format = PCM_FORMAT_S16_LE,
};
#endif
在/sys/bus/usb/devices可以看到设备节点
使用skype通话时抓取内核信息如下:
<4>[ 264.056710] expect_data = 6,read_data = 5
<4>[ 264.056715] expect_data = 6,read_data = 5
<4>[ 264.056719] expect_data = 1,read_data = 0
<4>[ 264.056724] expect_data = 6,read_data = 5
<4>[ 264.056729] expect_data = 8,read_data = 7
<4>[ 264.056734] expect_data = 6,read_data = 5
<4>[ 264.056738] expect_data = 6,read_data = 10
<4>[ 264.056743] expect_data = 8,read_data = 7
<4>[ 264.056748] expect_data = 6,read_data = 5
<4>[ 264.056753] expect_data = 6,read_data = 12
<4>[ 264.056758] expect_data = 8,read_data = 7
<4>[ 264.056768] expect_data = 8,read_data = 15
<4>[ 264.056774] expect_data = 8,read_data = 7
<4>[ 264.056779] expect_data = 6,read_data = 5
<4>[ 264.056783] expect_data = 1,read_data = 0
现在是没有一点思路,请各位大神帮帮忙看看,指点小弟一二
|
|