Ticket #641: pa-bluetooth-channels.patch
| File pa-bluetooth-channels.patch, 1.5 KB (added by samr7, 22 months ago) |
|---|
-
src/modules/bluetooth/module-bluetooth-device.c
old new 511 511 512 512 pa_assert((unsigned) i < PA_ELEMENTSOF(freq_table)); 513 513 514 if ((cap->channel_mode & BT_A2DP_CHANNEL_MODE_MONO) && 515 (u->sample_spec.channels <= 1)) 516 u->sample_spec.channels = 1; 517 else 518 u->sample_spec.channels = 2; 519 514 520 if (cap->capability.configured) 515 521 return 0; 516 522 517 523 if (u->sample_spec.channels <= 1) { 518 if (cap->channel_mode & BT_A2DP_CHANNEL_MODE_MONO) {524 if (cap->channel_mode & BT_A2DP_CHANNEL_MODE_MONO) 519 525 cap->channel_mode = BT_A2DP_CHANNEL_MODE_MONO; 520 u->sample_spec.channels = 1;521 } else522 u->sample_spec.channels = 2;523 526 } 524 527 525 528 if (u->sample_spec.channels >= 2) { 526 u->sample_spec.channels = 2;527 528 529 if (cap->channel_mode & BT_A2DP_CHANNEL_MODE_JOINT_STEREO) 529 530 cap->channel_mode = BT_A2DP_CHANNEL_MODE_JOINT_STEREO; 530 531 else if (cap->channel_mode & BT_A2DP_CHANNEL_MODE_STEREO) … … 533 534 cap->channel_mode = BT_A2DP_CHANNEL_MODE_DUAL_CHANNEL; 534 535 else if (cap->channel_mode & BT_A2DP_CHANNEL_MODE_MONO) { 535 536 cap->channel_mode = BT_A2DP_CHANNEL_MODE_MONO; 536 u->sample_spec.channels = 1;537 537 } else { 538 538 pa_log("No supported channel modes"); 539 539 return -1;
