13233b978SStefan Binding /* SPDX-License-Identifier: GPL-2.0 23233b978SStefan Binding * 33233b978SStefan Binding * HDA DSP ALSA Control Driver 43233b978SStefan Binding * 53233b978SStefan Binding * Copyright 2022 Cirrus Logic, Inc. 63233b978SStefan Binding * 73233b978SStefan Binding * Author: Stefan Binding <sbinding@opensource.cirrus.com> 83233b978SStefan Binding */ 93233b978SStefan Binding 103233b978SStefan Binding #ifndef __HDA_CS_DSP_CTL_H__ 113233b978SStefan Binding #define __HDA_CS_DSP_CTL_H__ 123233b978SStefan Binding 133233b978SStefan Binding #include <sound/soc.h> 143233b978SStefan Binding #include <linux/firmware/cirrus/cs_dsp.h> 153233b978SStefan Binding 163233b978SStefan Binding enum hda_cs_dsp_fw_id { 173233b978SStefan Binding HDA_CS_DSP_FW_SPK_PROT, 183233b978SStefan Binding HDA_CS_DSP_FW_SPK_CALI, 193233b978SStefan Binding HDA_CS_DSP_FW_SPK_DIAG, 203233b978SStefan Binding HDA_CS_DSP_FW_MISC, 213233b978SStefan Binding HDA_CS_DSP_NUM_FW 223233b978SStefan Binding }; 233233b978SStefan Binding 243233b978SStefan Binding struct hda_cs_dsp_ctl_info { 253233b978SStefan Binding struct snd_card *card; 263233b978SStefan Binding enum hda_cs_dsp_fw_id fw_type; 273233b978SStefan Binding const char *device_name; 283233b978SStefan Binding }; 293233b978SStefan Binding 30291e7c22SStefan Binding extern const char * const hda_cs_dsp_fw_ids[HDA_CS_DSP_NUM_FW]; 31291e7c22SStefan Binding 32*2176c6b5SRichard Fitzgerald void hda_cs_dsp_add_controls(struct cs_dsp *dsp, const struct hda_cs_dsp_ctl_info *info); 333233b978SStefan Binding void hda_cs_dsp_control_remove(struct cs_dsp_coeff_ctl *cs_ctl); 34e414b05eSStefan Binding int hda_cs_dsp_write_ctl(struct cs_dsp *dsp, const char *name, int type, 35e414b05eSStefan Binding unsigned int alg, const void *buf, size_t len); 36e414b05eSStefan Binding int hda_cs_dsp_read_ctl(struct cs_dsp *dsp, const char *name, int type, 37e414b05eSStefan Binding unsigned int alg, void *buf, size_t len); 383233b978SStefan Binding 393233b978SStefan Binding #endif /*__HDA_CS_DSP_CTL_H__*/ 40