mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
bluez5: lowball fallback delay values
Reduce fallback delay values used when BT device doesn't provide the information itself. It may be better to have audio late than early, so use values that are probably close to or below the delays of majority of headsets.
This commit is contained in:
parent
2ed0cddc57
commit
21392d327f
1 changed files with 3 additions and 6 deletions
|
|
@ -3172,20 +3172,17 @@ int64_t spa_bt_transport_get_delay_nsec(struct spa_bt_transport *t)
|
||||||
/* Fallback values when device does not provide information */
|
/* Fallback values when device does not provide information */
|
||||||
|
|
||||||
if (t->media_codec == NULL)
|
if (t->media_codec == NULL)
|
||||||
return 30 * SPA_NSEC_PER_MSEC;
|
return 20 * SPA_NSEC_PER_MSEC;
|
||||||
|
|
||||||
switch (t->media_codec->id) {
|
switch (t->media_codec->id) {
|
||||||
case SPA_BLUETOOTH_AUDIO_CODEC_SBC:
|
case SPA_BLUETOOTH_AUDIO_CODEC_SBC:
|
||||||
case SPA_BLUETOOTH_AUDIO_CODEC_SBC_XQ:
|
case SPA_BLUETOOTH_AUDIO_CODEC_SBC_XQ:
|
||||||
return 200 * SPA_NSEC_PER_MSEC;
|
|
||||||
case SPA_BLUETOOTH_AUDIO_CODEC_MPEG:
|
case SPA_BLUETOOTH_AUDIO_CODEC_MPEG:
|
||||||
case SPA_BLUETOOTH_AUDIO_CODEC_AAC:
|
case SPA_BLUETOOTH_AUDIO_CODEC_AAC:
|
||||||
return 200 * SPA_NSEC_PER_MSEC;
|
|
||||||
case SPA_BLUETOOTH_AUDIO_CODEC_APTX:
|
case SPA_BLUETOOTH_AUDIO_CODEC_APTX:
|
||||||
case SPA_BLUETOOTH_AUDIO_CODEC_APTX_HD:
|
case SPA_BLUETOOTH_AUDIO_CODEC_APTX_HD:
|
||||||
return 150 * SPA_NSEC_PER_MSEC;
|
|
||||||
case SPA_BLUETOOTH_AUDIO_CODEC_LDAC:
|
case SPA_BLUETOOTH_AUDIO_CODEC_LDAC:
|
||||||
return 175 * SPA_NSEC_PER_MSEC;
|
return 125 * SPA_NSEC_PER_MSEC;
|
||||||
case SPA_BLUETOOTH_AUDIO_CODEC_AAC_ELD:
|
case SPA_BLUETOOTH_AUDIO_CODEC_AAC_ELD:
|
||||||
case SPA_BLUETOOTH_AUDIO_CODEC_APTX_LL:
|
case SPA_BLUETOOTH_AUDIO_CODEC_APTX_LL:
|
||||||
case SPA_BLUETOOTH_AUDIO_CODEC_APTX_LL_DUPLEX:
|
case SPA_BLUETOOTH_AUDIO_CODEC_APTX_LL_DUPLEX:
|
||||||
|
|
@ -3196,7 +3193,7 @@ int64_t spa_bt_transport_get_delay_nsec(struct spa_bt_transport *t)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
return 150 * SPA_NSEC_PER_MSEC;
|
return 125 * SPA_NSEC_PER_MSEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int transport_update_props(struct spa_bt_transport *transport,
|
static int transport_update_props(struct spa_bt_transport *transport,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue