完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
如果我想用CX3使用USB音频单声道,下面是最好的方法
A)自动DMA USB端点到I2S左通道单独,I2S右通道未初始化。 b)手动DMA USB端点到CPU,从CPU到I2S单独通道,I2S右通道未初始化。 我尝试了(A),以I2S连续模式如下。 *配置I2S接口。*/ CYU3PMESET((UIT88T**)和;I2SCFG,0,SIZEOF(I2SCFG)); I2SCFG. ISMONO=CyTrand; I2SCFG.ILSBB1=CyFrE; I2SCFG.ISDMA=Cyress; I2SCFG.PADMODE = CYU-U3PII2SYPADYMODEA连续; I2SCFG.SAMPLERATE=CYU-U3PII2SYSAMPPLYRATER 44×1KHz; I2SCFG采样宽度=CyuU3pII2sWithth1616BIT; 状态= CYU3PI2SSETCONFIG(和;I2SCFG,NULL); . . . . . /*在两个套接字之间创建一个DMA自动通道 * U端口和L和R I2S套接字。设置DMA大小 *基于USB的速度。*/ 大小=大小; DMACFG计数=4; DMACGF.PRODSCKID=SokKythIDIXCX3UAKSPSPKER生产者; DcMcF.C. DMACGF.DMAMODE=CYU-U3PY-DMAYMODEEY字节; DMACFG通知=0; DMACGF.CB=NULL; DMACG.PRODHead=0; DMACGF.PRODHOPETER=0; DMACGF.CONSEADADER=0; DMACFG。 状态= CYU3PDMACHANNEL CREATE(&GLCX3UAACIIILILFTTCH) CYU-U3PYDMAX型汽车,DMACFG; 如果(状态)!= CYU-U3PY成功 { CYU3pDebug(4),“CYU3PDMACHANNEAR CREAtiON失败,错误代码= %DN”,状态; CyFxAppErrorHandler(状态); } 当我从主机(Android /Linux/Windows)流音频时,我每隔1秒听到一个嘀嗒声。这可以通过改变“I2SCFG.PADMODE=CyuU3PiI2SyPADYMODEIO连续”;“AS”I2SCFG.PADMODE = CYU-U3PII2S1PADYMO正常;但是,有一个小背景噪音和音频来。 我的描述符将其广告为44.1kHz,每个采样间隔16位的单声道音频设备具有BSt= 4。无法共享项目。 1)这种周期性“嘀嗒”噪声的来源是什么? 2)I2S设置的建议I2S PADMODE应该是什么? 3)手动DMA或自动DMA最好的方法,人们使用的USB音频输出应用程序? 4)用于USB音频输出的工作原型的任何参考代码? 以上来自于百度翻译 以下为原文 If I want to use USB audio mono out with CX3, what is the best method among below a) Auto DMA USB endpoint to I2S Left channel alone, I2S right channel uninitialized. b) Manual DMA USB endpoint to CPU and from CPU to I2S Left channel alone, I2S right channel uninitialized. I have tried (a), with I2S continuous mode as below. /* Configure the I2S interface. */ CyU3PMemSet ((uint8_t *)&i2sCfg, 0, sizeof (i2sCfg)); i2sCfg.isMono = CyTrue; i2sCfg.isL***First = CyFalse; i2sCfg.isDma = CyTrue; i2sCfg.padMode = CY_U3P_I2S_PAD_MODE_CONTINUOUS; i2sCfg.sampleRate = CY_U3P_I2S_SAMPLE_RATE_44_1KHz; i2sCfg.sampleWidth = CY_U3P_I2S_WIDTH_16_BIT; status = CyU3PI2sSetConfig (&i2sCfg, NULL); . . . . . /* Create a DMA Auto channel between two sockets of the * U port and the L and R I2S sockets. DMA size is set * based on the USB speed. */ dmaCfg.size = size; dmaCfg.count = 4; dmaCfg.prodSckId = SOCKET_ID_CX3_UAC_SPK_PRODUCER; dmaCfg.consSckId = CY_U3P_LPP_SOCKET_I2S_LEFT; dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE; dmaCfg.notification = 0; dmaCfg.cb = NULL; dmaCfg.prodHeader = 0; dmaCfg.prodFooter = 0; dmaCfg.consHeader = 0; dmaCfg.prodAvailCount = 0; status = CyU3PDmaChannelCreate (&glCX3_UAC_I2sLeftCh, CY_U3P_DMA_TYPE_AUTO, &dmaCfg); if (status != CY_U3P_SUCCESS) { CyU3PDebugPrint (4, "CyU3PDmaChannelCreate failed, Error code = %dn", status); CyFxAppErrorHandler(status); } When I stream audio from the host (Android/Linux/Windows), I am hearing a tick noise every 1 second. This can be removed by changing the 'i2sCfg.padMode = CY_U3P_I2S_PAD_MODE_CONTINUOUS; ' as 'i2sCfg.padMode = CY_U3P_I2S_PAD_MODE_NORMAL; '. But, then there a small background noise along with audio comes. My descriptors advertise it as 44.1kHZ, 16 bit per sample mono audio device with bInterval=4. Cannot share the project. 1) What can be the source of such periodic 'tick' noise? 2) What shall be the suggested I2S padMode for I2S setting? 3) Manual DMA or Auto DMA best method people use for USB audio out applications? 4) Any reference code for a working prototype of USB audio out? |
|
相关推荐
2个回答
|
|
你好,
1)这种周期性“嘀嗒”噪声的来源是什么? 我们需要测试它,以便了解问题到底是什么。 2)I2S设置的建议I2S PADMODE应该是什么? 你也可以尝试左右对齐的PADMODE和检查。理想的正常模式应该工作良好。 3)手动DMA或自动DMA最好的方法,人们使用的USB音频输出应用程序? 汽车是最好的方法。 4)用于USB音频输出的工作原型的任何参考代码? 我们在FX3SDK中有一个参考代码。请核对一下。 当做, 萨万 以上来自于百度翻译 以下为原文 Hi, 1) What can be the source of such periodic 'tick' noise? >> We need to test it in order to understand what exactly is the problem. 2) What shall be the suggested I2S padMode for I2S setting? >> You can also try right and left justified padMode and check. Ideally Normal mode should work fine. 3) Manual DMA or Auto DMA best method people use for USB audio out applications? >> Auto is the best method. 4) Any reference code for a working prototype of USB audio out? >> We do have a reference code in the FX3 SDK. Please check it. Regards, Savan |
|
|
|
CYU-U3PII2S1PADYMODEE连续与CYU-U3PII2S1PADYMODE正常值有什么区别? 我假设,在发布SDK之前,您有用于音频输出验证的原型。具有扬声器、DAC和CX3的原型将帮助您验证CX3SDK的I2S API。 你有这样一个工作原型的音频输出与上述属性?如果是,你尝试使用自动DMA模式的USB音频输出?你经历过周期性的噪音吗? 我们使用一个DAC,TAS2521从TI连接扬声器到CX3。我不知道你如何测试我的代码在你的地方,因为它取决于我的硬件。如果你能分享你的原型的源代码,这将是有益的。我们会试试你们原型中使用的同样的DAC吗? 注意:I2S示例和SDK对我没有帮助。 以上来自于百度翻译 以下为原文 What is the difference between CY_U3P_I2S_PAD_MODE_CONTINUOUS and CY_U3P_I2S_PAD_MODE_NORMAL? I assume, you have working prototypes for audio out verification before you release SDK. A prototype with speaker, DAC and CX3 would have helped you for the verification of I2S APIs for CX3 SDK. Do you have such a working prototype for audio out with aforementioned properties? If yes, did you try using Auto DMA mode for USB audio out? Have you experienced any periodic noise? We use a DAC, TAS2521 from TI to connect speaker to CX3. I am not sure about how you test my code at your place since it depends on my hardware. It would be helpful, if you can share the source code for your prototype. We shall try the same DAC you used in your prototype? NOTE:- The I2S example along with SDK would not help me. |
|
|
|
只有小组成员才能发言,加入小组>>
740个成员聚集在这个小组
加入小组1984 浏览 1 评论
1747 浏览 1 评论
3525 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1676 浏览 6 评论
1453 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
239浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
143浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
334浏览 2评论
282浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
467浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-9-1 15:30 , Processed in 0.790540 second(s), Total 80, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191