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,278件の閲覧回数
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,056件の閲覧回数
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,209件の閲覧回数
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,156件の閲覧回数
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,132件の閲覧回数
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,099件の閲覧回数
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,057件の閲覧回数
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,253件の閲覧回数
qingyunliu
Contributor II

Can anyone support me this question?

0 件の賞賛
返信