Esp-idf: [a2dp_sink] AVRCP Absolute volume control commands not Working. (IDFGH-2561)

Created on 18 Jan 2020  路  13Comments  路  Source: espressif/esp-idf

I was adding AVRCP absolute volume commands, facing an error while trying to increase volume using absolute volume commands as passthrough volume commands are not supporter by android. i was able to PLAY and PAUSE music using passthrough commands, cant change volume with the same.

I want to increase or decrease the music volume in Phone using buttons connected to Board.

 esp_avrc_ct_send_set_absolute_volume_cmd(1, 0);

This command should mute the sound on Phone(android), but the following error arises :

W (46988) BT_BTC: handle_rc_metamsg_rsp: code 10 error 0x0

Board : ESP32
ESP-IDF version : 4
Thanks
Tarun Narain

All 13 comments

Hi @Tarun-Narain,
Maybe you can change
#define AVRC_INCLUDED FALSE
to
#define AVRC_INCLUDED TRUE
in bt_target.h.

Have a try.
If the issue still occurs, please provide more info for us to debug.

Thanks
Abner

Hi @AbnerFederer,
It is already True there.

I just added a button for digital input. i call this

 esp_avrc_ct_send_set_absolute_volume_cmd(1, 0);

whenever the button is pressed.

Thanks
Tarun Narain

Hi, @Tarun-Narain

Have you call

esp_avrc_ct_send_set_absolute_volume_cmd(APP_RC_CT_TL_RN_VOLUME_CHANGE, event_parameter->volume + 5);
bt_av_volume_changed();

like the a2dp_source example in IDF?

Thanks
Abner

Hi, @Tarun-Narain

Absolute volume cmd and Passthrough cmd are two different methods to change the volume. You should use them separately.

Thanks
Abner

Hi guys,
i just figured out that these commands are not working on Xiaomi Smartphones but working on Samsung Smartphones, the volume simulation in A2dp_sink example too is not working on Xiaomi.

Hi, @Tarun-Narain

Which commands? Passthrough or Absolute Volume?
Which Xiaomi phone and Sumsang phone?
Could you provide your code for me to reproduce?

Thanks
Abner

@Tarun-Narain Thanks for reporting, would you please help share more details? Thanks.

@Tarun-Narain Thanks for reporting, any more details could be shared? Thanks.

my device is Xiomi Y1 Lite, when i tested a2dp_sinnk example on this device volume simulation was not working but working on every Samsung smartphones and i cant provide any further details as i dont know if its an issue with Xiomi OS (Smartphone).

Hello,

Anyone has been able to resolve the problem, I'm having the same issue...
W (27106) BT_BTC: handle_rc_metamsg_rsp: code 10 error 0x0
when calling esp_avrc_ct_send_set_absolute_volume_cmd
while esp_avrc_ct_send_passthrough_cmd doesn't seem to work at all with volume.

Thanks

sorry @benjavita, i found nothing on this issue;

Thanks

If you want to control the volume of your phone, you can use esp_ avrc_ ct_ send_ passthrough_ cmdor notification event. You can refer to a2dp_sink_demo. Of course, some phones don't support this feature.
Wiki:https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles#Audio/Video_Remote_Control_Profile_(AVRCP)

@Tarun-Narain Thanks for reporting and sharing updates, would you please help check if your issue has been resolved? Thanks.

Was this page helpful?
0 / 5 - 0 ratings