blob: 10f0fef8890dfeb5d602672472769f454b0bd4df [file] [log] [blame]
Christopher N. Hesse41c9f3d2017-02-02 20:48:56 +01001/*
2 * Copyright (C) 2017 Christopher N. Hesse <raymanfx@gmail.com>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef VOICE_CALL_H
18#define VOICE_CALL_H
19
20#include "ril_interface.h"
21
22struct voice_session {
23 struct ril_handle ril;
24
25 struct pcm *pcm_voice_rx;
26 struct pcm *pcm_voice_tx;
27
28 bool wb_amr;
29 bool two_mic_control;
30 bool two_mic_disabled;
31
32 /* from uc_info */
33 audio_devices_t out_device;
34};
35
Christopher N. Hesse696959d2017-02-02 20:49:55 +010036void prepare_voice_session(struct voice_session *session,
37 audio_devices_t active_out_devices);
38int start_voice_session(struct voice_session *session);
39void stop_voice_session(struct voice_session *session);
40void set_voice_session_volume(struct voice_session *session, float volume);
41void set_voice_session_audio_path(struct voice_session *session);
Andreas Schneider107a8482017-02-06 12:36:31 +010042void set_voice_session_mic_mute(struct voice_session *session, bool state);
Christopher N. Hesse696959d2017-02-02 20:49:55 +010043
Andreas Schneider82f32482017-02-06 09:00:48 +010044bool voice_session_uses_twomic(struct voice_session *session);
Andreas Schneider59486fa2017-02-06 09:16:39 +010045bool voice_session_uses_wideband(struct voice_session *session);
Andreas Schneider82f32482017-02-06 09:00:48 +010046
Christopher N. Hesse696959d2017-02-02 20:49:55 +010047struct voice_session *voice_session_init(struct audio_device *adev);
Christopher N. Hesse41c9f3d2017-02-02 20:48:56 +010048void voice_session_deinit(struct voice_session *s);
49
50#endif /* VOICE_CALL_H */