Debian Codegraph @

src/dsp-state.h

raw symbols SCIP
1 // SPDX-FileCopyrightText: 2022-2025 Geoffrey D. Bennett <[email protected]>
2 // SPDX-License-Identifier: GPL-3.0-or-later
3
4 #pragma once
5
6 #include "alsa.h"
7 #include "biquad.h"
8
9 // Initialise DSP filter state elements for all filter stages
10 // - Creates simulated ALSA elements for filter parameters
11 // - Loads values from state file
12 // Must be called after alsa_get_routing_controls()
13 void dsp_state_init(struct alsa_card *card);
14
15 // Get the simulated element for a filter parameter
16 // filter_type is "Pre-Comp" or "PEQ"
17 // channel is 1 or 2 (Line In channel)
18 // stage is 1-based stage/band number
19 // Returns NULL if not available
20 struct alsa_elem *dsp_state_get_enable_elem(
21 struct alsa_card *card,
22 const char *filter_type,
23 int channel,
24 int stage
25 );
26
27 struct alsa_elem *dsp_state_get_type_elem(
28 struct alsa_card *card,
29 const char *filter_type,
30 int channel,
31 int stage
32 );
33
34 struct alsa_elem *dsp_state_get_freq_elem(
35 struct alsa_card *card,
36 const char *filter_type,
37 int channel,
38 int stage
39 );
40
41 struct alsa_elem *dsp_state_get_q_elem(
42 struct alsa_card *card,
43 const char *filter_type,
44 int channel,
45 int stage
46 );
47
48 struct alsa_elem *dsp_state_get_gain_elem(
49 struct alsa_card *card,
50 const char *filter_type,
51 int channel,
52 int stage
53 );