Commit c7ad443e authored by P V's avatar P V
Browse files

bluez5: update supported codec list when profiles changed

When A2DP is connected and new device profiles appear, update also
supported codec list.

Fixes missing codec profiles when A2DP is connected late.
parent 5c91f23c
Pipeline #284404 passed with stages
in 1 minute and 55 seconds
......@@ -387,6 +387,12 @@ static void profiles_changed(void *userdata, uint32_t prev_profiles, uint32_t pr
this->params[IDX_EnumRoute].flags ^= SPA_PARAM_INFO_SERIAL;
if (connected_change & SPA_BT_PROFILE_A2DP_SINK) {
this->supported_codecs = spa_bt_device_get_supported_a2dp_codecs(
this->bt_dev, &this->supported_codec_count);
this->info.change_mask |= SPA_DEVICE_CHANGE_MASK_PARAMS;
this->params[IDX_Profile].flags ^= SPA_PARAM_INFO_SERIAL;
this->params[IDX_EnumProfile].flags ^= SPA_PARAM_INFO_SERIAL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment