espressif / esp-adf

Espressif Audio Development Framework
Other
1.55k stars 686 forks source link

Bluetooth A2DP sink SBC, limit sample rate to 44.1KHz (AUD-2938) #603

Closed iloop2020 closed 2 years ago

iloop2020 commented 3 years ago

Hi,

Is it possible to limit A2DP sink SBC to 44.1KHz, even smartphone can support 48KHz.

Thank you.

HengYongChao commented 3 years ago

Hi @iloop2020 For the decoder in the SNK the sampling frequencies 44.1 kHz and 48 kHz are mandatory to support. If phone use 48k, sink use 48k. Now answer your question directly. You need to add resample to output 44.1k data.

iloop2020 commented 3 years ago

Hi @HengYongChao ,

Thank you, and got your point, but my question can we limited the phone use 44.1KHz ?

Thank you again.

HengYongChao commented 3 years ago

Hi @HengYongChao ,

Thank you, and got your point, but my question can we limited the phone use 44.1KHz ?

Thank you again.

Hi @iloop2020 Sorry, I don’t know how to limited the phone to only use 44.1k sampling rate. Maybe its' likely to depend on the behavior of the phone or app (source role)?

iloop2020 commented 3 years ago

Hi @HengYongChao

I am not familiar with A2DP, but I expect there a is negotiation process for number of channes/ codec and Sample Rate etc.

Can the team check with it ?

Thank you

HengYongChao commented 3 years ago

Hi @iloop2020

As mentioned in my first answer, there is indeed a negotiation mechanism.

Generally, the sink role must support two sampling rates of 44.1k and 48k, but the source role does not necessarily need to support all sampling rates, so the negotiation result depends on the source role.