完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
你好,
我有一个UAC设备,可以通过设置输出不同的音频采样率为32 kHz /44.1kHZ/48 kHz,然后通过USB连接到PC。 在FX3固件代码中,我已经修改了一些USB描述符以支持多个采样频率,如下: 在I型格式描述符中, (1)增加采样频率的数目(BSAMFRQQuyType) (2)列出可用频率 (3)通过增加频率的字节来调整I型格式描述符的大小 (4)调整端点描述符的WMax大小,以便覆盖最大频率的样本。 (5)设置音频流类特定(AS-CS)端点描述符的比特0(采样频率控制)。 (6)调整配置描述符的WTAUTHACTEN字段的大小 /*类特定的格式描述符-I型格式描述符????*/ 0x11,/*描述符大小*/ 0x24,/*类特定接口描述符类型*/ 0x02,/*格式类型描述符子类型*/ 0x01,/*PCM格式I型** 0x02,/*通道数- 2×/ 0x02,/*子帧大小-每个音频子帧* 2字节* 0x10,/*位分辨率- 16位*/ 0x03,/*采样频率- 1*/ 0x00,0x7d,0x00,//32 kHz 0x44,0xac,0x00,//44.1kHz 0x80,0xbb,0x00,/*采样频率- 48000赫兹*/ 但是,根据上面修改的代码,在PC上运行AMCAP,它对所有这三个音频采样率都没有声音。因此,我不确定是否需要修改或添加其他代码。如何告诉PC使用哪个采样频率? 谢谢。 以上来自于百度翻译 以下为原文 Hello, I have a UAC device that can output different audio sample rate 32kHz/44.1kHz/48kHz via setting, then is connected to PC via USB. In FX3 firmware code, I have already modified some USB descriptors to support multiple sampling frequencies, as follow: At Type I Format descriptor, (1) increase the number of sampling frequencies (bSamFreqType) (2) list up available frequencies (3) Tune the size of Type I format descriptor, by the increased bytes for frequencies (4) Tune wMaxPacketSize of the endpoint descriptor, so that it covers the samples of the greatest frequency (5) Set the bit 0 (Sampling Frequency control) of bmAttributes on Audio-Streaming Class-specific (AS-CS) endpoint descriptor. (6) Tune the size of wTotalLength field of the Configuration descriptor /* Class specific AS Format descriptor - Type I Format Descriptor ???*/ 0x11, /* Descriptor size */ 0x24, /* Class-specific Interface Descriptor Type */ 0x02, /* Format Type Descriptor subtype */ 0x01, /* PCM FORMAT_TYPE_I */ 0x02, /* Number of channels - 2 */ 0x02, /* Subframe size - 2 bytes per audio subframe */ 0x10, /* Bit resolution - 16 bits */ 0x03, /* Number of samping frequencies - 1 */ 0x00, 0x7D,0x00, //32kHz 0x44, 0xAC, 0x00, //44.1kHz 0x80, 0xBB, 0x00, /* Sampling frequency - 48000 Hz */ But per modifying code above, as amcap run on the pc, it doesn't have sound for all these three audio sample rate. So, I am not sure whether I need to modify or add other code. how do I tell PC which sampling frequency to use? Thanks. |
|
相关推荐
1个回答
|
|
|
你好,
请确保在CYFXAppNUSSETUPcB中处理音频类特定请求。 请检查所附固件以供参考。这里使用44.1 kHz和48 kHz作为采样频率。 当做, - Madhu Sudhan 美国广播公司41.1KY48 K.ZIP 32.3 K 以上来自于百度翻译 以下为原文 Hi, Please make sure the audio class specific requests are handled in the CyFxApplnUSBSetupCB. PLease check the attached firmware for reference. Here 44.1 KHz and 48 Khz are used as sampling frequencies. Regards, - Madhu Sudhan
|
|
|
|
|
只有小组成员才能发言,加入小组>>
788个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7347 浏览 0 评论
2485 浏览 1 评论
2178 浏览 1 评论
4045 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2089 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7839浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6400浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
757浏览 2评论
729浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
8251浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-13 09:14 , Processed in 0.610214 second(s), Total 40, Slave 33 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
3033