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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
2,276 Views
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?

Labels (1)
0 Kudos
Reply
1 Solution
2,054 Views
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.

View solution in original post

0 Kudos
Reply
6 Replies
2,207 Views
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 Kudos
Reply
2,154 Views
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 Kudos
Reply
2,130 Views
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 Kudos
Reply
2,097 Views
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 Kudos
Reply
2,055 Views
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 Kudos
Reply
2,251 Views
qingyunliu
Contributor II

Can anyone support me this question?

0 Kudos
Reply