bluez5: remove HFP codec id from transports

Make HFP codec id backend/codec internal detail. Remove
spa_bt_transport::codec field which is now unused.
This commit is contained in:
Pauli Virtanen 2025-06-07 22:17:56 +03:00 committed by Wim Taymans
parent 3f9fb8d664
commit 83f6d719b1
7 changed files with 24 additions and 32 deletions

View file

@ -143,10 +143,6 @@ extern "C" {
#define BUS_TYPE_USB 1
#define BUS_TYPE_OTHER 255
#define HFP_AUDIO_CODEC_CVSD 0x01
#define HFP_AUDIO_CODEC_MSBC 0x02
#define HFP_AUDIO_CODEC_LC3_SWB 0x03
#define A2DP_OBJECT_MANAGER_PATH "/MediaEndpoint"
#define A2DP_SINK_ENDPOINT A2DP_OBJECT_MANAGER_PATH "/A2DPSink"
#define A2DP_SOURCE_ENDPOINT A2DP_OBJECT_MANAGER_PATH "/A2DPSource"
@ -161,14 +157,6 @@ extern "C" {
#define SPA_BT_NO_BATTERY ((uint8_t)255)
/* HFP uses SBC encoding with precisely defined parameters. Hence, the size
* of the input (number of PCM samples) and output is known up front. */
#define MSBC_DECODED_SIZE 240
#define MSBC_PAYLOAD_SIZE 57 /* 1 byte padding follows payload */
#define LC3_SWB_DECODED_SIZE 960 /* 32 kHz mono S24_32 @ 7.5 ms */
#define LC3_SWB_PAYLOAD_SIZE 58
#define HFP_CODEC_PACKET_SIZE 60 /* 2 bytes header + payload */
enum spa_bt_media_direction {
SPA_BT_MEDIA_SOURCE,
SPA_BT_MEDIA_SINK,
@ -676,7 +664,6 @@ struct spa_bt_transport {
enum spa_bt_profile profile;
enum spa_bt_transport_state state;
const struct media_codec *media_codec;
unsigned int codec;
void *configuration;
int configuration_len;
char *endpoint_path;