#include <linux/crc32.h>
#include <linux/firmware.h>
#include <linux/kernel.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <sound/control.h>
#include <sound/soc.h>
#include "sigmadsp.h"
#define SIGMA_MAGIC …
#define SIGMA_FW_CHUNK_TYPE_DATA …
#define SIGMA_FW_CHUNK_TYPE_CONTROL …
#define SIGMA_FW_CHUNK_TYPE_SAMPLERATES …
#define READBACK_CTRL_NAME …
struct sigmadsp_control { … };
struct sigmadsp_data { … };
struct sigma_fw_chunk { … } __packed;
struct sigma_fw_chunk_data { … } __packed;
struct sigma_fw_chunk_control { … } __packed;
struct sigma_fw_chunk_samplerate { … } __packed;
struct sigma_firmware_header { … } __packed;
enum { … };
struct sigma_action { … } __packed;
static int sigmadsp_write(struct sigmadsp *sigmadsp, unsigned int addr,
const uint8_t data[], size_t len)
{ … }
static int sigmadsp_read(struct sigmadsp *sigmadsp, unsigned int addr,
uint8_t data[], size_t len)
{ … }
static int sigmadsp_ctrl_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *info)
{ … }
static int sigmadsp_ctrl_write(struct sigmadsp *sigmadsp,
struct sigmadsp_control *ctrl, void *data)
{ … }
static int sigmadsp_ctrl_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int sigmadsp_ctrl_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static void sigmadsp_control_free(struct snd_kcontrol *kcontrol)
{ … }
static bool sigma_fw_validate_control_name(const char *name, unsigned int len)
{ … }
static int sigma_fw_load_control(struct sigmadsp *sigmadsp,
const struct sigma_fw_chunk *chunk, unsigned int length)
{ … }
static int sigma_fw_load_data(struct sigmadsp *sigmadsp,
const struct sigma_fw_chunk *chunk, unsigned int length)
{ … }
static int sigma_fw_load_samplerates(struct sigmadsp *sigmadsp,
const struct sigma_fw_chunk *chunk, unsigned int length)
{ … }
static int sigmadsp_fw_load_v2(struct sigmadsp *sigmadsp,
const struct firmware *fw)
{ … }
static inline u32 sigma_action_len(struct sigma_action *sa)
{ … }
static size_t sigma_action_size(struct sigma_action *sa)
{ … }
static int process_sigma_action(struct sigmadsp *sigmadsp,
struct sigma_action *sa)
{ … }
static int sigmadsp_fw_load_v1(struct sigmadsp *sigmadsp,
const struct firmware *fw)
{ … }
static void sigmadsp_firmware_release(struct sigmadsp *sigmadsp)
{ … }
static void devm_sigmadsp_release(struct device *dev, void *res)
{ … }
static int sigmadsp_firmware_load(struct sigmadsp *sigmadsp, const char *name)
{ … }
static int sigmadsp_init(struct sigmadsp *sigmadsp, struct device *dev,
const struct sigmadsp_ops *ops, const char *firmware_name)
{ … }
struct sigmadsp *devm_sigmadsp_init(struct device *dev,
const struct sigmadsp_ops *ops, const char *firmware_name)
{ … }
EXPORT_SYMBOL_GPL(…);
static int sigmadsp_rate_to_index(struct sigmadsp *sigmadsp, unsigned int rate)
{ … }
static unsigned int sigmadsp_get_samplerate_mask(struct sigmadsp *sigmadsp,
unsigned int samplerate)
{ … }
static bool sigmadsp_samplerate_valid(unsigned int supported,
unsigned int requested)
{ … }
static int sigmadsp_alloc_control(struct sigmadsp *sigmadsp,
struct sigmadsp_control *ctrl, unsigned int samplerate_mask)
{ … }
static void sigmadsp_activate_ctrl(struct sigmadsp *sigmadsp,
struct sigmadsp_control *ctrl, unsigned int samplerate_mask)
{ … }
int sigmadsp_attach(struct sigmadsp *sigmadsp,
struct snd_soc_component *component)
{ … }
EXPORT_SYMBOL_GPL(…);
int sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int samplerate)
{ … }
EXPORT_SYMBOL_GPL(…);
void sigmadsp_reset(struct sigmadsp *sigmadsp)
{ … }
EXPORT_SYMBOL_GPL(…);
int sigmadsp_restrict_params(struct sigmadsp *sigmadsp,
struct snd_pcm_substream *substream)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;