LPC55S69 usb host audio speaker demo support sampe rate set or not?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC55S69 usb host audio speaker demo support sampe rate set or not?

跳至解决方案
2,281 次查看
qingyunliu
Contributor II

1. can user change USB host audio samplerate? eg. change to 44100Hz or 48000Hz, should I change which file in SDK? 

2. I test LPC55S69 usb host audio speaker demo with a 48k_16bite_2ch usb device. why API audio_recorderIncallback param3 datalen is 176? same like 44.1*2*2=176???  It should be 192?

标签 (1)
0 项奖励
回复
1 解答
2,059 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @qingyunliu,

We are glad you found an explanation for question 1. As you mentioned, the dataLen is determined by the device you are connecting.

About question 2, it depends how are you reading the variable dataLen. If you read it in Global Variables while debugging the value changes. Meanwhile, if you read it in the Serial Console, you might notice that the variable is not changing. This happens because to see the Global Variables you need to stop the program producing these changes in values in the variable, but if you let the program to run freely the value of dataLen is the same value.

Best regards, Raul.

在原帖中查看解决方案

0 项奖励
回复
6 回复数
2,212 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @qingyunliu,

Could you please have a look to Audio 1.0 and Audio 2.0 specifications? The Audio 1.0 spec mentions the usage of sampling frequency as 48000Hz as part of the USB Audio 1.0 specification which the example complies.

Nonetheless, could be useful to check the following implementations:

Best regards, Raul.

0 项奖励
回复
2,159 次查看
qingyunliu
Contributor II
hi Raul,
thanks for your reply. 2 questions
1. if audio_recorderIncallback datelen is 176? means what?
2. if audio_recorderIncallback datelen is changed fast, eg, 176,176, 2340, 1316,....what may cause this err?
0 项奖励
回复
2,135 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @qingyunliu,

Just for double check, are you using the host_audio_recorder_freertos example or are you doing modifications of the examples? We could not find the Audio_RecorderInCallback function in host_audio_speaker_freertos example. 

Also, could you please tell us how are you obtaining/reading the value of data length (datalen) in the mentioned function?

Best regards, Raul.

0 项奖励
回复
2,102 次查看
qingyunliu
Contributor II
HI RAUL,

I know the reason, just like I mentioned, 176 or 192 is determined by usb device, I tested two devices, for 44.1KHZ 16BITS, length is 176. 48KHz 16bits is192.
0 项奖励
回复
2,060 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @qingyunliu,

We are glad you found an explanation for question 1. As you mentioned, the dataLen is determined by the device you are connecting.

About question 2, it depends how are you reading the variable dataLen. If you read it in Global Variables while debugging the value changes. Meanwhile, if you read it in the Serial Console, you might notice that the variable is not changing. This happens because to see the Global Variables you need to stop the program producing these changes in values in the variable, but if you let the program to run freely the value of dataLen is the same value.

Best regards, Raul.

0 项奖励
回复
2,256 次查看
qingyunliu
Contributor II

Can anyone support me this question?

0 项奖励
回复