mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
bluez5: further HFP cleanups
Fix naming issues.
This commit is contained in:
parent
ebde25fe58
commit
65f594c6a1
5 changed files with 50 additions and 56 deletions
|
|
@ -248,7 +248,7 @@ static unsigned int get_hfp_codec(enum spa_bluetooth_audio_codec id)
|
|||
case SPA_BLUETOOTH_AUDIO_CODEC_MSBC:
|
||||
return HFP_AUDIO_CODEC_MSBC;
|
||||
case SPA_BLUETOOTH_AUDIO_CODEC_LC3_SWB:
|
||||
return HFP_AUDIO_CODEC_LC3;
|
||||
return HFP_AUDIO_CODEC_LC3_SWB;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -259,7 +259,7 @@ static enum spa_bluetooth_audio_codec get_hfp_codec_id(unsigned int codec)
|
|||
switch (codec) {
|
||||
case HFP_AUDIO_CODEC_MSBC:
|
||||
return SPA_BLUETOOTH_AUDIO_CODEC_MSBC;
|
||||
case HFP_AUDIO_CODEC_LC3:
|
||||
case HFP_AUDIO_CODEC_LC3_SWB:
|
||||
return SPA_BLUETOOTH_AUDIO_CODEC_LC3_SWB;
|
||||
case HFP_AUDIO_CODEC_CVSD:
|
||||
return SPA_BLUETOOTH_AUDIO_CODEC_CVSD;
|
||||
|
|
@ -272,7 +272,7 @@ static const char *get_hfp_codec_description(unsigned int codec)
|
|||
switch (codec) {
|
||||
case HFP_AUDIO_CODEC_MSBC:
|
||||
return "mSBC";
|
||||
case HFP_AUDIO_CODEC_LC3:
|
||||
case HFP_AUDIO_CODEC_LC3_SWB:
|
||||
return "LC3-SWB";
|
||||
case HFP_AUDIO_CODEC_CVSD:
|
||||
return "CVSD";
|
||||
|
|
@ -285,7 +285,7 @@ static const char *get_hfp_codec_name(unsigned int codec)
|
|||
switch (codec) {
|
||||
case HFP_AUDIO_CODEC_MSBC:
|
||||
return "msbc";
|
||||
case HFP_AUDIO_CODEC_LC3:
|
||||
case HFP_AUDIO_CODEC_LC3_SWB:
|
||||
return "lc3_swb";
|
||||
case HFP_AUDIO_CODEC_CVSD:
|
||||
return "cvsd";
|
||||
|
|
@ -2264,7 +2264,7 @@ static struct spa_pod *build_prop_info_codec(struct impl *this, struct spa_pod_b
|
|||
#define FOR_EACH_MEDIA_CODEC(j, codec) \
|
||||
for (j = -1; iterate_supported_media_codecs(this, &j, &codec);)
|
||||
#define FOR_EACH_HFP_CODEC(j) \
|
||||
for (j = HFP_AUDIO_CODEC_LC3; j >= HFP_AUDIO_CODEC_CVSD; --j) \
|
||||
for (j = HFP_AUDIO_CODEC_LC3_SWB; j >= HFP_AUDIO_CODEC_CVSD; --j) \
|
||||
if (spa_bt_device_supports_hfp_codec(this->bt_dev, j) == 1)
|
||||
|
||||
spa_pod_builder_push_object(b, &f[0], SPA_TYPE_OBJECT_PropInfo, id);
|
||||
|
|
@ -2748,7 +2748,7 @@ static int impl_set_param(void *object,
|
|||
spa_bt_device_supports_hfp_codec(this->bt_dev, HFP_AUDIO_CODEC_MSBC) == 1) {
|
||||
return set_profile(this, this->profile, codec_id, true);
|
||||
} else if (codec_id == SPA_BLUETOOTH_AUDIO_CODEC_LC3_SWB &&
|
||||
spa_bt_device_supports_hfp_codec(this->bt_dev, HFP_AUDIO_CODEC_LC3) == 1) {
|
||||
spa_bt_device_supports_hfp_codec(this->bt_dev, HFP_AUDIO_CODEC_LC3_SWB) == 1) {
|
||||
return set_profile(this, this->profile, codec_id, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue