Revert "audio: Fix for alarm and compress playback concurrency"
This reverts commit 5b10fbc0e8f651add1bc8b742b75237d1b56e800.
diff --git a/audio/hal/audio_hw.c b/audio/hal/audio_hw.c
index f4427b1..c860cd7 100644
--- a/audio/hal/audio_hw.c
+++ b/audio/hal/audio_hw.c
@@ -710,12 +710,6 @@
if (snd_device_name == NULL)
return -EINVAL;
- if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES) {
- ALOGD("Request to enable combo device: enable individual devices\n");
- enable_snd_device(adev, uc_info, SND_DEVICE_OUT_SPEAKER, update_mixer);
- enable_snd_device(adev, uc_info, SND_DEVICE_OUT_HEADPHONES, update_mixer);
- return 0;
- }
adev->snd_dev_ref_cnt[snd_device]++;
if (adev->snd_dev_ref_cnt[snd_device] > 1) {
ALOGV("%s: snd_device(%d: %s) is already active",
@@ -748,13 +742,6 @@
if (snd_device_name == NULL)
return -EINVAL;
- if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES) {
- ALOGD("Request to disable combo device: disable individual devices\n");
- disable_snd_device(adev, uc_info, SND_DEVICE_OUT_SPEAKER, update_mixer);
- disable_snd_device(adev, uc_info, SND_DEVICE_OUT_HEADPHONES, update_mixer);
- return 0;
- }
-
if (adev->snd_dev_ref_cnt[snd_device] <= 0) {
ALOGE("%s: device ref cnt is already 0", __func__);
return -EINVAL;
@@ -2378,6 +2365,7 @@
uc_select_pcm_devices(uc_info);
list_add_tail(&adev->usecase_list, &uc_info->adev_list_node);
+
select_devices(adev, out->usecase);
}
@@ -2761,21 +2749,8 @@
}
if (do_standby)
do_out_standby_l(out);
- else {
- if (out->usecase == USECASE_AUDIO_PLAYBACK_OFFLOAD) {
- uc_info = get_usecase_from_id(adev, USECASE_AUDIO_PLAYBACK);
- if (uc_info == NULL) {
- ALOGE("%s: Could not find the usecase (%d) in the list",
- __func__, USECASE_AUDIO_PLAYBACK);
- }
- if (uc_info != NULL && uc_info->out_snd_device == SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES) {
- ALOGD("Out_set_param: spk+headset enabled\n");
- disable_snd_device(adev, uc_info, SND_DEVICE_OUT_SPEAKER, true);
- uc_info->out_snd_device = SND_DEVICE_OUT_HEADPHONES;
- }
- }
+ else
select_devices(adev, out->usecase);
- }
}
if ((adev->mode == AUDIO_MODE_IN_CALL) && !adev->in_call &&