Bluetooth AVRCP receive play state change from target
Posted: Wed Aug 07, 2024 2:22 pm
I'm trying to create a bluetooth audio source device, my code is based on the A2DP_source example from the IDF. I can receive volume changes set by the user on the target device (speaker or headset), but not play/pause commands. I am checking for these commands in the function but not receiving anything. I think it has to do with setting the capabilities during the starting sequence of the AVRCP when a device is connecting. The function does not seem to accept PLAY_STATE_CHANGE (bit 1) as argument. I traced the error back to the file btc_avrc.c where the function denies PLAY_STATE_CHANGE as it considers it to be not allowed. To my understanding VOLUME_CHANGE (bit 13) is the only supported command according to this function.
Is this a limitation of the IDF in it's current state? It seems kind of odd to have an entire AVRCP API and only support one type of command. Surely I'm doing something wrong. Any help would be apprectiated!
Code: Select all
bt_av_notify_evt_handler
Code: Select all
esp_avrc_tg_set_rn_evt_cap
Code: Select all
btc_avrc_tg_check_rn_supported_evt
Is this a limitation of the IDF in it's current state? It seems kind of odd to have an entire AVRCP API and only support one type of command. Surely I'm doing something wrong. Any help would be apprectiated!