forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrc_algorithm.h
More file actions
37 lines (32 loc) · 1.02 KB
/
drc_algorithm.h
File metadata and controls
37 lines (32 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2020 Google LLC. All rights reserved.
*
* Author: Pin-chih Lin <johnylin@google.com>
*/
#ifndef __SOF_AUDIO_DRC_DRC_ALGORITHM_H__
#define __SOF_AUDIO_DRC_DRC_ALGORITHM_H__
#include <stdint.h>
#include <sof/audio/drc/drc.h>
#include <sof/platform.h>
#include <user/drc.h>
/* drc reset function */
void drc_reset_state(struct drc_state *state);
/* drc init functions */
int drc_init_pre_delay_buffers(struct drc_state *state,
size_t sample_bytes,
int channels);
int drc_set_pre_delay_time(struct drc_state *state,
int32_t pre_delay_time,
int32_t rate);
/* drc process functions */
void drc_update_detector_average(struct drc_state *state,
const struct sof_drc_params *p,
int nbyte,
int nch);
void drc_update_envelope(struct drc_state *state, const struct sof_drc_params *p);
void drc_compress_output(struct drc_state *state,
const struct sof_drc_params *p,
int nbyte,
int nch);
#endif // __SOF_AUDIO_DRC_DRC_ALGORITHM_H__