Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

Anonymous
Not applicable

The application demonstrates A2DP Sink and HF profile usage, I found in the code that during playback the I2S clock is 1.411 MHz and during HF call the clock is 256 KHz, I would like to know how this switching is being done. Can anyone please help me here ?

Thank you,

Pravinkumar

0 Likes
1 Solution
JacobT_81
Employee

These rates are defined by the spec. HFP is a much lower rate protocol guaranteeing low latency for phone calls where a delay is not acceptable. HFP operates at either 8KHz or 16KHz. On the other hand, A2DP is meant for higher quality audio streams where a higher latency is acceptable. A2DP operates at either 44.1KHz or 48KHz.

For more details please refer to the BT spec.

Jacob

View solution in original post

0 Likes
4 Replies
JacobT_81
Employee

These rates are defined by the spec. HFP is a much lower rate protocol guaranteeing low latency for phone calls where a delay is not acceptable. HFP operates at either 8KHz or 16KHz. On the other hand, A2DP is meant for higher quality audio streams where a higher latency is acceptable. A2DP operates at either 44.1KHz or 48KHz.

For more details please refer to the BT spec.

Jacob

View solution in original post

0 Likes
AnKo_2681891
New Contributor II

jact​ you correctly mention that HFP operates at either 8kHz or 16kHz. Where in the Wiced API is the indication, which rate has been selected for a communication channel? In our case we found out that only 8kHz is used but we want to have 16kHz. Is there a function or a setting, where this can be forced or negotiated? And where to find the result, which rate has been selected.

0 Likes
Anonymous
Not applicable

Yes, there is a stack API to configure to either Narrow band (8KHz) or Wide Band (16KHz).

Please look into the third argument of

"void wiced_bt_sco_accept_connection (uint16_t sco_index, uint8_t hci_status, wiced_bt_sco_params_t *p_params) "

0 Likes
JacobT_81
Employee

Andreas Kohn wrote:

Where in the Wiced API is the indication, which rate has been selected for a communication channel?

To check whether WBS is supported upon connection, you can see the result of WICED_BT_HFP_HFP_CODEC_SET_EVT in the sample applications. If this event indicates that the mSBC codec is being used for the connection, then WBS will be used for the next eSCO connection. This is indicated by the spec: mSBC is "mandatory if wide band speech is supported or _excluded_ otherwise." In other words, mSBC can only be used when WBS is being used.

Andreas Kohn wrote:

In our case we found out that only 8kHz is used but we want to have 16kHz. Is there a function or a setting, where this can be forced or negotiated?

Using the flag WICED_BT_HFP_HF_WBS_INCLUDED in the sample apps will enable WBS if the peer device also supports it. This is a quick way to test WBS without making code changes. (this will automatically fill in the proper parameters to the API mentioned by praveenkj04_2862136 above). You can do a code search on this flag to see what changes it makes to support WBS.

Jacob