Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0
0002  *
0003  * HDA DSP ALSA Control Driver
0004  *
0005  * Copyright 2022 Cirrus Logic, Inc.
0006  *
0007  * Author: Stefan Binding <sbinding@opensource.cirrus.com>
0008  */
0009 
0010 #ifndef __HDA_CS_DSP_CTL_H__
0011 #define __HDA_CS_DSP_CTL_H__
0012 
0013 #include <sound/soc.h>
0014 #include <linux/firmware/cirrus/cs_dsp.h>
0015 
0016 enum hda_cs_dsp_fw_id {
0017     HDA_CS_DSP_FW_SPK_PROT,
0018     HDA_CS_DSP_FW_SPK_CALI,
0019     HDA_CS_DSP_FW_SPK_DIAG,
0020     HDA_CS_DSP_FW_MISC,
0021     HDA_CS_DSP_NUM_FW
0022 };
0023 
0024 struct hda_cs_dsp_ctl_info {
0025     struct snd_card *card;
0026     enum hda_cs_dsp_fw_id fw_type;
0027     const char *device_name;
0028 };
0029 
0030 extern const char * const hda_cs_dsp_fw_ids[HDA_CS_DSP_NUM_FW];
0031 
0032 int hda_cs_dsp_control_add(struct cs_dsp_coeff_ctl *cs_ctl, struct hda_cs_dsp_ctl_info *info);
0033 void hda_cs_dsp_control_remove(struct cs_dsp_coeff_ctl *cs_ctl);
0034 int hda_cs_dsp_write_ctl(struct cs_dsp *dsp, const char *name, int type,
0035              unsigned int alg, const void *buf, size_t len);
0036 int hda_cs_dsp_read_ctl(struct cs_dsp *dsp, const char *name, int type,
0037             unsigned int alg, void *buf, size_t len);
0038 
0039 #endif /*__HDA_CS_DSP_CTL_H__*/