AVRCP Volume Control
Posted: Tue Nov 12, 2019 1:53 pm
I'm working on a BT speaker that will have local control buttons for such things as play, stop, fwd, rev, volume up and volume down. I can successfully have the phone play and stop with the following type of command:
esp_avrc_ct_send_passthrough_cmd(0, ESP_AVRC_PT_CMD_PLAY, ESP_AVRC_PT_CMD_STATE_PRESSED);
I am having no luck with using this same function call to control volume up and down:
esp_avrc_ct_send_passthrough_cmd(0, ESP_AVRC_PT_CMD_VOL_DOWN, ESP_AVRC_PT_CMD_STATE_PRESSED);
err = esp_avrc_ct_send_passthrough_cmd(0, ESP_AVRC_PT_CMD_VOL_UP, ESP_AVRC_PT_CMD_STATE_PRESSED);
The return value from these calls is 0 (ESP_OK) but the phone isn't adjusting it's volume when these commands are sent.
I have also tried to use the esp_avrc_ct_send_set_absolute_volume_cmd() command without success either.
When I press the volume up or down button on my device, I want the phone's volume slider to adjust up or down 1 increment with each button press.
Any ideas would be appreciated.
Thanks.
esp_avrc_ct_send_passthrough_cmd(0, ESP_AVRC_PT_CMD_PLAY, ESP_AVRC_PT_CMD_STATE_PRESSED);
I am having no luck with using this same function call to control volume up and down:
esp_avrc_ct_send_passthrough_cmd(0, ESP_AVRC_PT_CMD_VOL_DOWN, ESP_AVRC_PT_CMD_STATE_PRESSED);
err = esp_avrc_ct_send_passthrough_cmd(0, ESP_AVRC_PT_CMD_VOL_UP, ESP_AVRC_PT_CMD_STATE_PRESSED);
The return value from these calls is 0 (ESP_OK) but the phone isn't adjusting it's volume when these commands are sent.
I have also tried to use the esp_avrc_ct_send_set_absolute_volume_cmd() command without success either.
When I press the volume up or down button on my device, I want the phone's volume slider to adjust up or down 1 increment with each button press.
Any ideas would be appreciated.
Thanks.