2303
- 收藏
- 点赞
- 分享
- 举报
NVP1918C音频的顺序是怎么弄得。
NVP1918C音频顺序是怎么回事,音频通道始终是乱的。芯片手册上的介绍如下
需要的是4路通道的音频 对应视频通道的5,6,7,8四个通道。但是音频始终存在问题 ,无法把音频第通道改到对应的视频通道代码如下:
void audio_init(unsigned char dec, unsigned char ch_num, unsigned char samplerate, unsigned char bits)
{
gpio_i2c_write(dec, 0xff, 0x01);
if( (dec == 0x60) || (dec == 0x64))
{
gpio_i2c_write(dec, 0x06, 0x1a);
gpio_i2c_write(dec, 0x07, 0x80|(samplerate<<3)|(bits<<2)); //Rec I2C 16K 16bit : master
if(4 == ch_num)
{
gpio_i2c_write(dec, 0x06, 0x1b);
gpio_i2c_write(dec, 0x08, 0x01);
//gpio_i2c_write(dec, 0x0a, 0x45);
//gpio_i2c_write(dec, 0x0e, 0x32);
//gpio_i2c_write(dec, 0x09, 0x03);
//gpio_i2c_write(dec, 0x0e, 0x00);
}
else if(8 == ch_num)
{
gpio_i2c_write(dec, 0x06, 0x1b);
gpio_i2c_write(dec, 0x08, 0x02);
//gpio_i2c_write(dec, 0x0e, 0x54);
//gpio_i2c_write(dec, 0x0f, 0x76);
//gpio_i2c_write(dec, 0x09, 0x07);
//gpio_i2c_write(dec, 0x0e, 0x00);
//gpio_i2c_write(dec, 0x0a, 0x54);//0x54
//gpio_i2c_write(dec, 0x0b, 0x76);//0x76
//gpio_i2c_write(dec, 0x0c, 0x10);
//gpio_i2c_write(dec, 0x0d, 0x32);
}
else if(16 == ch_num)
{
gpio_i2c_write(dec, 0x06, 0x1b);
gpio_i2c_write(dec, 0x08, 0x03);
//gpio_i2c_write(dec, 0x0e, 0x54);
//gpio_i2c_write(dec, 0x0f, 0x76);
//gpio_i2c_write(dec, 0x09, 0x0f);
//gpio_i2c_write(dec, 0x0e, 0x0f);
}
gpio_i2c_write(dec, 0x13, 0x80|(samplerate<<3)|(bits<<2)); // PB I2C 8k 16bit : master
gpio_i2c_write(dec, 0x23, 0x10); // Audio playback out
}
else
{
gpio_i2c_write(dec, 0x06, 0x19);
gpio_i2c_write(dec, 0x07, 0x00|(samplerate<<3)|(bits<<2)); //Rec I2C 16K 16bit : master
gpio_i2c_write(dec, 0x13, 0x00|(samplerate<<3)|(bits<<2)); // PB I2C 8k 16bit : master
}
gpio_i2c_write(dec, 0x00, 0);//add by ssy
gpio_i2c_write(dec,0x09,(gpio_i2c_read(dec,0x09) & 0xf3)
|| 0x40);
gpio_i2c_write(dec, 0x01, 0x88); // Audio input gain init
gpio_i2c_write(dec, 0x02, 0x88);
gpio_i2c_write(dec, 0x03, 0x88);
gpio_i2c_write(dec, 0x04, 0x88);
gpio_i2c_write(dec, 0x05, 0x88);
gpio_i2c_write(dec, 0x22, 0x80); //aogain
gpio_i2c_write(dec, 0x24, 0x14); //set mic_1's data to i2s_sp left channel
gpio_i2c_write(dec, 0x25, 0x15); //set mic_2's data to i2s_sp right channel
}
需要的是4路通道的音频 对应视频通道的5,6,7,8四个通道。但是音频始终存在问题 ,无法把音频第通道改到对应的视频通道代码如下:
void audio_init(unsigned char dec, unsigned char ch_num, unsigned char samplerate, unsigned char bits)
{
gpio_i2c_write(dec, 0xff, 0x01);
if( (dec == 0x60) || (dec == 0x64))
{
gpio_i2c_write(dec, 0x06, 0x1a);
gpio_i2c_write(dec, 0x07, 0x80|(samplerate<<3)|(bits<<2)); //Rec I2C 16K 16bit : master
if(4 == ch_num)
{
gpio_i2c_write(dec, 0x06, 0x1b);
gpio_i2c_write(dec, 0x08, 0x01);
//gpio_i2c_write(dec, 0x0a, 0x45);
//gpio_i2c_write(dec, 0x0e, 0x32);
//gpio_i2c_write(dec, 0x09, 0x03);
//gpio_i2c_write(dec, 0x0e, 0x00);
}
else if(8 == ch_num)
{
gpio_i2c_write(dec, 0x06, 0x1b);
gpio_i2c_write(dec, 0x08, 0x02);
//gpio_i2c_write(dec, 0x0e, 0x54);
//gpio_i2c_write(dec, 0x0f, 0x76);
//gpio_i2c_write(dec, 0x09, 0x07);
//gpio_i2c_write(dec, 0x0e, 0x00);
//gpio_i2c_write(dec, 0x0a, 0x54);//0x54
//gpio_i2c_write(dec, 0x0b, 0x76);//0x76
//gpio_i2c_write(dec, 0x0c, 0x10);
//gpio_i2c_write(dec, 0x0d, 0x32);
}
else if(16 == ch_num)
{
gpio_i2c_write(dec, 0x06, 0x1b);
gpio_i2c_write(dec, 0x08, 0x03);
//gpio_i2c_write(dec, 0x0e, 0x54);
//gpio_i2c_write(dec, 0x0f, 0x76);
//gpio_i2c_write(dec, 0x09, 0x0f);
//gpio_i2c_write(dec, 0x0e, 0x0f);
}
gpio_i2c_write(dec, 0x13, 0x80|(samplerate<<3)|(bits<<2)); // PB I2C 8k 16bit : master
gpio_i2c_write(dec, 0x23, 0x10); // Audio playback out
}
else
{
gpio_i2c_write(dec, 0x06, 0x19);
gpio_i2c_write(dec, 0x07, 0x00|(samplerate<<3)|(bits<<2)); //Rec I2C 16K 16bit : master
gpio_i2c_write(dec, 0x13, 0x00|(samplerate<<3)|(bits<<2)); // PB I2C 8k 16bit : master
}
gpio_i2c_write(dec, 0x00, 0);//add by ssy
gpio_i2c_write(dec,0x09,(gpio_i2c_read(dec,0x09) & 0xf3)
|| 0x40);
gpio_i2c_write(dec, 0x01, 0x88); // Audio input gain init
gpio_i2c_write(dec, 0x02, 0x88);
gpio_i2c_write(dec, 0x03, 0x88);
gpio_i2c_write(dec, 0x04, 0x88);
gpio_i2c_write(dec, 0x05, 0x88);
gpio_i2c_write(dec, 0x22, 0x80); //aogain
gpio_i2c_write(dec, 0x24, 0x14); //set mic_1's data to i2s_sp left channel
gpio_i2c_write(dec, 0x25, 0x15); //set mic_2's data to i2s_sp right channel
}
我来回答
回答0个
时间排序
认可量排序
暂无数据
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
02019-11-05 19:47:47
-
2016-06-28 10:55:37
-
2016-09-18 18:06:01
-
592015-04-16 14:43:19
-
2015-10-08 15:24:09
-
2015-04-21 09:51:45
-
2016-06-14 08:38:27
-
2019-01-22 14:51:50
-
2016-09-20 08:43:54
-
2016-09-28 11:44:16
-
2018-02-24 18:47:01
-
2018-02-24 18:59:12
-
2016-09-23 08:41:05
-
2016-07-24 17:02:14
-
2016-02-22 15:16:41
-
2016-09-27 10:00:59
-
2015-11-03 16:39:36
-
2015-07-27 22:29:44
-
2016-03-08 14:04:13
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
50如何获取vpss chn的图像修改后发送至vo
-
5FPGA通过Bt1120传YUV422数据过来,vi接收不到数据——3516dv500
-
50SS928 运行PQtools 拼接 推到设备里有一半画面会异常
-
53536AV100的sample_vdec输出到CVBS显示
-
10海思板子mpp怎么在vi阶段改变视频数据尺寸
-
10HI3559AV100 多摄像头同步模式
-
9海思ss928单路摄像头vio中加入opencv处理并显示
-
10EB-RV1126-BC-191板子运行自己编码的程序
-
10求HI3519DV500_SDK_V2.0.1.1
-
5有偿求HI3516DV500 + OV5647驱动
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认