sigmadsp 118 sound/soc/codecs/adau1701.c struct sigmadsp *sigmadsp; sigmadsp 256 sound/soc/codecs/adau1701.c static int adau1701_safeload(struct sigmadsp *sigmadsp, unsigned int addr, sigmadsp 259 sound/soc/codecs/adau1701.c struct i2c_client *client = to_i2c_client(sigmadsp->dev); sigmadsp 306 sound/soc/codecs/adau1701.c sigmadsp_reset(adau1701->sigmadsp); sigmadsp 348 sound/soc/codecs/adau1701.c ret = sigmadsp_setup(adau1701->sigmadsp, rate); sigmadsp 622 sound/soc/codecs/adau1701.c return sigmadsp_restrict_params(adau1701->sigmadsp, substream); sigmadsp 672 sound/soc/codecs/adau1701.c ret = sigmadsp_attach(adau1701->sigmadsp, component); sigmadsp 881 sound/soc/codecs/adau1701.c adau1701->sigmadsp = devm_sigmadsp_init_i2c(client, sigmadsp 883 sound/soc/codecs/adau1701.c if (IS_ERR(adau1701->sigmadsp)) { sigmadsp 884 sound/soc/codecs/adau1701.c ret = PTR_ERR(adau1701->sigmadsp); sigmadsp 524 sound/soc/codecs/adau17x1.c if (adau->sigmadsp) { sigmadsp 753 sound/soc/codecs/adau17x1.c if (adau->sigmadsp) sigmadsp 754 sound/soc/codecs/adau17x1.c return sigmadsp_restrict_params(adau->sigmadsp, substream); sigmadsp 872 sound/soc/codecs/adau17x1.c if (adau->sigmadsp->current_samplerate == rate) sigmadsp 889 sound/soc/codecs/adau17x1.c ret = sigmadsp_setup(adau->sigmadsp, rate); sigmadsp 924 sound/soc/codecs/adau17x1.c if (!adau->sigmadsp) sigmadsp 927 sound/soc/codecs/adau17x1.c ret = sigmadsp_attach(adau->sigmadsp, component); sigmadsp 978 sound/soc/codecs/adau17x1.c static int adau17x1_safeload(struct sigmadsp *sigmadsp, unsigned int addr, sigmadsp 992 sound/soc/codecs/adau17x1.c ret = regmap_raw_write(sigmadsp->control_data, sigmadsp 998 sound/soc/codecs/adau17x1.c ret = regmap_raw_write(sigmadsp->control_data, sigmadsp 1009 sound/soc/codecs/adau17x1.c ret = regmap_raw_write(sigmadsp->control_data, sigmadsp 1016 sound/soc/codecs/adau17x1.c ret = regmap_raw_write(sigmadsp->control_data, sigmadsp 1074 sound/soc/codecs/adau17x1.c adau->sigmadsp = devm_sigmadsp_init_regmap(dev, regmap, sigmadsp 1077 sound/soc/codecs/adau17x1.c adau->sigmadsp = devm_sigmadsp_init_regmap(dev, regmap, sigmadsp 1080 sound/soc/codecs/adau17x1.c if (IS_ERR(adau->sigmadsp)) { sigmadsp 1082 sound/soc/codecs/adau17x1.c PTR_ERR(adau->sigmadsp)); sigmadsp 1083 sound/soc/codecs/adau17x1.c adau->sigmadsp = NULL; sigmadsp 53 sound/soc/codecs/adau17x1.h struct sigmadsp *sigmadsp; sigmadsp 77 sound/soc/codecs/sigmadsp-i2c.c struct sigmadsp *devm_sigmadsp_init_i2c(struct i2c_client *client, sigmadsp 80 sound/soc/codecs/sigmadsp-i2c.c struct sigmadsp *sigmadsp; sigmadsp 82 sound/soc/codecs/sigmadsp-i2c.c sigmadsp = devm_sigmadsp_init(&client->dev, ops, firmware_name); sigmadsp 83 sound/soc/codecs/sigmadsp-i2c.c if (IS_ERR(sigmadsp)) sigmadsp 84 sound/soc/codecs/sigmadsp-i2c.c return sigmadsp; sigmadsp 86 sound/soc/codecs/sigmadsp-i2c.c sigmadsp->control_data = client; sigmadsp 87 sound/soc/codecs/sigmadsp-i2c.c sigmadsp->write = sigmadsp_write_i2c; sigmadsp 88 sound/soc/codecs/sigmadsp-i2c.c sigmadsp->read = sigmadsp_read_i2c; sigmadsp 90 sound/soc/codecs/sigmadsp-i2c.c return sigmadsp; sigmadsp 39 sound/soc/codecs/sigmadsp-regmap.c struct sigmadsp *devm_sigmadsp_init_regmap(struct device *dev, sigmadsp 43 sound/soc/codecs/sigmadsp-regmap.c struct sigmadsp *sigmadsp; sigmadsp 45 sound/soc/codecs/sigmadsp-regmap.c sigmadsp = devm_sigmadsp_init(dev, ops, firmware_name); sigmadsp 46 sound/soc/codecs/sigmadsp-regmap.c if (IS_ERR(sigmadsp)) sigmadsp 47 sound/soc/codecs/sigmadsp-regmap.c return sigmadsp; sigmadsp 49 sound/soc/codecs/sigmadsp-regmap.c sigmadsp->control_data = regmap; sigmadsp 50 sound/soc/codecs/sigmadsp-regmap.c sigmadsp->write = sigmadsp_write_regmap; sigmadsp 51 sound/soc/codecs/sigmadsp-regmap.c sigmadsp->read = sigmadsp_read_regmap; sigmadsp 53 sound/soc/codecs/sigmadsp-regmap.c return sigmadsp; sigmadsp 92 sound/soc/codecs/sigmadsp.c static int sigmadsp_write(struct sigmadsp *sigmadsp, unsigned int addr, sigmadsp 95 sound/soc/codecs/sigmadsp.c return sigmadsp->write(sigmadsp->control_data, addr, data, len); sigmadsp 98 sound/soc/codecs/sigmadsp.c static int sigmadsp_read(struct sigmadsp *sigmadsp, unsigned int addr, sigmadsp 101 sound/soc/codecs/sigmadsp.c return sigmadsp->read(sigmadsp->control_data, addr, data, len); sigmadsp 115 sound/soc/codecs/sigmadsp.c static int sigmadsp_ctrl_write(struct sigmadsp *sigmadsp, sigmadsp 119 sound/soc/codecs/sigmadsp.c if (ctrl->num_bytes <= 20 && sigmadsp->ops && sigmadsp->ops->safeload) sigmadsp 120 sound/soc/codecs/sigmadsp.c return sigmadsp->ops->safeload(sigmadsp, ctrl->addr, data, sigmadsp 123 sound/soc/codecs/sigmadsp.c return sigmadsp_write(sigmadsp, ctrl->addr, data, sigmadsp 131 sound/soc/codecs/sigmadsp.c struct sigmadsp *sigmadsp = snd_kcontrol_chip(kcontrol); sigmadsp 135 sound/soc/codecs/sigmadsp.c mutex_lock(&sigmadsp->lock); sigmadsp 140 sound/soc/codecs/sigmadsp.c ret = sigmadsp_ctrl_write(sigmadsp, ctrl, data); sigmadsp 147 sound/soc/codecs/sigmadsp.c mutex_unlock(&sigmadsp->lock); sigmadsp 156 sound/soc/codecs/sigmadsp.c struct sigmadsp *sigmadsp = snd_kcontrol_chip(kcontrol); sigmadsp 159 sound/soc/codecs/sigmadsp.c mutex_lock(&sigmadsp->lock); sigmadsp 162 sound/soc/codecs/sigmadsp.c ret = sigmadsp_read(sigmadsp, ctrl->addr, ctrl->cache, sigmadsp 172 sound/soc/codecs/sigmadsp.c mutex_unlock(&sigmadsp->lock); sigmadsp 197 sound/soc/codecs/sigmadsp.c static int sigma_fw_load_control(struct sigmadsp *sigmadsp, sigmadsp 238 sound/soc/codecs/sigmadsp.c list_add_tail(&ctrl->head, &sigmadsp->ctrl_list); sigmadsp 248 sound/soc/codecs/sigmadsp.c static int sigma_fw_load_data(struct sigmadsp *sigmadsp, sigmadsp 269 sound/soc/codecs/sigmadsp.c list_add_tail(&data->head, &sigmadsp->data_list); sigmadsp 274 sound/soc/codecs/sigmadsp.c static int sigma_fw_load_samplerates(struct sigmadsp *sigmadsp, sigmadsp 290 sound/soc/codecs/sigmadsp.c if (sigmadsp->rate_constraints.count) sigmadsp 300 sound/soc/codecs/sigmadsp.c sigmadsp->rate_constraints.count = num_rates; sigmadsp 301 sound/soc/codecs/sigmadsp.c sigmadsp->rate_constraints.list = rates; sigmadsp 306 sound/soc/codecs/sigmadsp.c static int sigmadsp_fw_load_v2(struct sigmadsp *sigmadsp, sigmadsp 332 sound/soc/codecs/sigmadsp.c ret = sigma_fw_load_data(sigmadsp, chunk, length); sigmadsp 335 sound/soc/codecs/sigmadsp.c ret = sigma_fw_load_control(sigmadsp, chunk, length); sigmadsp 338 sound/soc/codecs/sigmadsp.c ret = sigma_fw_load_samplerates(sigmadsp, chunk, length); sigmadsp 341 sound/soc/codecs/sigmadsp.c dev_warn(sigmadsp->dev, "Unknown chunk type: %d\n", sigmadsp 388 sound/soc/codecs/sigmadsp.c static int process_sigma_action(struct sigmadsp *sigmadsp, sigmadsp 411 sound/soc/codecs/sigmadsp.c list_add_tail(&data->head, &sigmadsp->data_list); sigmadsp 422 sound/soc/codecs/sigmadsp.c static int sigmadsp_fw_load_v1(struct sigmadsp *sigmadsp, sigmadsp 439 sound/soc/codecs/sigmadsp.c ret = process_sigma_action(sigmadsp, sa); sigmadsp 453 sound/soc/codecs/sigmadsp.c static void sigmadsp_firmware_release(struct sigmadsp *sigmadsp) sigmadsp 458 sound/soc/codecs/sigmadsp.c list_for_each_entry_safe(ctrl, _ctrl, &sigmadsp->ctrl_list, head) { sigmadsp 463 sound/soc/codecs/sigmadsp.c list_for_each_entry_safe(data, _data, &sigmadsp->data_list, head) sigmadsp 466 sound/soc/codecs/sigmadsp.c INIT_LIST_HEAD(&sigmadsp->ctrl_list); sigmadsp 467 sound/soc/codecs/sigmadsp.c INIT_LIST_HEAD(&sigmadsp->data_list); sigmadsp 472 sound/soc/codecs/sigmadsp.c sigmadsp_firmware_release((struct sigmadsp *)res); sigmadsp 475 sound/soc/codecs/sigmadsp.c static int sigmadsp_firmware_load(struct sigmadsp *sigmadsp, const char *name) sigmadsp 483 sound/soc/codecs/sigmadsp.c ret = request_firmware(&fw, name, sigmadsp->dev); sigmadsp 499 sound/soc/codecs/sigmadsp.c dev_err(sigmadsp->dev, "Failed to load firmware: Invalid size\n"); sigmadsp 505 sound/soc/codecs/sigmadsp.c dev_err(sigmadsp->dev, "Failed to load firmware: Invalid magic\n"); sigmadsp 513 sound/soc/codecs/sigmadsp.c dev_err(sigmadsp->dev, "Failed to load firmware: Wrong crc checksum: expected %x got %x\n", sigmadsp 520 sound/soc/codecs/sigmadsp.c ret = sigmadsp_fw_load_v1(sigmadsp, fw); sigmadsp 523 sound/soc/codecs/sigmadsp.c ret = sigmadsp_fw_load_v2(sigmadsp, fw); sigmadsp 526 sound/soc/codecs/sigmadsp.c dev_err(sigmadsp->dev, sigmadsp 534 sound/soc/codecs/sigmadsp.c sigmadsp_firmware_release(sigmadsp); sigmadsp 542 sound/soc/codecs/sigmadsp.c static int sigmadsp_init(struct sigmadsp *sigmadsp, struct device *dev, sigmadsp 545 sound/soc/codecs/sigmadsp.c sigmadsp->ops = ops; sigmadsp 546 sound/soc/codecs/sigmadsp.c sigmadsp->dev = dev; sigmadsp 548 sound/soc/codecs/sigmadsp.c INIT_LIST_HEAD(&sigmadsp->ctrl_list); sigmadsp 549 sound/soc/codecs/sigmadsp.c INIT_LIST_HEAD(&sigmadsp->data_list); sigmadsp 550 sound/soc/codecs/sigmadsp.c mutex_init(&sigmadsp->lock); sigmadsp 552 sound/soc/codecs/sigmadsp.c return sigmadsp_firmware_load(sigmadsp, firmware_name); sigmadsp 565 sound/soc/codecs/sigmadsp.c struct sigmadsp *devm_sigmadsp_init(struct device *dev, sigmadsp 568 sound/soc/codecs/sigmadsp.c struct sigmadsp *sigmadsp; sigmadsp 571 sound/soc/codecs/sigmadsp.c sigmadsp = devres_alloc(devm_sigmadsp_release, sizeof(*sigmadsp), sigmadsp 573 sound/soc/codecs/sigmadsp.c if (!sigmadsp) sigmadsp 576 sound/soc/codecs/sigmadsp.c ret = sigmadsp_init(sigmadsp, dev, ops, firmware_name); sigmadsp 578 sound/soc/codecs/sigmadsp.c devres_free(sigmadsp); sigmadsp 582 sound/soc/codecs/sigmadsp.c devres_add(dev, sigmadsp); sigmadsp 584 sound/soc/codecs/sigmadsp.c return sigmadsp; sigmadsp 588 sound/soc/codecs/sigmadsp.c static int sigmadsp_rate_to_index(struct sigmadsp *sigmadsp, unsigned int rate) sigmadsp 592 sound/soc/codecs/sigmadsp.c for (i = 0; i < sigmadsp->rate_constraints.count; i++) { sigmadsp 593 sound/soc/codecs/sigmadsp.c if (sigmadsp->rate_constraints.list[i] == rate) sigmadsp 600 sound/soc/codecs/sigmadsp.c static unsigned int sigmadsp_get_samplerate_mask(struct sigmadsp *sigmadsp, sigmadsp 608 sound/soc/codecs/sigmadsp.c if (sigmadsp->rate_constraints.count) { sigmadsp 609 sound/soc/codecs/sigmadsp.c samplerate_index = sigmadsp_rate_to_index(sigmadsp, samplerate); sigmadsp 629 sound/soc/codecs/sigmadsp.c static int sigmadsp_alloc_control(struct sigmadsp *sigmadsp, sigmadsp 646 sound/soc/codecs/sigmadsp.c kcontrol = snd_ctl_new1(&template, sigmadsp); sigmadsp 653 sound/soc/codecs/sigmadsp.c return snd_ctl_add(sigmadsp->component->card->snd_card, kcontrol); sigmadsp 656 sound/soc/codecs/sigmadsp.c static void sigmadsp_activate_ctrl(struct sigmadsp *sigmadsp, sigmadsp 659 sound/soc/codecs/sigmadsp.c struct snd_card *card = sigmadsp->component->card->snd_card; sigmadsp 682 sound/soc/codecs/sigmadsp.c mutex_lock(&sigmadsp->lock); sigmadsp 684 sound/soc/codecs/sigmadsp.c sigmadsp_ctrl_write(sigmadsp, ctrl, ctrl->cache); sigmadsp 685 sound/soc/codecs/sigmadsp.c mutex_unlock(&sigmadsp->lock); sigmadsp 703 sound/soc/codecs/sigmadsp.c int sigmadsp_attach(struct sigmadsp *sigmadsp, sigmadsp 710 sound/soc/codecs/sigmadsp.c sigmadsp->component = component; sigmadsp 712 sound/soc/codecs/sigmadsp.c samplerate_mask = sigmadsp_get_samplerate_mask(sigmadsp, sigmadsp 713 sound/soc/codecs/sigmadsp.c sigmadsp->current_samplerate); sigmadsp 715 sound/soc/codecs/sigmadsp.c list_for_each_entry(ctrl, &sigmadsp->ctrl_list, head) { sigmadsp 716 sound/soc/codecs/sigmadsp.c ret = sigmadsp_alloc_control(sigmadsp, ctrl, samplerate_mask); sigmadsp 736 sound/soc/codecs/sigmadsp.c int sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int samplerate) sigmadsp 743 sound/soc/codecs/sigmadsp.c if (sigmadsp->current_samplerate == samplerate) sigmadsp 746 sound/soc/codecs/sigmadsp.c samplerate_mask = sigmadsp_get_samplerate_mask(sigmadsp, samplerate); sigmadsp 750 sound/soc/codecs/sigmadsp.c list_for_each_entry(data, &sigmadsp->data_list, head) { sigmadsp 754 sound/soc/codecs/sigmadsp.c ret = sigmadsp_write(sigmadsp, data->addr, data->data, sigmadsp 760 sound/soc/codecs/sigmadsp.c list_for_each_entry(ctrl, &sigmadsp->ctrl_list, head) sigmadsp 761 sound/soc/codecs/sigmadsp.c sigmadsp_activate_ctrl(sigmadsp, ctrl, samplerate_mask); sigmadsp 763 sound/soc/codecs/sigmadsp.c sigmadsp->current_samplerate = samplerate; sigmadsp 767 sound/soc/codecs/sigmadsp.c sigmadsp_reset(sigmadsp); sigmadsp 780 sound/soc/codecs/sigmadsp.c void sigmadsp_reset(struct sigmadsp *sigmadsp) sigmadsp 784 sound/soc/codecs/sigmadsp.c list_for_each_entry(ctrl, &sigmadsp->ctrl_list, head) sigmadsp 785 sound/soc/codecs/sigmadsp.c sigmadsp_activate_ctrl(sigmadsp, ctrl, false); sigmadsp 787 sound/soc/codecs/sigmadsp.c sigmadsp->current_samplerate = 0; sigmadsp 801 sound/soc/codecs/sigmadsp.c int sigmadsp_restrict_params(struct sigmadsp *sigmadsp, sigmadsp 804 sound/soc/codecs/sigmadsp.c if (sigmadsp->rate_constraints.count == 0) sigmadsp 808 sound/soc/codecs/sigmadsp.c SNDRV_PCM_HW_PARAM_RATE, &sigmadsp->rate_constraints); sigmadsp 17 sound/soc/codecs/sigmadsp.h struct sigmadsp; sigmadsp 22 sound/soc/codecs/sigmadsp.h int (*safeload)(struct sigmadsp *sigmadsp, unsigned int addr, sigmadsp 45 sound/soc/codecs/sigmadsp.h struct sigmadsp *devm_sigmadsp_init(struct device *dev, sigmadsp 47 sound/soc/codecs/sigmadsp.h void sigmadsp_reset(struct sigmadsp *sigmadsp); sigmadsp 49 sound/soc/codecs/sigmadsp.h int sigmadsp_restrict_params(struct sigmadsp *sigmadsp, sigmadsp 54 sound/soc/codecs/sigmadsp.h struct sigmadsp *devm_sigmadsp_init_regmap(struct device *dev, sigmadsp 57 sound/soc/codecs/sigmadsp.h struct sigmadsp *devm_sigmadsp_init_i2c(struct i2c_client *client, sigmadsp 60 sound/soc/codecs/sigmadsp.h int sigmadsp_attach(struct sigmadsp *sigmadsp, sigmadsp 62 sound/soc/codecs/sigmadsp.h int sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int rate); sigmadsp 63 sound/soc/codecs/sigmadsp.h void sigmadsp_reset(struct sigmadsp *sigmadsp);