File: hda_cs_dsp_ctl.h

package info (click to toggle)
linux 6.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,488,076 kB
  • sloc: ansic: 23,401,844; asm: 266,744; sh: 108,976; makefile: 49,705; python: 36,927; perl: 36,810; cpp: 6,044; yacc: 4,904; lex: 2,722; awk: 1,440; ruby: 25; sed: 5
file content (39 lines) | stat: -rw-r--r-- 1,055 bytes parent folder | download | duplicates (13)
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
38
39
/* SPDX-License-Identifier: GPL-2.0
 *
 * HDA DSP ALSA Control Driver
 *
 * Copyright 2022 Cirrus Logic, Inc.
 *
 * Author: Stefan Binding <sbinding@opensource.cirrus.com>
 */

#ifndef __HDA_CS_DSP_CTL_H__
#define __HDA_CS_DSP_CTL_H__

#include <sound/soc.h>
#include <linux/firmware/cirrus/cs_dsp.h>

enum hda_cs_dsp_fw_id {
	HDA_CS_DSP_FW_SPK_PROT,
	HDA_CS_DSP_FW_SPK_CALI,
	HDA_CS_DSP_FW_SPK_DIAG,
	HDA_CS_DSP_FW_MISC,
	HDA_CS_DSP_NUM_FW
};

struct hda_cs_dsp_ctl_info {
	struct snd_card *card;
	enum hda_cs_dsp_fw_id fw_type;
	const char *device_name;
};

extern const char * const hda_cs_dsp_fw_ids[HDA_CS_DSP_NUM_FW];

void hda_cs_dsp_add_controls(struct cs_dsp *dsp, const struct hda_cs_dsp_ctl_info *info);
void hda_cs_dsp_control_remove(struct cs_dsp_coeff_ctl *cs_ctl);
int hda_cs_dsp_write_ctl(struct cs_dsp *dsp, const char *name, int type,
			 unsigned int alg, const void *buf, size_t len);
int hda_cs_dsp_read_ctl(struct cs_dsp *dsp, const char *name, int type,
			unsigned int alg, void *buf, size_t len);

#endif /*__HDA_CS_DSP_CTL_H__*/