summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisael Lopez Cruz2014-11-25 20:56:23 -0600
committerMisael Lopez Cruz2014-11-26 03:06:17 -0600
commit722a512d3b92a94c46c856592ccc7015d2a6fd06 (patch)
tree756c408a044b98cd2ecb6b33ce39054a51763e8d /audio/legacy
parent46e3e4351aeb553f196d992fbf4b3738392cd219 (diff)
downloaddevice-ti-jacinto6evm-722a512d3b92a94c46c856592ccc7015d2a6fd06.tar.gz
device-ti-jacinto6evm-722a512d3b92a94c46c856592ccc7015d2a6fd06.tar.xz
device-ti-jacinto6evm-722a512d3b92a94c46c856592ccc7015d2a6fd06.zip
audio: Legacy: Remove BT SCO workaround
WiLink 8 is now able to provide the PCM clocks until the voice call is completely terminated, so there is no risk of blocking read() and write() calls anymore. The workaround is no longer needed, so it is removed. Change-Id: Idb9c4d9dc9e2940c9ce6a9f49448a2fa9ad76ae2 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Diffstat (limited to 'audio/legacy')
-rw-r--r--audio/legacy/audio_hw.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/audio/legacy/audio_hw.c b/audio/legacy/audio_hw.c
index 6152035..fc81c03 100644
--- a/audio/legacy/audio_hw.c
+++ b/audio/legacy/audio_hw.c
@@ -565,9 +565,6 @@ static int enter_voice_call(struct j6_audio_device *adev)
565 565
566 ALOGI("enter_voice_call() entering bluetooth voice call"); 566 ALOGI("enter_voice_call() entering bluetooth voice call");
567 567
568 audio_route_apply_path(adev->route, "BT SCO Master");
569 audio_route_update_mixer(adev->route);
570
571 /* Let the primary output switch to a dummy sink */ 568 /* Let the primary output switch to a dummy sink */
572 if (adev->out) 569 if (adev->out)
573 do_out_standby(adev->out); 570 do_out_standby(adev->out);
@@ -580,7 +577,7 @@ static int enter_voice_call(struct j6_audio_device *adev)
580 ret = voice_stream_init(&voice->ul, adev->in_port, adev->bt_port, false); 577 ret = voice_stream_init(&voice->ul, adev->in_port, adev->bt_port, false);
581 if (ret) { 578 if (ret) {
582 ALOGE("enter_voice_call() failed to init uplink %d", ret); 579 ALOGE("enter_voice_call() failed to init uplink %d", ret);
583 goto err_ul_init; 580 return ret;
584 } 581 }
585 582
586 /* Downlink: BT (8kHz) -> HP/Spk (44.1kHz) */ 583 /* Downlink: BT (8kHz) -> HP/Spk (44.1kHz) */
@@ -620,9 +617,6 @@ static int enter_voice_call(struct j6_audio_device *adev)
620 voice_stream_exit(&voice->ul); 617 voice_stream_exit(&voice->ul);
621 err_dl_init: 618 err_dl_init:
622 voice_stream_exit(&voice->dl); 619 voice_stream_exit(&voice->dl);
623 err_ul_init:
624 audio_route_reset_path(adev->route, "BT SCO Master");
625 audio_route_update_mixer(adev->route);
626 620
627 return ret; 621 return ret;
628} 622}
@@ -638,15 +632,6 @@ static void leave_voice_call(struct j6_audio_device *adev)
638 632
639 adev->in_call = false; 633 adev->in_call = false;
640 634
641 /*
642 * The PCM ports used for Bluetooth are slaves and they can lose the
643 * BCLK and FSYNC while still active. That leads to blocking read() and
644 * write() calls, which is prevented by switching the clock source to
645 * an internal one and explicitly stopping both ports for the new source
646 * to take effect at kernel level
647 */
648 audio_route_reset_path(adev->route, "BT SCO Master");
649 audio_route_update_mixer(adev->route);
650 if (ul->pcm_out) 635 if (ul->pcm_out)
651 pcm_stop(ul->pcm_out); 636 pcm_stop(ul->pcm_out);
652 if (dl->pcm_in) 637 if (dl->pcm_in)