1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright(c) 2021 Intel Corporation.
3 // Copyright(c) 2021 Nuvoton Corporation.
6 * Intel SOF Machine Driver with Nuvoton headphone codec NAU8825
7 * and speaker codec RT1019P MAX98360a or MAX98373
10 #include <linux/input.h>
11 #include <linux/module.h>
12 #include <linux/platform_device.h>
13 #include <linux/dmi.h>
14 #include <sound/core.h>
15 #include <sound/jack.h>
16 #include <sound/pcm.h>
17 #include <sound/pcm_params.h>
18 #include <sound/soc.h>
19 #include <sound/sof.h>
20 #include <sound/soc-acpi.h>
21 #include "../../codecs/nau8825.h"
22 #include "../common/soc-intel-quirks.h"
23 #include "hda_dsp_common.h"
24 #include "sof_realtek_common.h"
25 #include "sof_maxim_common.h"
29 #define SOF_NAU8825_SSP_CODEC(quirk) ((quirk) & GENMASK(2, 0))
30 #define SOF_NAU8825_SSP_CODEC_MASK (GENMASK(2, 0))
31 #define SOF_SPEAKER_AMP_PRESENT BIT(3)
32 #define SOF_NAU8825_SSP_AMP_SHIFT 4
33 #define SOF_NAU8825_SSP_AMP_MASK (GENMASK(6, 4))
34 #define SOF_NAU8825_SSP_AMP(quirk) \
35 (((quirk) << SOF_NAU8825_SSP_AMP_SHIFT) & SOF_NAU8825_SSP_AMP_MASK)
36 #define SOF_NAU8825_NUM_HDMIDEV_SHIFT 7
37 #define SOF_NAU8825_NUM_HDMIDEV_MASK (GENMASK(9, 7))
38 #define SOF_NAU8825_NUM_HDMIDEV(quirk) \
39 (((quirk) << SOF_NAU8825_NUM_HDMIDEV_SHIFT) & SOF_NAU8825_NUM_HDMIDEV_MASK)
41 /* BT audio offload: reserve 3 bits for future */
42 #define SOF_BT_OFFLOAD_SSP_SHIFT 10
43 #define SOF_BT_OFFLOAD_SSP_MASK (GENMASK(12, 10))
44 #define SOF_BT_OFFLOAD_SSP(quirk) \
45 (((quirk) << SOF_BT_OFFLOAD_SSP_SHIFT) & SOF_BT_OFFLOAD_SSP_MASK)
46 #define SOF_SSP_BT_OFFLOAD_PRESENT BIT(13)
47 #define SOF_RT1019P_SPEAKER_AMP_PRESENT BIT(14)
48 #define SOF_MAX98373_SPEAKER_AMP_PRESENT BIT(15)
49 #define SOF_MAX98360A_SPEAKER_AMP_PRESENT BIT(16)
50 #define SOF_RT1015P_SPEAKER_AMP_PRESENT BIT(17)
51 #define SOF_NAU8318_SPEAKER_AMP_PRESENT BIT(18)
53 static unsigned long sof_nau8825_quirk = SOF_NAU8825_SSP_CODEC(0);
56 struct list_head head;
57 struct snd_soc_dai *codec_dai;
61 struct sof_card_private {
63 struct snd_soc_jack sof_headset;
64 struct list_head hdmi_pcm_list;
67 static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd)
69 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card);
70 struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
71 struct sof_hdmi_pcm *pcm;
73 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
77 /* dai_link id is 1:1 mapped to the PCM device */
78 pcm->device = rtd->dai_link->id;
81 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list);
86 static struct snd_soc_jack_pin jack_pins[] = {
88 .pin = "Headphone Jack",
89 .mask = SND_JACK_HEADPHONE,
93 .mask = SND_JACK_MICROPHONE,
97 static int sof_nau8825_codec_init(struct snd_soc_pcm_runtime *rtd)
99 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card);
100 struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
102 struct snd_soc_jack *jack;
106 * Headset buttons map to the google Reference headset.
107 * These can be configured by userspace.
109 ret = snd_soc_card_jack_new_pins(rtd->card, "Headset Jack",
110 SND_JACK_HEADSET | SND_JACK_BTN_0 |
111 SND_JACK_BTN_1 | SND_JACK_BTN_2 |
115 ARRAY_SIZE(jack_pins));
117 dev_err(rtd->dev, "Headset Jack creation failed: %d\n", ret);
121 jack = &ctx->sof_headset;
123 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
124 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
125 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
126 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
127 ret = snd_soc_component_set_jack(component, jack, NULL);
130 dev_err(rtd->dev, "Headset Jack call-back failed: %d\n", ret);
137 static void sof_nau8825_codec_exit(struct snd_soc_pcm_runtime *rtd)
139 struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
141 snd_soc_component_set_jack(component, NULL, NULL);
144 static int sof_nau8825_hw_params(struct snd_pcm_substream *substream,
145 struct snd_pcm_hw_params *params)
147 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
148 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
151 clk_freq = sof_dai_get_bclk(rtd); /* BCLK freq */
154 dev_err(rtd->dev, "get bclk freq failed: %d\n", clk_freq);
158 /* Configure clock for codec */
159 ret = snd_soc_dai_set_sysclk(codec_dai, NAU8825_CLK_FLL_BLK, 0,
162 dev_err(codec_dai->dev, "can't set BCLK clock %d\n", ret);
166 /* Configure pll for codec */
167 ret = snd_soc_dai_set_pll(codec_dai, 0, 0, clk_freq,
168 params_rate(params) * 256);
170 dev_err(codec_dai->dev, "can't set BCLK: %d\n", ret);
177 static struct snd_soc_ops sof_nau8825_ops = {
178 .hw_params = sof_nau8825_hw_params,
181 static struct snd_soc_dai_link_component platform_component[] = {
183 /* name might be overridden during probe */
184 .name = "0000:00:1f.3"
188 static int sof_card_late_probe(struct snd_soc_card *card)
190 struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
191 struct snd_soc_dapm_context *dapm = &card->dapm;
192 struct sof_hdmi_pcm *pcm;
195 if (sof_nau8825_quirk & SOF_MAX98373_SPEAKER_AMP_PRESENT) {
196 /* Disable Left and Right Spk pin after boot */
197 snd_soc_dapm_disable_pin(dapm, "Left Spk");
198 snd_soc_dapm_disable_pin(dapm, "Right Spk");
199 err = snd_soc_dapm_sync(dapm);
204 if (list_empty(&ctx->hdmi_pcm_list))
207 pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm, head);
209 return hda_dsp_hdmi_build_controls(card, pcm->codec_dai->component);
212 static const struct snd_kcontrol_new sof_controls[] = {
213 SOC_DAPM_PIN_SWITCH("Headphone Jack"),
214 SOC_DAPM_PIN_SWITCH("Headset Mic"),
215 SOC_DAPM_PIN_SWITCH("Left Spk"),
216 SOC_DAPM_PIN_SWITCH("Right Spk"),
219 static const struct snd_kcontrol_new speaker_controls[] = {
220 SOC_DAPM_PIN_SWITCH("Spk"),
223 static const struct snd_soc_dapm_widget sof_widgets[] = {
224 SND_SOC_DAPM_HP("Headphone Jack", NULL),
225 SND_SOC_DAPM_MIC("Headset Mic", NULL),
226 SND_SOC_DAPM_SPK("Left Spk", NULL),
227 SND_SOC_DAPM_SPK("Right Spk", NULL),
230 static const struct snd_soc_dapm_widget speaker_widgets[] = {
231 SND_SOC_DAPM_SPK("Spk", NULL),
234 static const struct snd_soc_dapm_widget dmic_widgets[] = {
235 SND_SOC_DAPM_MIC("SoC DMIC", NULL),
238 static const struct snd_soc_dapm_route sof_map[] = {
239 /* HP jack connectors - unknown if we have jack detection */
240 { "Headphone Jack", NULL, "HPOL" },
241 { "Headphone Jack", NULL, "HPOR" },
244 { "MIC", NULL, "Headset Mic" },
247 static const struct snd_soc_dapm_route speaker_map[] = {
249 { "Spk", NULL, "Speaker" },
252 static const struct snd_soc_dapm_route dmic_map[] = {
254 {"DMic", NULL, "SoC DMIC"},
257 static int speaker_codec_init(struct snd_soc_pcm_runtime *rtd)
259 struct snd_soc_card *card = rtd->card;
262 ret = snd_soc_dapm_new_controls(&card->dapm, speaker_widgets,
263 ARRAY_SIZE(speaker_widgets));
265 dev_err(rtd->dev, "unable to add dapm controls, ret %d\n", ret);
266 /* Don't need to add routes if widget addition failed */
270 ret = snd_soc_add_card_controls(card, speaker_controls,
271 ARRAY_SIZE(speaker_controls));
273 dev_err(rtd->dev, "unable to add card controls, ret %d\n", ret);
277 ret = snd_soc_dapm_add_routes(&card->dapm, speaker_map,
278 ARRAY_SIZE(speaker_map));
281 dev_err(rtd->dev, "Speaker map addition failed: %d\n", ret);
285 static int dmic_init(struct snd_soc_pcm_runtime *rtd)
287 struct snd_soc_card *card = rtd->card;
290 ret = snd_soc_dapm_new_controls(&card->dapm, dmic_widgets,
291 ARRAY_SIZE(dmic_widgets));
293 dev_err(card->dev, "DMic widget addition failed: %d\n", ret);
294 /* Don't need to add routes if widget addition failed */
298 ret = snd_soc_dapm_add_routes(&card->dapm, dmic_map,
299 ARRAY_SIZE(dmic_map));
302 dev_err(card->dev, "DMic map addition failed: %d\n", ret);
307 /* sof audio machine driver for nau8825 codec */
308 static struct snd_soc_card sof_audio_card_nau8825 = {
309 .name = "nau8825", /* the sof- prefix is added by the core */
310 .owner = THIS_MODULE,
311 .controls = sof_controls,
312 .num_controls = ARRAY_SIZE(sof_controls),
313 .dapm_widgets = sof_widgets,
314 .num_dapm_widgets = ARRAY_SIZE(sof_widgets),
315 .dapm_routes = sof_map,
316 .num_dapm_routes = ARRAY_SIZE(sof_map),
317 .fully_routed = true,
318 .late_probe = sof_card_late_probe,
321 static struct snd_soc_dai_link_component nau8825_component[] = {
323 .name = "i2c-10508825:00",
324 .dai_name = "nau8825-hifi",
328 static struct snd_soc_dai_link_component dmic_component[] = {
330 .name = "dmic-codec",
331 .dai_name = "dmic-hifi",
335 static struct snd_soc_dai_link_component rt1019p_component[] = {
337 .name = "RTL1019:00",
342 static struct snd_soc_dai_link_component nau8318_components[] = {
344 .name = "NVTN2012:00",
345 .dai_name = "nau8315-hifi",
349 static struct snd_soc_dai_link_component dummy_component[] = {
351 .name = "snd-soc-dummy",
352 .dai_name = "snd-soc-dummy-dai",
356 static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
362 struct snd_soc_dai_link_component *idisp_components;
363 struct snd_soc_dai_link_component *cpus;
364 struct snd_soc_dai_link *links;
367 links = devm_kcalloc(dev, sof_audio_card_nau8825.num_links,
368 sizeof(struct snd_soc_dai_link), GFP_KERNEL);
369 cpus = devm_kcalloc(dev, sof_audio_card_nau8825.num_links,
370 sizeof(struct snd_soc_dai_link_component), GFP_KERNEL);
375 links[id].name = devm_kasprintf(dev, GFP_KERNEL,
376 "SSP%d-Codec", ssp_codec);
381 links[id].codecs = nau8825_component;
382 links[id].num_codecs = ARRAY_SIZE(nau8825_component);
383 links[id].platforms = platform_component;
384 links[id].num_platforms = ARRAY_SIZE(platform_component);
385 links[id].init = sof_nau8825_codec_init;
386 links[id].exit = sof_nau8825_codec_exit;
387 links[id].ops = &sof_nau8825_ops;
388 links[id].dpcm_playback = 1;
389 links[id].dpcm_capture = 1;
390 links[id].no_pcm = 1;
391 links[id].cpus = &cpus[id];
392 links[id].num_cpus = 1;
394 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL,
397 if (!links[id].cpus->dai_name)
403 if (dmic_be_num > 0) {
404 /* at least we have dmic01 */
405 links[id].name = "dmic01";
406 links[id].cpus = &cpus[id];
407 links[id].cpus->dai_name = "DMIC01 Pin";
408 links[id].init = dmic_init;
409 if (dmic_be_num > 1) {
410 /* set up 2 BE links at most */
411 links[id + 1].name = "dmic16k";
412 links[id + 1].cpus = &cpus[id + 1];
413 links[id + 1].cpus->dai_name = "DMIC16k Pin";
418 for (i = 0; i < dmic_be_num; i++) {
420 links[id].num_cpus = 1;
421 links[id].codecs = dmic_component;
422 links[id].num_codecs = ARRAY_SIZE(dmic_component);
423 links[id].platforms = platform_component;
424 links[id].num_platforms = ARRAY_SIZE(platform_component);
425 links[id].ignore_suspend = 1;
426 links[id].dpcm_capture = 1;
427 links[id].no_pcm = 1;
433 idisp_components = devm_kcalloc(dev,
435 sizeof(struct snd_soc_dai_link_component),
437 if (!idisp_components)
440 for (i = 1; i <= hdmi_num; i++) {
441 links[id].name = devm_kasprintf(dev, GFP_KERNEL,
447 links[id].cpus = &cpus[id];
448 links[id].num_cpus = 1;
449 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL,
451 if (!links[id].cpus->dai_name)
454 idisp_components[i - 1].name = "ehdaudio0D2";
455 idisp_components[i - 1].dai_name = devm_kasprintf(dev,
459 if (!idisp_components[i - 1].dai_name)
462 links[id].codecs = &idisp_components[i - 1];
463 links[id].num_codecs = 1;
464 links[id].platforms = platform_component;
465 links[id].num_platforms = ARRAY_SIZE(platform_component);
466 links[id].init = sof_hdmi_init;
467 links[id].dpcm_playback = 1;
468 links[id].no_pcm = 1;
473 if (sof_nau8825_quirk & SOF_SPEAKER_AMP_PRESENT) {
474 links[id].name = devm_kasprintf(dev, GFP_KERNEL,
475 "SSP%d-Codec", ssp_amp);
480 if (sof_nau8825_quirk & SOF_RT1019P_SPEAKER_AMP_PRESENT) {
481 links[id].codecs = rt1019p_component;
482 links[id].num_codecs = ARRAY_SIZE(rt1019p_component);
483 links[id].init = speaker_codec_init;
484 } else if (sof_nau8825_quirk &
485 SOF_MAX98373_SPEAKER_AMP_PRESENT) {
486 links[id].codecs = max_98373_components;
487 links[id].num_codecs = ARRAY_SIZE(max_98373_components);
488 links[id].init = max_98373_spk_codec_init;
489 links[id].ops = &max_98373_ops;
490 /* feedback stream */
491 links[id].dpcm_capture = 1;
492 } else if (sof_nau8825_quirk &
493 SOF_MAX98360A_SPEAKER_AMP_PRESENT) {
494 max_98360a_dai_link(&links[id]);
495 } else if (sof_nau8825_quirk & SOF_RT1015P_SPEAKER_AMP_PRESENT) {
496 sof_rt1015p_dai_link(&links[id]);
497 } else if (sof_nau8825_quirk &
498 SOF_NAU8318_SPEAKER_AMP_PRESENT) {
499 links[id].codecs = nau8318_components;
500 links[id].num_codecs = ARRAY_SIZE(nau8318_components);
501 links[id].init = speaker_codec_init;
506 links[id].platforms = platform_component;
507 links[id].num_platforms = ARRAY_SIZE(platform_component);
508 links[id].dpcm_playback = 1;
509 links[id].no_pcm = 1;
510 links[id].cpus = &cpus[id];
511 links[id].num_cpus = 1;
512 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL,
515 if (!links[id].cpus->dai_name)
520 /* BT audio offload */
521 if (sof_nau8825_quirk & SOF_SSP_BT_OFFLOAD_PRESENT) {
522 int port = (sof_nau8825_quirk & SOF_BT_OFFLOAD_SSP_MASK) >>
523 SOF_BT_OFFLOAD_SSP_SHIFT;
526 links[id].cpus = &cpus[id];
527 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL,
529 if (!links[id].cpus->dai_name)
531 links[id].name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-BT", port);
534 links[id].codecs = dummy_component;
535 links[id].num_codecs = ARRAY_SIZE(dummy_component);
536 links[id].platforms = platform_component;
537 links[id].num_platforms = ARRAY_SIZE(platform_component);
538 links[id].dpcm_playback = 1;
539 links[id].dpcm_capture = 1;
540 links[id].no_pcm = 1;
541 links[id].num_cpus = 1;
549 static int sof_audio_probe(struct platform_device *pdev)
551 struct snd_soc_dai_link *dai_links;
552 struct snd_soc_acpi_mach *mach;
553 struct sof_card_private *ctx;
554 int dmic_be_num, hdmi_num;
555 int ret, ssp_amp, ssp_codec;
557 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
561 if (pdev->id_entry && pdev->id_entry->driver_data)
562 sof_nau8825_quirk = (unsigned long)pdev->id_entry->driver_data;
564 mach = pdev->dev.platform_data;
566 /* A speaker amp might not be present when the quirk claims one is.
567 * Detect this via whether the machine driver match includes quirk_data.
569 if ((sof_nau8825_quirk & SOF_SPEAKER_AMP_PRESENT) && !mach->quirk_data)
570 sof_nau8825_quirk &= ~SOF_SPEAKER_AMP_PRESENT;
572 dev_dbg(&pdev->dev, "sof_nau8825_quirk = %lx\n", sof_nau8825_quirk);
574 /* default number of DMIC DAI's */
576 hdmi_num = (sof_nau8825_quirk & SOF_NAU8825_NUM_HDMIDEV_MASK) >>
577 SOF_NAU8825_NUM_HDMIDEV_SHIFT;
578 /* default number of HDMI DAI's */
582 ssp_amp = (sof_nau8825_quirk & SOF_NAU8825_SSP_AMP_MASK) >>
583 SOF_NAU8825_SSP_AMP_SHIFT;
585 ssp_codec = sof_nau8825_quirk & SOF_NAU8825_SSP_CODEC_MASK;
587 /* compute number of dai links */
588 sof_audio_card_nau8825.num_links = 1 + dmic_be_num + hdmi_num;
590 if (sof_nau8825_quirk & SOF_SPEAKER_AMP_PRESENT)
591 sof_audio_card_nau8825.num_links++;
593 if (sof_nau8825_quirk & SOF_MAX98373_SPEAKER_AMP_PRESENT)
594 max_98373_set_codec_conf(&sof_audio_card_nau8825);
595 else if (sof_nau8825_quirk & SOF_RT1015P_SPEAKER_AMP_PRESENT)
596 sof_rt1015p_codec_conf(&sof_audio_card_nau8825);
598 if (sof_nau8825_quirk & SOF_SSP_BT_OFFLOAD_PRESENT)
599 sof_audio_card_nau8825.num_links++;
601 dai_links = sof_card_dai_links_create(&pdev->dev, ssp_codec, ssp_amp,
602 dmic_be_num, hdmi_num);
606 sof_audio_card_nau8825.dai_link = dai_links;
608 INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
610 sof_audio_card_nau8825.dev = &pdev->dev;
612 /* set platform name for each dailink */
613 ret = snd_soc_fixup_dai_links_platform_name(&sof_audio_card_nau8825,
614 mach->mach_params.platform);
618 snd_soc_card_set_drvdata(&sof_audio_card_nau8825, ctx);
620 return devm_snd_soc_register_card(&pdev->dev,
621 &sof_audio_card_nau8825);
624 static const struct platform_device_id board_ids[] = {
626 .name = "sof_nau8825",
627 .driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
628 SOF_NAU8825_NUM_HDMIDEV(4) |
629 SOF_BT_OFFLOAD_SSP(2) |
630 SOF_SSP_BT_OFFLOAD_PRESENT),
634 .name = "adl_rt1019p_nau8825",
635 .driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
636 SOF_SPEAKER_AMP_PRESENT |
637 SOF_RT1019P_SPEAKER_AMP_PRESENT |
638 SOF_NAU8825_SSP_AMP(2) |
639 SOF_NAU8825_NUM_HDMIDEV(4)),
642 .name = "adl_max98373_nau8825",
643 .driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
644 SOF_SPEAKER_AMP_PRESENT |
645 SOF_MAX98373_SPEAKER_AMP_PRESENT |
646 SOF_NAU8825_SSP_AMP(1) |
647 SOF_NAU8825_NUM_HDMIDEV(4) |
648 SOF_BT_OFFLOAD_SSP(2) |
649 SOF_SSP_BT_OFFLOAD_PRESENT),
652 /* The limitation of length of char array, shorten the name */
653 .name = "adl_mx98360a_nau8825",
654 .driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
655 SOF_SPEAKER_AMP_PRESENT |
656 SOF_MAX98360A_SPEAKER_AMP_PRESENT |
657 SOF_NAU8825_SSP_AMP(1) |
658 SOF_NAU8825_NUM_HDMIDEV(4) |
659 SOF_BT_OFFLOAD_SSP(2) |
660 SOF_SSP_BT_OFFLOAD_PRESENT),
664 .name = "adl_rt1015p_nau8825",
665 .driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
666 SOF_SPEAKER_AMP_PRESENT |
667 SOF_RT1015P_SPEAKER_AMP_PRESENT |
668 SOF_NAU8825_SSP_AMP(1) |
669 SOF_NAU8825_NUM_HDMIDEV(4) |
670 SOF_BT_OFFLOAD_SSP(2) |
671 SOF_SSP_BT_OFFLOAD_PRESENT),
674 .name = "adl_nau8318_8825",
675 .driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
676 SOF_SPEAKER_AMP_PRESENT |
677 SOF_NAU8318_SPEAKER_AMP_PRESENT |
678 SOF_NAU8825_SSP_AMP(1) |
679 SOF_NAU8825_NUM_HDMIDEV(4) |
680 SOF_BT_OFFLOAD_SSP(2) |
681 SOF_SSP_BT_OFFLOAD_PRESENT),
685 MODULE_DEVICE_TABLE(platform, board_ids);
687 static struct platform_driver sof_audio = {
688 .probe = sof_audio_probe,
690 .name = "sof_nau8825",
691 .pm = &snd_soc_pm_ops,
693 .id_table = board_ids,
695 module_platform_driver(sof_audio)
697 /* Module information */
698 MODULE_DESCRIPTION("SOF Audio Machine driver for NAU8825");
699 MODULE_AUTHOR("David Lin <ctlin0@nuvoton.com>");
700 MODULE_AUTHOR("Mac Chiang <mac.chiang@intel.com>");
701 MODULE_LICENSE("GPL");
702 MODULE_IMPORT_NS(SND_SOC_INTEL_HDA_DSP_COMMON);
703 MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_MAXIM_COMMON);
704 MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_REALTEK_COMMON);