* be switched to new device when select_devices() is called for voice call
* usecase.
*/
- if (adev->in_call) {
+ if (adev->voice.in_call) {
vc_usecase = get_usecase_from_id(adev, USECASE_VOICE_CALL);
if (usecase == NULL) {
ALOGE("%s: Could not find the voice call usecase", __func__);
struct audio_usecase *uc_info;
ALOGV("%s: enter", __func__);
- adev->in_call = false;
+ adev->voice.in_call = false;
/* TODO: implement voice call stop */
/* TODO: implement voice call start */
/* set cached volume */
- set_voice_volume_l(adev, adev->voice_volume);
+ set_voice_volume_l(adev, adev->voice.volume);
- adev->in_call = true;
+ adev->voice.in_call = true;
exit:
ALOGV("%s: exit", __func__);
return ret;
}
}
- if ((adev->mode == AUDIO_MODE_IN_CALL) && !adev->in_call &&
+ if ((adev->mode == AUDIO_MODE_IN_CALL) && !adev->voice.in_call &&
(out == adev->primary_output)) {
start_voice_call(adev);
- } else if ((adev->mode == AUDIO_MODE_IN_CALL) && adev->in_call &&
+ } else if ((adev->mode == AUDIO_MODE_IN_CALL) &&
+ adev->voice.in_call &&
(out == adev->primary_output)) {
select_devices(adev, USECASE_VOICE_CALL);
}
}
- if ((adev->mode == AUDIO_MODE_NORMAL) && adev->in_call &&
+ if ((adev->mode == AUDIO_MODE_NORMAL) && adev->voice.in_call &&
(out == adev->primary_output)) {
stop_voice_call(adev);
}
* But it is currently not supported.
*/
if (strcmp(value, AUDIO_PARAMETER_VALUE_ON) == 0)
- adev->bluetooth_nrec = true;
+ adev->voice.bluetooth_nrec = true;
else
- adev->bluetooth_nrec = false;
+ adev->voice.bluetooth_nrec = false;
}
#if SWAP_SPEAKER_ON_SCREEN_ROTATION
struct audio_device *adev = (struct audio_device *)dev;
pthread_mutex_lock(&adev->lock);
/* cache volume */
- adev->voice_volume = volume;
- ret = set_voice_volume_l(adev, adev->voice_volume);
+ adev->voice.volume = volume;
+ ret = set_voice_volume_l(adev, adev->voice.volume);
pthread_mutex_unlock(&adev->lock);
return ret;
}
adev->mode = AUDIO_MODE_NORMAL;
adev->active_input = NULL;
adev->primary_output = NULL;
- adev->voice_volume = 1.0f;
- adev->bluetooth_nrec = true;
- adev->in_call = false;
+
+ adev->voice.volume = 1.0f;
+ adev->voice.bluetooth_nrec = true;
+ adev->voice.in_call = false;
+
/* adev->cur_hdmi_channels = 0; by calloc() */
adev->snd_dev_ref_cnt = calloc(SND_DEVICE_MAX, sizeof(int));
if (adev->snd_dev_ref_cnt == NULL) {