You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.7 KiB

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2020-2020. All rights reserved.
* Description: audio hal customized source file.
* Author: Hisilicon
* Create: 2020-05-11
* Notes: NA
* History: 2020-05-11 yinyingcai for CodingStyle
*/
#ifndef AUDIO_CUSTOM_H
#define AUDIO_CUSTOM_H
#include <system/audio.h>
#include <hardware/audio.h>
#include <cutils/str_parms.h>
#include "audio_hw.h"
int custom_init(struct audio_device *adev);
void custom_deinit(struct audio_device *adev);
void custom_open_nano(struct audio_config *config, struct audio_stream_in **streamin);
void custom_close_nano(struct audio_stream_in *stream);
void custom_adev_set_parameters(struct audio_device *dev, struct str_parms *parms);
void custom_adev_get_parameters(const struct audio_device *dev,
struct str_parms *query, struct str_parms *result);
bool custom_in_implement_needed(audio_devices_t devices, audio_input_flags_t flags, audio_source_t source);
int custom_open_input_stream(audio_devices_t devices,
const struct audio_config *config,
audio_input_flags_t flags,
audio_source_t source,
struct stream_in *in);
void custom_close_input_stream(struct stream_in *in);
bool custom_out_implement_needed(audio_devices_t devices,
audio_output_flags_t flags,
struct audio_config *config,
const char *address);
int custom_open_output_stream(audio_devices_t devices,
audio_output_flags_t flags,
struct audio_config *config,
const char *address,
struct stream_out *out);
void custom_close_output_stream(struct stream_out *out);
void custom_calc_extdev_patchsrc_volume(int32_t index, int *integer_gain, int *decimal_gain);
void custom_calc_ao_port_volume(int32_t index, int *integer_gain, int *decimal_gain);
#endif