blob: 601445f9239ed82b3dcde8257d6a9dce7f07d82f [file] [log] [blame]
Christopher N. Hesse757ac412017-01-28 14:42:48 +01001/*
2 * Copyright (C) 2013 The Android Open Source Project
3 * Copyright (C) 2017 Christopher N. Hesse <raymanfx@gmail.com>
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef COMPRESS_OFFLOAD_H
19#define COMPRESS_OFFLOAD_H
20
21void stop_compressed_output_l(struct stream_out *out);
22
23int create_offload_callback_thread(struct stream_out *out);
24
25int destroy_offload_callback_thread(struct stream_out *out);
26
27int parse_compress_metadata(struct stream_out *out, struct str_parms *parms);
28
29int stop_output_offload_stream(struct stream_out *out, bool *disable);
30
31int out_set_offload_parameters(struct audio_device *adev, struct audio_usecase *uc_info);
32
33ssize_t out_write_offload(struct audio_stream_out *stream, const void *buffer,
34 size_t bytes);
35
36int out_get_render_offload_position(struct stream_out *out,
37 uint32_t *dsp_frames);
38
39int out_get_presentation_offload_position(struct stream_out *out, uint64_t *frames,
40 struct timespec *timestamp);
41
42int out_pause_offload(struct stream_out *out);
43
44int out_resume_offload(struct stream_out *out);
45
46int out_drain_offload(struct stream_out *out, audio_drain_type_t type);
47
48int out_flush_offload(struct stream_out *out);
49
50int out_set_offload_volume(float left, float right);
51
52#endif // COMPRESS_OFFLOAD_H