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.
JacobT_81 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.
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) "
1 of 1 people found this helpful
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 prbo_3137756 above). You can do a code search on this flag to see what changes it makes to support WBS.