Commit facef169 authored by pali's avatar pali

fixup! bluetooth: Change codec API for choosing remote endpoint

parent cbc09c9f
......@@ -236,10 +236,11 @@ static int cmp_endpoints_by_freq(const a2dp_sbc_t *capabilities1, const a2dp_sbc
} else if (freq2) {
return 1;
} else {
/* Both endpoints support only frequencies lower than requested sampling rate, therefore prefer endpoint with higher supported frequency */
for (i = PA_ELEMENTSOF(freq_table)-1; i >= 0; i--) {
if (capabilities1->frequency & freq_table[i].cap)
if (!freq1 && (capabilities1->frequency & freq_table[i].cap))
freq1 = freq_table[i].rate;
if (capabilities2->frequency & freq_table[i].cap)
if (!freq2 && (capabilities2->frequency & freq_table[i].cap))
freq2 = freq_table[i].rate;
if (freq1 && freq2)
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment