summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'audio/legacy/audio_hw.c')
-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)