mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-02-08 10:06:56 -05:00
bluetooth: Add no volume control quirk for Thinkplus XT99
When this headset works in HFP/HSP profile, the input/output volume adjustment doesn't work if the headset is playing sth or capturing sth. Through the btmon log, we could see "+VGS" and "+VGM" were sent to headset and headset replied "command success", but the volume was not changed. It is something like once the SCO connecton is built, the volume couldn't be changed by "+VGS" and "+VGM" commands. Here add a quirk for this headset, skip to set set_sink_volume and set_source_volume, after this change, the pulseaudio will apply the software volume adjustment to this headset in the HFP/HSP mode. This change doesn't impact A2DP volume adjustment for this headset. Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
parent
6c77b0191a
commit
68f1107bd2
3 changed files with 31 additions and 2 deletions
|
|
@ -917,7 +917,7 @@ static void rfcomm_io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_i
|
|||
* RING: Sent by AG to HS to notify of an incoming call. It can safely be ignored because
|
||||
* it does not expect a reply. */
|
||||
if (sscanf(buf, "AT+VGS=%d", &gain) == 1 || sscanf(buf, "\r\n+VGM%*[=:]%d\r\n", &gain) == 1) {
|
||||
if (!t->set_sink_volume) {
|
||||
if (!t->set_sink_volume && !(t->device->quirk & PA_BLUETOOTH_QUIRK_NO_VOLUME_CTL)) {
|
||||
pa_log_debug("HS/HF peer supports speaker gain control");
|
||||
t->set_sink_volume = set_sink_volume;
|
||||
}
|
||||
|
|
@ -927,7 +927,7 @@ static void rfcomm_io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_i
|
|||
do_reply = true;
|
||||
|
||||
} else if (sscanf(buf, "AT+VGM=%d", &gain) == 1 || sscanf(buf, "\r\n+VGS%*[=:]%d\r\n", &gain) == 1) {
|
||||
if (!t->set_source_volume) {
|
||||
if (!t->set_source_volume && !(t->device->quirk & PA_BLUETOOTH_QUIRK_NO_VOLUME_CTL)) {
|
||||
pa_log_debug("HS/HF peer supports microphone gain control");
|
||||
t->set_source_volume = set_source_volume;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue