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

Commit c5271f78 authored by Robert Lee's avatar Robert Lee
Browse files

audio: fix resume music not smooth after press end call with touch sound



There are three usecases, the first is low-latency-playback(touch sound),
the second is audio-playback-voip(end call tone), the third is
deep-buffer-playback or compress-offload-playback(Music).

When low-latency-playback stop, it will trigger reroute to handset for
audio-playback-voip first then reroute to speaker for deep-buffer-playback
or compress-offload-playback.

The fix is to trigger reroute only when audio-playback-voip stop.

Bug: 130128135
Test: Music resume smoothly after press end call button w/ touch sound

Change-Id: Id5e8cefd53a852d0ce98a9f5ce095bee5832cb5a
Signed-off-by: default avatarRobert Lee <lerobert@google.com>
parent 8c373e4c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -2208,8 +2208,6 @@ static int stop_output_stream(struct stream_out *out)
    int i, ret = 0;
    struct audio_usecase *uc_info;
    struct audio_device *adev = out->dev;
    bool has_voip_usecase =
        get_usecase_from_list(adev, USECASE_AUDIO_PLAYBACK_VOIP) != NULL;

    ALOGV("%s: enter: usecase(%d: %s)", __func__,
          out->usecase, use_case_table[out->usecase]);
@@ -2259,7 +2257,7 @@ static int stop_output_stream(struct stream_out *out)
          speaker when voip stops.
       2) trigger voip input to reroute when voip output changes to
          hearing aid. */
    if (has_voip_usecase ||
    if (out->usecase == USECASE_AUDIO_PLAYBACK_VOIP ||
        out->devices & AUDIO_DEVICE_OUT_SPEAKER_SAFE) {
        struct listnode *node;
        struct audio_usecase *usecase;