Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 225e13c7 authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat
Browse files

a2dp: Fix BT SCO Tx configuration during a2dp to sco transition

 -For voice call tx backend is configured with a2dp sampling rate
  leading to distorted audio during voice call.
 -Don't set tx backend sample rate for a2dp if abr is not enabled.

Change-Id: I7cdb0a5c98b550665cfaafb02cd9151579d7138c
parent 94c75974
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
@@ -1183,7 +1183,7 @@ static bool a2dp_set_backend_cfg(uint8_t direction)
                    rate_str = SPEECH_TX_SAMPLE_RATE;
                else
                    rate_str = ABR_TX_SAMPLE_RATE;
            }

                ALOGD("%s: set backend tx sample rate = %s", __func__, rate_str);
                ctl_sample_rate = mixer_get_ctl_by_name(a2dp.adev->mixer,
                                                MIXER_SOURCE_SAMPLE_RATE_TX);
@@ -1199,6 +1199,7 @@ static bool a2dp_set_backend_cfg(uint8_t direction)
                    goto fail;
                }
            }
        }
    } else {
        /* Fallback to legacy approch if MIXER_SAMPLE_RATE_RX and
        MIXER_SAMPLE_RATE_TX is not supported */