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

Commit 116f1ecc authored by Shruthi Krishna's avatar Shruthi Krishna
Browse files

Merge commit 'android-4.4.1_r1' into HEAD

* commit 'android-4.4.1_r1':
  hal: Fix the audio loss issue on codec back end
  hal: Fix for Audio Route issue when sound path changes
  audio: fix output flag test in open_output_stream

Conflicts:
	hal/audio_hw.c

Change-Id: Ib470b143c37ca7719757d20f37253cb256c26343
parents cd91032a 8bba9e95
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -384,6 +384,13 @@ static void check_usecases_codec_backend(struct audio_device *adev,
            }
        }

        list_for_each(node, &adev->usecase_list) {
            usecase = node_to_item(node, struct audio_usecase, list);
            if (switch_device[usecase->id]) {
                enable_snd_device(adev, snd_device, false);
            }
        }

        list_for_each(node, &adev->usecase_list) {
            usecase = node_to_item(node, struct audio_usecase, list);
            if (switch_device[usecase->id]) {
@@ -1257,8 +1264,8 @@ static int out_standby(struct audio_stream *stream)
    }

    pthread_mutex_lock(&out->lock);
    pthread_mutex_lock(&adev->lock);
    if (!out->standby) {
        pthread_mutex_lock(&adev->lock);
        out->standby = true;
        if (out->usecase != USECASE_AUDIO_PLAYBACK_OFFLOAD) {
            if (out->pcm) {
@@ -1275,8 +1282,8 @@ static int out_standby(struct audio_stream *stream)
            }
        }
        stop_output_stream(out);
    }
        pthread_mutex_unlock(&adev->lock);
    }
    pthread_mutex_unlock(&out->lock);
    ALOGV("%s: exit", __func__);
    return 0;
@@ -1782,12 +1789,12 @@ static int in_standby(struct audio_stream *stream)

    pthread_mutex_lock(&in->lock);
    if (!in->standby) {
        pthread_mutex_lock(&adev->lock);
        in->standby = true;
        if (in->pcm) {
            pcm_close(in->pcm);
            in->pcm = NULL;
        }
        pthread_mutex_lock(&adev->lock);
        status = stop_input_stream(in);
        pthread_mutex_unlock(&adev->lock);
    }