我最近在用ccs 的sdk的样例学习,主要在学wifi和音频部分,请问有相关接口文档手册吗?
用的是cc3200,
在学习这几个工程的时候,很多api借口不知道具体的功能,有比较清晰的借口手册嘛?
您可以在安装文件夹 C:\ti\CC3200SDK\cc3200-sdk\docs\simplelink_api 内的programmers_guide进行查找
Susan Yang
您可以在安装文件夹 C:\ti\CC3200SDK\cc3200-sdk\docs\simplelink_api 内的programmers_guide进行查找
但是当我遇到诸如此类的函数的时候,无法找到他的实现(只能找到头文件),以至于我并不清楚他的入参和返回值的含义。
programmers_guide中也无处可查,希望能继续得到您的帮助
关于音频部分,强烈建议研究cc3200-sdk\example\wifi_audio_app例子,这个是语音双向传输的例子,通过CC3200的硬件IIS接口进行数据的无线传输,通过驱动CODEC芯片进行编解码工作,
// 主函数的介绍如下 MAIN FUNCTION
//By default example come up in loopback mode means it will read data on MIC and playback to speaker.
//Verify whether device coming up with loopback mode or not for further debugging. For loopback test use only one LP at a time.
//发射板的 SW3 键
//接收板的 SW2 键
//Now follow below sequence once both the LP acquired the IP:
//1. Ensure Line-IN and Line-OUT points are connected appropriately on both the launch pads.
//2. Upon successful connection to AP, press SW2 on LP1. Red LED will switch off on LP1.
//3. Once LP1 connects to LP2, the red LED on LP2 will switch off.
//4. Now press SW2 on LP2 and SW3 on LP1. Red LED will switch on LP2. ---操作步骤有问题,按照下面的方法操作!
//The demo in the SDK does support simultaneous bi-directional (full duplex) audio. This is achieved by exercising the
//two parallel paths (as described below) for the audio-in and audio-out paths.
//
//Audio-in jack -> 3200 McASP Data pin 1 -> I2S serializer 1 -> Audio Tx Task -> Audio transmit socket --- Over the air
// |
// V
//Audio-out jack <- 3200 McASP Data pin 0 <- I2S serializer 0 <- Audio Rx Task <- Audio receive socket --- Over the air
//
//Each of the paths are simplex individually but together it achieves the full duplex audio transfer.
//------------------------run in 44.1kHz or 48kHz instead of 16kHz (default)--------------------
//You need to make following changes for 44.1/48 KHz 16-bit stereo PCM:
//
//1. Add below code lines in AudioCodecConfig() after “if(bitClk == 512000)”
//
//else if(bitClk == 1536000 || bitClk == 1411200)
//{
//AudioCodecPageSelect(TI3254_PAGE_0);
//
//AudioCodecRegWrite(TI3254_CLK_MUX_REG, 0x03); // PLL Clock is CODEC_CLKIN
//AudioCodecRegWrite(TI3254_CLK_PLL_P_R_REG, 0x91); // PLL is powered up, P=1, R=1
//AudioCodecRegWrite(TI3254_CLK_PLL_J_REG, 0x38); // J=56
//AudioCodecRegWrite(TI3254_CLK_PLL_D_MSB_REG, 0x00); // D = 0
//
//AudioCodecRegWrite(TI3254_CLK_NDAC_REG, 0x82); // NDAC divider powered up, NDAC = 2
//AudioCodecRegWrite(TI3254_CLK_MDAC_REG, 0x87); // MDAC divider powered up, MDAC = 7
//AudioCodecRegWrite(TI3254_DAC_OSR_MSB_REG, 0x00); // DOSR = 0x0080 =
//AudioCodecRegWrite(TI3254_DAC_OSR_LSB_REG, 0x80); // DOSR = 0x0080 = 128
//
//AudioCodecRegWrite(TI3254_CLK_NADC_REG, 0x82); // NADC divider powered up, NADC = 2
//AudioCodecRegWrite(TI3254_CLK_MADC_REG, 0x87); // MADC divider powered up, MADC = 7
//AudioCodecRegWrite(TI3254_ADC_OSR_REG, 0x80); // AOSR = 128 ((Use with PRB_R1 to PRB_R6, ADC Filter Type A)
//}
//
//2. In AudioCaptureRendererConfigure() replace 512000 with 1411200 for 44.1KHZ and 1536000 for 48KHz
//
//3. In main.c pass 44100 or 48000 in place of 16000 as argument for AudioCodecConfig()
//4. In main.c pass 44100 or 48000 in place of 16000 as argument for AudioCaptureRendererConfigure()
//
//As don't have expertise on Audio codec, so it is best to post query in TI-Audio codec((AIC3254) ) forum to know how to configure PLL related configuration.
//特别注意:
//(1)PLAY_WATERMARK宏定义修改 reducing latency or delayed playback 回放延时问题--注意需要修改两个地方!network+pcm_handler
// 详见(Wifi Audio App 8k sample rate delayed playback) https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/p/394864/1400223#1400223
//(2)Unicast通过mDNS获取目的IP地址进行一对一的音频播放,而MuitiCast则采用mDNS的IP地址224.0.0.251进行广播音频数据
//(3)mDNS使用服务器开启及客户端请求问题
// 详见(CC3200 WiFi Audio App) http://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/438276
// 详见(How 2 CC3200s get each other IP address?) http://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/p/400118/1415303#1415303
//(4)回放模式设置
// (Using Audio booster pack wifi demo app example CC3200) http://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/390582#pi239031348=2&pi239031350=3
//(5)操作步骤
//<1>按下复位键(SW1)
//<2>按下发射板的 SW3 键,绿灯长亮
//<3>再按下接收板的 SW2 键,黄灯长亮,红灯也长亮
//此时发射板的红灯及黄灯熄灭,绿灯常亮表示发射板正在传输音频,接收板绿灯熄灭,黄灯及红灯常亮表示正在接收音频
//(6)关于双向音频流控制
//(does the wifi audio sample really running on bidirectional?) http://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/402341
// 在(5)基础上
// <4>再按下发射板的SW2键,此时绿灯和黄灯亮
// <5>再按下接收板的SW3键,此时绿灯,黄灯和红灯都亮,而且之前的发射板的三个灯也全亮。---双向语音设置成功!
//(7)注意在手机播放音频信号,用CC3200无线接收播放会有"叭叭叭"的杂音,是由于手机射频信号造成的!将手机设置为飞行模式再次播放杂音消除!
//(8)关于无线UDP数据量问题
// UDP每包发送1kBytes数据,16kHz采样率*16bit*2通道=64kBytes字节/s 每秒采集16k次=32k个高低电平,高低电平=左右声道,每个声道16bit数据表示,
// 则有每秒32k*2Bytes=64kBytes数据流!也就大约512kbps!如果采用44.1kHz则会产生大约1.5Mbps带宽
// 一般音频mp3的音质标准品质为128Kbps约4MB/首 超高品质为320Kbps约10MB/首
//(9)连接AP的方式采用直接连接的方式,其他路由器注意名称和加密密码的修改!
//操作步骤
//首先设置路由器:
#define SSID_NAME "CC3200AP" /*cc3200demo AP SSID */
#define SECURITY_TYPE SL_SEC_TYPE_WPA_WPA2 /* SL_SEC_TYPE_OPEN Security type (OPEN or WEP or WPA*/
#define SECURITY_KEY "12345678"
//<1>按下复位键(SW1)
//<2>按下发射板的 SW3 键,绿灯长亮
//<3>再按下接收板的 SW2 键,黄灯长亮,红灯也长亮 ---单向语音设置成功!
//<4>再按下发射板的SW2键,此时绿灯和黄灯亮
//<5>再按下接收板的SW3键,此时绿灯,黄灯和红灯都亮,而且之前的发射板的三个灯也全亮。---双向语音设置成功!
// 通过板卡上的MIC和插入的耳机就也进行语音双向传输了
你好,我操作的时候发现这个是针对立体声的,当我用单声道的时候就不适用了,我该如何修改或者您有什么比较好例子可以给我参考一下?(当我的频率要求是44.1hz并且是单声道)
linda lee 你好
请问单声道问题有解决吗,我们也遇到了类似问题。
no
我现在还是用的采集双声道,然后只用一个声道的数据
Terry Han 你好,
想请教下下面这些寄存器的配置是参考哪份手册的,我们目前需要把立体声变成单声道,,但是没有找到很好的资料,还望指点一下~
//else if(bitClk == 1536000 || bitClk == 1411200)
//{
//AudioCodecPageSelect(TI3254_PAGE_0);
//
//AudioCodecRegWrite(TI3254_CLK_MUX_REG, 0x03); // PLL Clock is CODEC_CLKIN
//AudioCodecRegWrite(TI3254_CLK_PLL_P_R_REG, 0x91); // PLL is powered up, P=1, R=1
//AudioCodecRegWrite(TI3254_CLK_PLL_J_REG, 0x38); // J=56
//AudioCodecRegWrite(TI3254_CLK_PLL_D_MSB_REG, 0x00); // D = 0
//
//AudioCodecRegWrite(TI3254_CLK_NDAC_REG, 0x82); // NDAC divider powered up, NDAC = 2
//AudioCodecRegWrite(TI3254_CLK_MDAC_REG, 0x87); // MDAC divider powered up, MDAC = 7
//AudioCodecRegWrite(TI3254_DAC_OSR_MSB_REG, 0x00); // DOSR = 0x0080 =
//AudioCodecRegWrite(TI3254_DAC_OSR_LSB_REG, 0x80); // DOSR = 0x0080 = 128
//
//AudioCodecRegWrite(TI3254_CLK_NADC_REG, 0x82); // NADC divider powered up, NADC = 2
//AudioCodecRegWrite(TI3254_CLK_MADC_REG, 0x87); // MADC divider powered up, MADC = 7
//AudioCodecRegWrite(TI3254_ADC_OSR_REG, 0x80); // AOSR = 128 ((Use with PRB_R1 to PRB_R6, ADC Filter Type A)
//}