1 // SPDX-License-Identifier: GPL-2.0
3 // ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier
5 // Copyright (C) 2022 - 2023 Texas Instruments Incorporated
8 // The TAS2781 driver implements a flexible and configurable
9 // algo coefficient setting for one, two, or even multiple
12 // Author: Shenghao Ding <shenghao-ding@ti.com>
13 // Author: Kevin Lu <kevin-lu@ti.com>
16 #include <linux/crc8.h>
17 #include <linux/firmware.h>
18 #include <linux/gpio/consumer.h>
19 #include <linux/i2c.h>
20 #include <linux/init.h>
21 #include <linux/interrupt.h>
22 #include <linux/module.h>
24 #include <linux/of_gpio.h>
25 #include <linux/of_irq.h>
26 #include <linux/regmap.h>
27 #include <linux/slab.h>
28 #include <sound/pcm_params.h>
29 #include <sound/soc.h>
30 #include <sound/tas2781.h>
31 #include <sound/tlv.h>
32 #include <sound/tas2781-tlv.h>
34 static const struct i2c_device_id tasdevice_id[] = {
35 { "tas2781", TAS2781 },
38 MODULE_DEVICE_TABLE(i2c, tasdevice_id);
41 static const struct of_device_id tasdevice_of_match[] = {
42 { .compatible = "ti,tas2781" },
45 MODULE_DEVICE_TABLE(of, tasdevice_of_match);
49 * tas2781_digital_getvol - get the volum control
50 * @kcontrol: control pointer
51 * @ucontrol: User data
52 * Customer Kcontrol for tas2781 is primarily for regmap booking, paging
53 * depends on internal regmap mechanism.
54 * tas2781 contains book and page two-level register map, especially
55 * book switching will set the register BXXP00R7F, after switching to the
56 * correct book, then leverage the mechanism for paging to access the
59 static int tas2781_digital_getvol(struct snd_kcontrol *kcontrol,
60 struct snd_ctl_elem_value *ucontrol)
62 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
63 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
64 struct soc_mixer_control *mc =
65 (struct soc_mixer_control *)kcontrol->private_value;
67 return tasdevice_digital_getvol(tas_priv, ucontrol, mc);
70 static int tas2781_digital_putvol(struct snd_kcontrol *kcontrol,
71 struct snd_ctl_elem_value *ucontrol)
73 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
74 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
75 struct soc_mixer_control *mc =
76 (struct soc_mixer_control *)kcontrol->private_value;
78 return tasdevice_digital_putvol(tas_priv, ucontrol, mc);
81 static int tas2781_amp_getvol(struct snd_kcontrol *kcontrol,
82 struct snd_ctl_elem_value *ucontrol)
84 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
85 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
86 struct soc_mixer_control *mc =
87 (struct soc_mixer_control *)kcontrol->private_value;
89 return tasdevice_amp_getvol(tas_priv, ucontrol, mc);
92 static int tas2781_amp_putvol(struct snd_kcontrol *kcontrol,
93 struct snd_ctl_elem_value *ucontrol)
95 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
96 struct tasdevice_priv *tas_priv =
97 snd_soc_component_get_drvdata(codec);
98 struct soc_mixer_control *mc =
99 (struct soc_mixer_control *)kcontrol->private_value;
101 return tasdevice_amp_putvol(tas_priv, ucontrol, mc);
104 static int tas2781_force_fwload_get(struct snd_kcontrol *kcontrol,
105 struct snd_ctl_elem_value *ucontrol)
107 struct snd_soc_component *component =
108 snd_soc_kcontrol_component(kcontrol);
109 struct tasdevice_priv *tas_priv =
110 snd_soc_component_get_drvdata(component);
112 ucontrol->value.integer.value[0] = (int)tas_priv->force_fwload_status;
113 dev_dbg(tas_priv->dev, "%s : Force FWload %s\n", __func__,
114 tas_priv->force_fwload_status ? "ON" : "OFF");
119 static int tas2781_force_fwload_put(struct snd_kcontrol *kcontrol,
120 struct snd_ctl_elem_value *ucontrol)
122 struct snd_soc_component *component =
123 snd_soc_kcontrol_component(kcontrol);
124 struct tasdevice_priv *tas_priv =
125 snd_soc_component_get_drvdata(component);
126 bool change, val = (bool)ucontrol->value.integer.value[0];
128 if (tas_priv->force_fwload_status == val)
132 tas_priv->force_fwload_status = val;
134 dev_dbg(tas_priv->dev, "%s : Force FWload %s\n", __func__,
135 tas_priv->force_fwload_status ? "ON" : "OFF");
140 static const struct snd_kcontrol_new tas2781_snd_controls[] = {
141 SOC_SINGLE_RANGE_EXT_TLV("Speaker Analog Gain", TAS2781_AMP_LEVEL,
142 1, 0, 20, 0, tas2781_amp_getvol,
143 tas2781_amp_putvol, amp_vol_tlv),
144 SOC_SINGLE_RANGE_EXT_TLV("Speaker Digital Gain", TAS2781_DVC_LVL,
145 0, 0, 200, 1, tas2781_digital_getvol,
146 tas2781_digital_putvol, dvc_tlv),
147 SOC_SINGLE_BOOL_EXT("Speaker Force Firmware Load", 0,
148 tas2781_force_fwload_get, tas2781_force_fwload_put),
151 static int tasdevice_set_profile_id(struct snd_kcontrol *kcontrol,
152 struct snd_ctl_elem_value *ucontrol)
154 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
155 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
158 if (tas_priv->rcabin.profile_cfg_id !=
159 ucontrol->value.integer.value[0]) {
160 tas_priv->rcabin.profile_cfg_id =
161 ucontrol->value.integer.value[0];
168 static int tasdevice_info_programs(struct snd_kcontrol *kcontrol,
169 struct snd_ctl_elem_info *uinfo)
171 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
172 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
173 struct tasdevice_fw *tas_fw = tas_priv->fmw;
175 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
177 uinfo->value.integer.min = 0;
178 uinfo->value.integer.max = (int)tas_fw->nr_programs;
183 static int tasdevice_info_configurations(
184 struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
186 struct snd_soc_component *codec =
187 snd_soc_kcontrol_component(kcontrol);
188 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
189 struct tasdevice_fw *tas_fw = tas_priv->fmw;
191 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
193 uinfo->value.integer.min = 0;
194 uinfo->value.integer.max = (int)tas_fw->nr_configurations - 1;
199 static int tasdevice_info_profile(struct snd_kcontrol *kcontrol,
200 struct snd_ctl_elem_info *uinfo)
202 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
203 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
205 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
207 uinfo->value.integer.min = 0;
208 uinfo->value.integer.max = tas_priv->rcabin.ncfgs - 1;
213 static int tasdevice_get_profile_id(struct snd_kcontrol *kcontrol,
214 struct snd_ctl_elem_value *ucontrol)
216 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
217 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
219 ucontrol->value.integer.value[0] = tas_priv->rcabin.profile_cfg_id;
224 static int tasdevice_create_control(struct tasdevice_priv *tas_priv)
226 struct snd_kcontrol_new *prof_ctrls;
232 prof_ctrls = devm_kcalloc(tas_priv->dev, nr_controls,
233 sizeof(prof_ctrls[0]), GFP_KERNEL);
239 /* Create a mixer item for selecting the active profile */
240 name = devm_kzalloc(tas_priv->dev, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
246 scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, "Speaker Profile Id");
247 prof_ctrls[mix_index].name = name;
248 prof_ctrls[mix_index].iface = SNDRV_CTL_ELEM_IFACE_MIXER;
249 prof_ctrls[mix_index].info = tasdevice_info_profile;
250 prof_ctrls[mix_index].get = tasdevice_get_profile_id;
251 prof_ctrls[mix_index].put = tasdevice_set_profile_id;
254 ret = snd_soc_add_component_controls(tas_priv->codec,
255 prof_ctrls, nr_controls < mix_index ? nr_controls : mix_index);
261 static int tasdevice_program_get(struct snd_kcontrol *kcontrol,
262 struct snd_ctl_elem_value *ucontrol)
264 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
265 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
267 ucontrol->value.integer.value[0] = tas_priv->cur_prog;
272 static int tasdevice_program_put(struct snd_kcontrol *kcontrol,
273 struct snd_ctl_elem_value *ucontrol)
275 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
276 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
277 unsigned int nr_program = ucontrol->value.integer.value[0];
280 if (tas_priv->cur_prog != nr_program) {
281 tas_priv->cur_prog = nr_program;
288 static int tasdevice_configuration_get(struct snd_kcontrol *kcontrol,
289 struct snd_ctl_elem_value *ucontrol)
292 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
293 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
295 ucontrol->value.integer.value[0] = tas_priv->cur_conf;
300 static int tasdevice_configuration_put(
301 struct snd_kcontrol *kcontrol,
302 struct snd_ctl_elem_value *ucontrol)
304 struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
305 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
306 unsigned int nr_configuration = ucontrol->value.integer.value[0];
309 if (tas_priv->cur_conf != nr_configuration) {
310 tas_priv->cur_conf = nr_configuration;
317 static int tasdevice_dsp_create_ctrls(
318 struct tasdevice_priv *tas_priv)
320 struct snd_kcontrol_new *dsp_ctrls;
321 char *prog_name, *conf_name;
326 /* Alloc kcontrol via devm_kzalloc, which don't manually
329 dsp_ctrls = devm_kcalloc(tas_priv->dev, nr_controls,
330 sizeof(dsp_ctrls[0]), GFP_KERNEL);
336 /* Create a mixer item for selecting the active profile */
337 prog_name = devm_kzalloc(tas_priv->dev,
338 SNDRV_CTL_ELEM_ID_NAME_MAXLEN, GFP_KERNEL);
339 conf_name = devm_kzalloc(tas_priv->dev, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
341 if (!prog_name || !conf_name) {
346 scnprintf(prog_name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
347 "Speaker Program Id");
348 dsp_ctrls[mix_index].name = prog_name;
349 dsp_ctrls[mix_index].iface = SNDRV_CTL_ELEM_IFACE_MIXER;
350 dsp_ctrls[mix_index].info = tasdevice_info_programs;
351 dsp_ctrls[mix_index].get = tasdevice_program_get;
352 dsp_ctrls[mix_index].put = tasdevice_program_put;
355 scnprintf(conf_name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
356 "Speaker Config Id");
357 dsp_ctrls[mix_index].name = conf_name;
358 dsp_ctrls[mix_index].iface = SNDRV_CTL_ELEM_IFACE_MIXER;
359 dsp_ctrls[mix_index].info = tasdevice_info_configurations;
360 dsp_ctrls[mix_index].get = tasdevice_configuration_get;
361 dsp_ctrls[mix_index].put = tasdevice_configuration_put;
364 ret = snd_soc_add_component_controls(tas_priv->codec, dsp_ctrls,
365 nr_controls < mix_index ? nr_controls : mix_index);
371 static void tasdevice_fw_ready(const struct firmware *fmw,
374 struct tasdevice_priv *tas_priv = context;
378 mutex_lock(&tas_priv->codec_lock);
380 ret = tasdevice_rca_parser(tas_priv, fmw);
383 tasdevice_create_control(tas_priv);
385 tasdevice_dsp_remove(tas_priv);
386 tasdevice_calbin_remove(tas_priv);
387 tas_priv->fw_state = TASDEVICE_DSP_FW_PENDING;
388 scnprintf(tas_priv->coef_binaryname, 64, "%s_coef.bin",
390 ret = tasdevice_dsp_parser(tas_priv);
392 dev_err(tas_priv->dev, "dspfw load %s error\n",
393 tas_priv->coef_binaryname);
394 tas_priv->fw_state = TASDEVICE_DSP_FW_FAIL;
397 tasdevice_dsp_create_ctrls(tas_priv);
399 tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK;
401 /* If calibrated data occurs error, dsp will still works with default
402 * calibrated data inside algo.
404 for (i = 0; i < tas_priv->ndev; i++) {
405 scnprintf(tas_priv->cal_binaryname[i], 64, "%s_cal_0x%02x.bin",
406 tas_priv->dev_name, tas_priv->tasdevice[i].dev_addr);
407 ret = tas2781_load_calibration(tas_priv,
408 tas_priv->cal_binaryname[i], i);
410 dev_err(tas_priv->dev,
411 "%s: load %s error, default will effect\n",
412 __func__, tas_priv->cal_binaryname[i]);
415 tasdevice_prmg_calibdata_load(tas_priv, 0);
416 tas_priv->cur_prog = 0;
418 if (tas_priv->fw_state == TASDEVICE_DSP_FW_FAIL) {
419 /*If DSP FW fail, kcontrol won't be created */
420 tasdevice_config_info_remove(tas_priv);
421 tasdevice_dsp_remove(tas_priv);
423 mutex_unlock(&tas_priv->codec_lock);
425 release_firmware(fmw);
428 static int tasdevice_dapm_event(struct snd_soc_dapm_widget *w,
429 struct snd_kcontrol *kcontrol, int event)
431 struct snd_soc_component *codec = snd_soc_dapm_to_component(w->dapm);
432 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
435 /* Codec Lock Hold */
436 mutex_lock(&tas_priv->codec_lock);
437 if (event == SND_SOC_DAPM_PRE_PMD)
439 tasdevice_tuning_switch(tas_priv, state);
440 /* Codec Lock Release*/
441 mutex_unlock(&tas_priv->codec_lock);
446 static const struct snd_soc_dapm_widget tasdevice_dapm_widgets[] = {
447 SND_SOC_DAPM_AIF_IN("ASI", "ASI Playback", 0, SND_SOC_NOPM, 0, 0),
448 SND_SOC_DAPM_AIF_OUT_E("ASI OUT", "ASI Capture", 0, SND_SOC_NOPM,
449 0, 0, tasdevice_dapm_event,
450 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
451 SND_SOC_DAPM_SPK("SPK", tasdevice_dapm_event),
452 SND_SOC_DAPM_OUTPUT("OUT"),
453 SND_SOC_DAPM_INPUT("DMIC")
456 static const struct snd_soc_dapm_route tasdevice_audio_map[] = {
457 {"SPK", NULL, "ASI"},
458 {"OUT", NULL, "SPK"},
459 {"ASI OUT", NULL, "DMIC"}
462 static int tasdevice_startup(struct snd_pcm_substream *substream,
463 struct snd_soc_dai *dai)
465 struct snd_soc_component *codec = dai->component;
466 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
469 if (tas_priv->fw_state != TASDEVICE_DSP_FW_ALL_OK) {
470 dev_err(tas_priv->dev, "DSP bin file not loaded\n");
477 static int tasdevice_hw_params(struct snd_pcm_substream *substream,
478 struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
480 struct tasdevice_priv *tas_priv = snd_soc_dai_get_drvdata(dai);
481 unsigned int slot_width;
486 fsrate = params_rate(params);
492 dev_err(tas_priv->dev, "%s: incorrect sample rate = %u\n",
498 slot_width = params_width(params);
499 switch (slot_width) {
506 dev_err(tas_priv->dev, "%s: incorrect slot width = %u\n",
507 __func__, slot_width);
512 bclk_rate = snd_soc_params_to_bclk(params);
514 dev_err(tas_priv->dev, "%s: incorrect bclk rate = %d\n",
515 __func__, bclk_rate);
524 static int tasdevice_set_dai_sysclk(struct snd_soc_dai *codec_dai,
525 int clk_id, unsigned int freq, int dir)
527 struct tasdevice_priv *tas_priv = snd_soc_dai_get_drvdata(codec_dai);
529 tas_priv->sysclk = freq;
534 static const struct snd_soc_dai_ops tasdevice_dai_ops = {
535 .startup = tasdevice_startup,
536 .hw_params = tasdevice_hw_params,
537 .set_sysclk = tasdevice_set_dai_sysclk,
540 static struct snd_soc_dai_driver tasdevice_dai_driver[] = {
542 .name = "tas2781_codec",
545 .stream_name = "Playback",
548 .rates = TASDEVICE_RATES,
549 .formats = TASDEVICE_FORMATS,
552 .stream_name = "Capture",
555 .rates = TASDEVICE_RATES,
556 .formats = TASDEVICE_FORMATS,
558 .ops = &tasdevice_dai_ops,
563 static int tasdevice_codec_probe(struct snd_soc_component *codec)
565 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
567 return tascodec_init(tas_priv, codec, tasdevice_fw_ready);
570 static void tasdevice_deinit(void *context)
572 struct tasdevice_priv *tas_priv = (struct tasdevice_priv *) context;
574 tasdevice_config_info_remove(tas_priv);
575 tasdevice_dsp_remove(tas_priv);
576 tasdevice_calbin_remove(tas_priv);
577 tas_priv->fw_state = TASDEVICE_DSP_FW_PENDING;
580 static void tasdevice_codec_remove(
581 struct snd_soc_component *codec)
583 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
585 tasdevice_deinit(tas_priv);
588 static const struct snd_soc_component_driver
589 soc_codec_driver_tasdevice = {
590 .probe = tasdevice_codec_probe,
591 .remove = tasdevice_codec_remove,
592 .controls = tas2781_snd_controls,
593 .num_controls = ARRAY_SIZE(tas2781_snd_controls),
594 .dapm_widgets = tasdevice_dapm_widgets,
595 .num_dapm_widgets = ARRAY_SIZE(tasdevice_dapm_widgets),
596 .dapm_routes = tasdevice_audio_map,
597 .num_dapm_routes = ARRAY_SIZE(tasdevice_audio_map),
602 static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv)
604 struct i2c_client *client = (struct i2c_client *)tas_priv->client;
605 unsigned int dev_addrs[TASDEVICE_MAX_CHANNELS];
608 if (tas_priv->isacpi) {
609 ndev = device_property_read_u32_array(&client->dev,
610 "ti,audio-slots", NULL, 0);
613 dev_addrs[0] = client->addr;
615 ndev = (ndev < ARRAY_SIZE(dev_addrs))
616 ? ndev : ARRAY_SIZE(dev_addrs);
617 ndev = device_property_read_u32_array(&client->dev,
618 "ti,audio-slots", dev_addrs, ndev);
621 tas_priv->irq_info.irq_gpio =
622 acpi_dev_gpio_irq_get(ACPI_COMPANION(&client->dev), 0);
624 struct device_node *np = tas_priv->dev->of_node;
626 const __be32 *reg, *reg_end;
629 aw = of_n_addr_cells(np);
630 sw = of_n_size_cells(np);
632 reg = (const __be32 *)of_get_property(np,
634 reg_end = reg + len/sizeof(*reg);
637 dev_addrs[ndev] = of_read_number(reg, aw);
640 } while (reg < reg_end);
643 dev_addrs[0] = client->addr;
647 dev_addrs[0] = client->addr;
649 tas_priv->irq_info.irq_gpio = of_irq_get(np, 0);
651 tas_priv->ndev = ndev;
652 for (i = 0; i < ndev; i++)
653 tas_priv->tasdevice[i].dev_addr = dev_addrs[i];
655 tas_priv->reset = devm_gpiod_get_optional(&client->dev,
656 "reset-gpios", GPIOD_OUT_HIGH);
657 if (IS_ERR(tas_priv->reset))
658 dev_err(tas_priv->dev, "%s Can't get reset GPIO\n",
661 strcpy(tas_priv->dev_name, tasdevice_id[tas_priv->chip_id].name);
663 if (gpio_is_valid(tas_priv->irq_info.irq_gpio)) {
664 rc = gpio_request(tas_priv->irq_info.irq_gpio,
667 gpio_direction_input(
668 tas_priv->irq_info.irq_gpio);
670 tas_priv->irq_info.irq =
671 gpio_to_irq(tas_priv->irq_info.irq_gpio);
673 dev_err(tas_priv->dev, "%s: GPIO %d request error\n",
674 __func__, tas_priv->irq_info.irq_gpio);
676 dev_err(tas_priv->dev,
677 "Looking up irq-gpio property failed %d\n",
678 tas_priv->irq_info.irq_gpio);
681 static int tasdevice_i2c_probe(struct i2c_client *i2c)
683 const struct i2c_device_id *id = i2c_match_id(tasdevice_id, i2c);
684 const struct acpi_device_id *acpi_id;
685 struct tasdevice_priv *tas_priv;
688 tas_priv = tasdevice_kzalloc(i2c);
692 dev_set_drvdata(&i2c->dev, tas_priv);
694 if (ACPI_HANDLE(&i2c->dev)) {
695 acpi_id = acpi_match_device(i2c->dev.driver->acpi_match_table,
698 dev_err(&i2c->dev, "No driver data\n");
702 tas_priv->chip_id = acpi_id->driver_data;
703 tas_priv->isacpi = true;
705 tas_priv->chip_id = id ? id->driver_data : 0;
706 tas_priv->isacpi = false;
709 tasdevice_parse_dt(tas_priv);
711 ret = tasdevice_init(tas_priv);
715 ret = devm_snd_soc_register_component(tas_priv->dev,
716 &soc_codec_driver_tasdevice,
717 tasdevice_dai_driver, ARRAY_SIZE(tasdevice_dai_driver));
719 dev_err(tas_priv->dev, "%s: codec register error:0x%08x\n",
725 tasdevice_remove(tas_priv);
729 static void tasdevice_i2c_remove(struct i2c_client *client)
731 struct tasdevice_priv *tas_priv = i2c_get_clientdata(client);
733 tasdevice_remove(tas_priv);
737 static const struct acpi_device_id tasdevice_acpi_match[] = {
738 { "TAS2781", TAS2781 },
742 MODULE_DEVICE_TABLE(acpi, tasdevice_acpi_match);
745 static struct i2c_driver tasdevice_i2c_driver = {
747 .name = "tas2781-codec",
748 .of_match_table = of_match_ptr(tasdevice_of_match),
750 .acpi_match_table = ACPI_PTR(tasdevice_acpi_match),
753 .probe = tasdevice_i2c_probe,
754 .remove = tasdevice_i2c_remove,
755 .id_table = tasdevice_id,
758 module_i2c_driver(tasdevice_i2c_driver);
760 MODULE_AUTHOR("Shenghao Ding <shenghao-ding@ti.com>");
761 MODULE_AUTHOR("Kevin Lu <kevin-lu@ti.com>");
762 MODULE_DESCRIPTION("ASoC TAS2781 Driver");
763 MODULE_LICENSE("GPL");
764 MODULE_IMPORT_NS(SND_SOC_TAS2781_FMWLIB);