blob: 0e32f0aed256e227fdc433fda2e19da037db606f [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);
42
43struct voice_session *voice_session_init(struct audio_device *adev);
Christopher N. Hesse41c9f3d2017-02-02 20:48:56 +010044void voice_session_deinit(struct voice_session *s);
45
46#endif /* VOICE_CALL_H */