Symbol: sigmadsp
sound/soc/codecs/adau1701.c
117
struct sigmadsp *sigmadsp;
sound/soc/codecs/adau1701.c
255
static int adau1701_safeload(struct sigmadsp *sigmadsp, unsigned int addr,
sound/soc/codecs/adau1701.c
258
struct i2c_client *client = to_i2c_client(sigmadsp->dev);
sound/soc/codecs/adau1701.c
306
sigmadsp_reset(adau1701->sigmadsp);
sound/soc/codecs/adau1701.c
347
ret = sigmadsp_setup(adau1701->sigmadsp, rate);
sound/soc/codecs/adau1701.c
621
return sigmadsp_restrict_params(adau1701->sigmadsp, substream);
sound/soc/codecs/adau1701.c
672
ret = sigmadsp_attach(adau1701->sigmadsp, component);
sound/soc/codecs/adau1701.c
845
adau1701->sigmadsp = devm_sigmadsp_init_i2c(client,
sound/soc/codecs/adau1701.c
847
if (IS_ERR(adau1701->sigmadsp)) {
sound/soc/codecs/adau1701.c
848
ret = PTR_ERR(adau1701->sigmadsp);
sound/soc/codecs/adau17x1.c
1012
ret = regmap_raw_write(sigmadsp->control_data,
sound/soc/codecs/adau17x1.c
1018
ret = regmap_raw_write(sigmadsp->control_data,
sound/soc/codecs/adau17x1.c
1029
ret = regmap_raw_write(sigmadsp->control_data,
sound/soc/codecs/adau17x1.c
1036
ret = regmap_raw_write(sigmadsp->control_data,
sound/soc/codecs/adau17x1.c
1093
adau->sigmadsp = devm_sigmadsp_init_regmap(dev, regmap,
sound/soc/codecs/adau17x1.c
1096
adau->sigmadsp = devm_sigmadsp_init_regmap(dev, regmap,
sound/soc/codecs/adau17x1.c
1099
if (IS_ERR(adau->sigmadsp)) {
sound/soc/codecs/adau17x1.c
1101
PTR_ERR(adau->sigmadsp));
sound/soc/codecs/adau17x1.c
1102
adau->sigmadsp = NULL;
sound/soc/codecs/adau17x1.c
535
if (adau->sigmadsp) {
sound/soc/codecs/adau17x1.c
773
if (adau->sigmadsp)
sound/soc/codecs/adau17x1.c
774
return sigmadsp_restrict_params(adau->sigmadsp, substream);
sound/soc/codecs/adau17x1.c
892
if (adau->sigmadsp->current_samplerate == rate)
sound/soc/codecs/adau17x1.c
909
ret = sigmadsp_setup(adau->sigmadsp, rate);
sound/soc/codecs/adau17x1.c
944
if (!adau->sigmadsp)
sound/soc/codecs/adau17x1.c
947
ret = sigmadsp_attach(adau->sigmadsp, component);
sound/soc/codecs/adau17x1.c
998
static int adau17x1_safeload(struct sigmadsp *sigmadsp, unsigned int addr,
sound/soc/codecs/adau17x1.h
54
struct sigmadsp *sigmadsp;
sound/soc/codecs/sigmadsp-i2c.c
77
struct sigmadsp *devm_sigmadsp_init_i2c(struct i2c_client *client,
sound/soc/codecs/sigmadsp-i2c.c
80
struct sigmadsp *sigmadsp;
sound/soc/codecs/sigmadsp-i2c.c
82
sigmadsp = devm_sigmadsp_init(&client->dev, ops, firmware_name);
sound/soc/codecs/sigmadsp-i2c.c
83
if (IS_ERR(sigmadsp))
sound/soc/codecs/sigmadsp-i2c.c
84
return sigmadsp;
sound/soc/codecs/sigmadsp-i2c.c
86
sigmadsp->control_data = client;
sound/soc/codecs/sigmadsp-i2c.c
87
sigmadsp->write = sigmadsp_write_i2c;
sound/soc/codecs/sigmadsp-i2c.c
88
sigmadsp->read = sigmadsp_read_i2c;
sound/soc/codecs/sigmadsp-i2c.c
90
return sigmadsp;
sound/soc/codecs/sigmadsp-regmap.c
39
struct sigmadsp *devm_sigmadsp_init_regmap(struct device *dev,
sound/soc/codecs/sigmadsp-regmap.c
43
struct sigmadsp *sigmadsp;
sound/soc/codecs/sigmadsp-regmap.c
45
sigmadsp = devm_sigmadsp_init(dev, ops, firmware_name);
sound/soc/codecs/sigmadsp-regmap.c
46
if (IS_ERR(sigmadsp))
sound/soc/codecs/sigmadsp-regmap.c
47
return sigmadsp;
sound/soc/codecs/sigmadsp-regmap.c
49
sigmadsp->control_data = regmap;
sound/soc/codecs/sigmadsp-regmap.c
50
sigmadsp->write = sigmadsp_write_regmap;
sound/soc/codecs/sigmadsp-regmap.c
51
sigmadsp->read = sigmadsp_read_regmap;
sound/soc/codecs/sigmadsp-regmap.c
53
return sigmadsp;
sound/soc/codecs/sigmadsp.c
101
static int sigmadsp_read(struct sigmadsp *sigmadsp, unsigned int addr,
sound/soc/codecs/sigmadsp.c
104
return sigmadsp->read(sigmadsp->control_data, addr, data, len);
sound/soc/codecs/sigmadsp.c
118
static int sigmadsp_ctrl_write(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
122
if (ctrl->num_bytes <= 20 && sigmadsp->ops && sigmadsp->ops->safeload)
sound/soc/codecs/sigmadsp.c
123
return sigmadsp->ops->safeload(sigmadsp, ctrl->addr, data,
sound/soc/codecs/sigmadsp.c
126
return sigmadsp_write(sigmadsp, ctrl->addr, data,
sound/soc/codecs/sigmadsp.c
134
struct sigmadsp *sigmadsp = snd_kcontrol_chip(kcontrol);
sound/soc/codecs/sigmadsp.c
138
mutex_lock(&sigmadsp->lock);
sound/soc/codecs/sigmadsp.c
143
ret = sigmadsp_ctrl_write(sigmadsp, ctrl, data);
sound/soc/codecs/sigmadsp.c
151
mutex_unlock(&sigmadsp->lock);
sound/soc/codecs/sigmadsp.c
160
struct sigmadsp *sigmadsp = snd_kcontrol_chip(kcontrol);
sound/soc/codecs/sigmadsp.c
163
mutex_lock(&sigmadsp->lock);
sound/soc/codecs/sigmadsp.c
166
ret = sigmadsp_read(sigmadsp, ctrl->addr, ctrl->cache,
sound/soc/codecs/sigmadsp.c
177
mutex_unlock(&sigmadsp->lock);
sound/soc/codecs/sigmadsp.c
202
static int sigma_fw_load_control(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
250
list_add_tail(&ctrl->head, &sigmadsp->ctrl_list);
sound/soc/codecs/sigmadsp.c
260
static int sigma_fw_load_data(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
281
list_add_tail(&data->head, &sigmadsp->data_list);
sound/soc/codecs/sigmadsp.c
286
static int sigma_fw_load_samplerates(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
302
if (sigmadsp->rate_constraints.count)
sound/soc/codecs/sigmadsp.c
312
sigmadsp->rate_constraints.count = num_rates;
sound/soc/codecs/sigmadsp.c
313
sigmadsp->rate_constraints.list = rates;
sound/soc/codecs/sigmadsp.c
318
static int sigmadsp_fw_load_v2(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
344
ret = sigma_fw_load_data(sigmadsp, chunk, length);
sound/soc/codecs/sigmadsp.c
347
ret = sigma_fw_load_control(sigmadsp, chunk, length);
sound/soc/codecs/sigmadsp.c
350
ret = sigma_fw_load_samplerates(sigmadsp, chunk, length);
sound/soc/codecs/sigmadsp.c
353
dev_warn(sigmadsp->dev, "Unknown chunk type: %d\n",
sound/soc/codecs/sigmadsp.c
400
static int process_sigma_action(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
423
list_add_tail(&data->head, &sigmadsp->data_list);
sound/soc/codecs/sigmadsp.c
434
static int sigmadsp_fw_load_v1(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
451
ret = process_sigma_action(sigmadsp, sa);
sound/soc/codecs/sigmadsp.c
465
static void sigmadsp_firmware_release(struct sigmadsp *sigmadsp)
sound/soc/codecs/sigmadsp.c
470
list_for_each_entry_safe(ctrl, _ctrl, &sigmadsp->ctrl_list, head) {
sound/soc/codecs/sigmadsp.c
475
list_for_each_entry_safe(data, _data, &sigmadsp->data_list, head)
sound/soc/codecs/sigmadsp.c
478
INIT_LIST_HEAD(&sigmadsp->ctrl_list);
sound/soc/codecs/sigmadsp.c
479
INIT_LIST_HEAD(&sigmadsp->data_list);
sound/soc/codecs/sigmadsp.c
484
sigmadsp_firmware_release((struct sigmadsp *)res);
sound/soc/codecs/sigmadsp.c
487
static int sigmadsp_firmware_load(struct sigmadsp *sigmadsp, const char *name)
sound/soc/codecs/sigmadsp.c
495
ret = request_firmware(&fw, name, sigmadsp->dev);
sound/soc/codecs/sigmadsp.c
511
dev_err(sigmadsp->dev, "Failed to load firmware: Invalid size\n");
sound/soc/codecs/sigmadsp.c
517
dev_err(sigmadsp->dev, "Failed to load firmware: Invalid magic\n");
sound/soc/codecs/sigmadsp.c
525
dev_err(sigmadsp->dev, "Failed to load firmware: Wrong crc checksum: expected %x got %x\n",
sound/soc/codecs/sigmadsp.c
532
ret = sigmadsp_fw_load_v1(sigmadsp, fw);
sound/soc/codecs/sigmadsp.c
535
ret = sigmadsp_fw_load_v2(sigmadsp, fw);
sound/soc/codecs/sigmadsp.c
538
dev_err(sigmadsp->dev,
sound/soc/codecs/sigmadsp.c
546
sigmadsp_firmware_release(sigmadsp);
sound/soc/codecs/sigmadsp.c
554
static int sigmadsp_init(struct sigmadsp *sigmadsp, struct device *dev,
sound/soc/codecs/sigmadsp.c
557
sigmadsp->ops = ops;
sound/soc/codecs/sigmadsp.c
558
sigmadsp->dev = dev;
sound/soc/codecs/sigmadsp.c
560
INIT_LIST_HEAD(&sigmadsp->ctrl_list);
sound/soc/codecs/sigmadsp.c
561
INIT_LIST_HEAD(&sigmadsp->data_list);
sound/soc/codecs/sigmadsp.c
562
mutex_init(&sigmadsp->lock);
sound/soc/codecs/sigmadsp.c
564
return sigmadsp_firmware_load(sigmadsp, firmware_name);
sound/soc/codecs/sigmadsp.c
577
struct sigmadsp *devm_sigmadsp_init(struct device *dev,
sound/soc/codecs/sigmadsp.c
580
struct sigmadsp *sigmadsp;
sound/soc/codecs/sigmadsp.c
583
sigmadsp = devres_alloc(devm_sigmadsp_release, sizeof(*sigmadsp),
sound/soc/codecs/sigmadsp.c
585
if (!sigmadsp)
sound/soc/codecs/sigmadsp.c
588
ret = sigmadsp_init(sigmadsp, dev, ops, firmware_name);
sound/soc/codecs/sigmadsp.c
590
devres_free(sigmadsp);
sound/soc/codecs/sigmadsp.c
594
devres_add(dev, sigmadsp);
sound/soc/codecs/sigmadsp.c
596
return sigmadsp;
sound/soc/codecs/sigmadsp.c
600
static int sigmadsp_rate_to_index(struct sigmadsp *sigmadsp, unsigned int rate)
sound/soc/codecs/sigmadsp.c
604
for (i = 0; i < sigmadsp->rate_constraints.count; i++) {
sound/soc/codecs/sigmadsp.c
605
if (sigmadsp->rate_constraints.list[i] == rate)
sound/soc/codecs/sigmadsp.c
612
static unsigned int sigmadsp_get_samplerate_mask(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
620
if (sigmadsp->rate_constraints.count) {
sound/soc/codecs/sigmadsp.c
621
samplerate_index = sigmadsp_rate_to_index(sigmadsp, samplerate);
sound/soc/codecs/sigmadsp.c
641
static int sigmadsp_alloc_control(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
658
kcontrol = snd_ctl_new1(&template, sigmadsp);
sound/soc/codecs/sigmadsp.c
665
return snd_ctl_add(sigmadsp->component->card->snd_card, kcontrol);
sound/soc/codecs/sigmadsp.c
668
static void sigmadsp_activate_ctrl(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
671
struct snd_card *card = sigmadsp->component->card->snd_card;
sound/soc/codecs/sigmadsp.c
680
mutex_lock(&sigmadsp->lock);
sound/soc/codecs/sigmadsp.c
682
sigmadsp_ctrl_write(sigmadsp, ctrl, ctrl->cache);
sound/soc/codecs/sigmadsp.c
683
mutex_unlock(&sigmadsp->lock);
sound/soc/codecs/sigmadsp.c
698
int sigmadsp_attach(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
705
sigmadsp->component = component;
sound/soc/codecs/sigmadsp.c
707
samplerate_mask = sigmadsp_get_samplerate_mask(sigmadsp,
sound/soc/codecs/sigmadsp.c
708
sigmadsp->current_samplerate);
sound/soc/codecs/sigmadsp.c
710
list_for_each_entry(ctrl, &sigmadsp->ctrl_list, head) {
sound/soc/codecs/sigmadsp.c
711
ret = sigmadsp_alloc_control(sigmadsp, ctrl, samplerate_mask);
sound/soc/codecs/sigmadsp.c
731
int sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int samplerate)
sound/soc/codecs/sigmadsp.c
738
if (sigmadsp->current_samplerate == samplerate)
sound/soc/codecs/sigmadsp.c
741
samplerate_mask = sigmadsp_get_samplerate_mask(sigmadsp, samplerate);
sound/soc/codecs/sigmadsp.c
745
list_for_each_entry(data, &sigmadsp->data_list, head) {
sound/soc/codecs/sigmadsp.c
749
ret = sigmadsp_write(sigmadsp, data->addr, data->data,
sound/soc/codecs/sigmadsp.c
755
list_for_each_entry(ctrl, &sigmadsp->ctrl_list, head)
sound/soc/codecs/sigmadsp.c
756
sigmadsp_activate_ctrl(sigmadsp, ctrl, samplerate_mask);
sound/soc/codecs/sigmadsp.c
758
sigmadsp->current_samplerate = samplerate;
sound/soc/codecs/sigmadsp.c
762
sigmadsp_reset(sigmadsp);
sound/soc/codecs/sigmadsp.c
775
void sigmadsp_reset(struct sigmadsp *sigmadsp)
sound/soc/codecs/sigmadsp.c
779
list_for_each_entry(ctrl, &sigmadsp->ctrl_list, head)
sound/soc/codecs/sigmadsp.c
780
sigmadsp_activate_ctrl(sigmadsp, ctrl, false);
sound/soc/codecs/sigmadsp.c
782
sigmadsp->current_samplerate = 0;
sound/soc/codecs/sigmadsp.c
796
int sigmadsp_restrict_params(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.c
799
if (sigmadsp->rate_constraints.count == 0)
sound/soc/codecs/sigmadsp.c
803
SNDRV_PCM_HW_PARAM_RATE, &sigmadsp->rate_constraints);
sound/soc/codecs/sigmadsp.c
95
static int sigmadsp_write(struct sigmadsp *sigmadsp, unsigned int addr,
sound/soc/codecs/sigmadsp.c
98
return sigmadsp->write(sigmadsp->control_data, addr, data, len);
sound/soc/codecs/sigmadsp.h
17
struct sigmadsp;
sound/soc/codecs/sigmadsp.h
22
int (*safeload)(struct sigmadsp *sigmadsp, unsigned int addr,
sound/soc/codecs/sigmadsp.h
45
struct sigmadsp *devm_sigmadsp_init(struct device *dev,
sound/soc/codecs/sigmadsp.h
48
int sigmadsp_restrict_params(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.h
53
struct sigmadsp *devm_sigmadsp_init_regmap(struct device *dev,
sound/soc/codecs/sigmadsp.h
56
struct sigmadsp *devm_sigmadsp_init_i2c(struct i2c_client *client,
sound/soc/codecs/sigmadsp.h
59
int sigmadsp_attach(struct sigmadsp *sigmadsp,
sound/soc/codecs/sigmadsp.h
61
int sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int samplerate);
sound/soc/codecs/sigmadsp.h
62
void sigmadsp_reset(struct sigmadsp *sigmadsp);