]> Git Repo - linux.git/blame - sound/soc/intel/boards/sof_es8336.c
ASoC: Intel: sof_es8336: extend machine driver to support ES8326 codec
[linux.git] / sound / soc / intel / boards / sof_es8336.c
CommitLineData
a164137c
PLB
1// SPDX-License-Identifier: GPL-2.0-only
2// Copyright(c) 2021 Intel Corporation.
3
4/*
5 * Intel SOF Machine Driver with es8336 Codec
6 */
7
8#include <linux/device.h>
9#include <linux/dmi.h>
10#include <linux/gpio/consumer.h>
11#include <linux/gpio/machine.h>
12#include <linux/i2c.h>
13#include <linux/input.h>
14#include <linux/module.h>
15#include <linux/platform_device.h>
16#include <linux/slab.h>
17#include <sound/jack.h>
18#include <sound/pcm.h>
19#include <sound/pcm_params.h>
20#include <sound/soc.h>
21#include <sound/soc-acpi.h>
22#include "hda_dsp_common.h"
23
8e5db491
PLB
24/* jd-inv + terminating entry */
25#define MAX_NO_PROPS 2
26
a164137c
PLB
27#define SOF_ES8336_SSP_CODEC(quirk) ((quirk) & GENMASK(3, 0))
28#define SOF_ES8336_SSP_CODEC_MASK (GENMASK(3, 0))
29
30#define SOF_ES8336_TGL_GPIO_QUIRK BIT(4)
31#define SOF_ES8336_ENABLE_DMIC BIT(5)
8e5db491 32#define SOF_ES8336_JD_INVERTED BIT(6)
a164137c
PLB
33
34static unsigned long quirk;
35
36static int quirk_override = -1;
37module_param_named(quirk, quirk_override, int, 0444);
38MODULE_PARM_DESC(quirk, "Board-specific quirk override");
39
40struct sof_es8336_private {
41 struct device *codec_dev;
42 struct gpio_desc *gpio_pa;
43 struct snd_soc_jack jack;
44 struct list_head hdmi_pcm_list;
45 bool speaker_en;
46};
47
48struct sof_hdmi_pcm {
49 struct list_head head;
50 struct snd_soc_dai *codec_dai;
51 int device;
52};
53
54static const struct acpi_gpio_params pa_enable_gpio = { 0, 0, true };
55static const struct acpi_gpio_mapping acpi_es8336_gpios[] = {
56 { "pa-enable-gpios", &pa_enable_gpio, 1 },
57 { }
58};
59
60static const struct acpi_gpio_params quirk_pa_enable_gpio = { 1, 0, true };
61static const struct acpi_gpio_mapping quirk_acpi_es8336_gpios[] = {
62 { "pa-enable-gpios", &quirk_pa_enable_gpio, 1 },
63 { }
64};
65
66static const struct acpi_gpio_mapping *gpio_mapping = acpi_es8336_gpios;
67
68static void log_quirks(struct device *dev)
69{
9c818d84
PLB
70 dev_info(dev, "quirk mask %#lx\n", quirk);
71 dev_info(dev, "quirk SSP%ld\n", SOF_ES8336_SSP_CODEC(quirk));
72 if (quirk & SOF_ES8336_ENABLE_DMIC)
73 dev_info(dev, "quirk DMIC enabled\n");
74 if (quirk & SOF_ES8336_TGL_GPIO_QUIRK)
75 dev_info(dev, "quirk TGL GPIO enabled\n");
8e5db491
PLB
76 if (quirk & SOF_ES8336_JD_INVERTED)
77 dev_info(dev, "quirk JD inverted enabled\n");
a164137c
PLB
78}
79
80static int sof_es8316_speaker_power_event(struct snd_soc_dapm_widget *w,
81 struct snd_kcontrol *kcontrol, int event)
82{
83 struct snd_soc_card *card = w->dapm->card;
84 struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card);
85
86 if (SND_SOC_DAPM_EVENT_ON(event))
87 priv->speaker_en = false;
88 else
89 priv->speaker_en = true;
90
91 gpiod_set_value_cansleep(priv->gpio_pa, priv->speaker_en);
92
93 return 0;
94}
95
96static const struct snd_soc_dapm_widget sof_es8316_widgets[] = {
97 SND_SOC_DAPM_SPK("Speaker", NULL),
98 SND_SOC_DAPM_HP("Headphone", NULL),
99 SND_SOC_DAPM_MIC("Headset Mic", NULL),
100 SND_SOC_DAPM_MIC("Internal Mic", NULL),
101
102 SND_SOC_DAPM_SUPPLY("Speaker Power", SND_SOC_NOPM, 0, 0,
103 sof_es8316_speaker_power_event,
104 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU),
105};
106
107static const struct snd_soc_dapm_widget dmic_widgets[] = {
108 SND_SOC_DAPM_MIC("SoC DMIC", NULL),
109};
110
111static const struct snd_soc_dapm_route sof_es8316_audio_map[] = {
112 {"Headphone", NULL, "HPOL"},
113 {"Headphone", NULL, "HPOR"},
114
115 /*
116 * There is no separate speaker output instead the speakers are muxed to
117 * the HP outputs. The mux is controlled by the "Speaker Power" supply.
118 */
119 {"Speaker", NULL, "HPOL"},
120 {"Speaker", NULL, "HPOR"},
121 {"Speaker", NULL, "Speaker Power"},
122};
123
124static const struct snd_soc_dapm_route sof_es8316_intmic_in1_map[] = {
125 {"MIC1", NULL, "Internal Mic"},
126 {"MIC2", NULL, "Headset Mic"},
127};
128
129static const struct snd_soc_dapm_route dmic_map[] = {
130 /* digital mics */
131 {"DMic", NULL, "SoC DMIC"},
132};
133
134static const struct snd_kcontrol_new sof_es8316_controls[] = {
135 SOC_DAPM_PIN_SWITCH("Speaker"),
136 SOC_DAPM_PIN_SWITCH("Headphone"),
137 SOC_DAPM_PIN_SWITCH("Headset Mic"),
138 SOC_DAPM_PIN_SWITCH("Internal Mic"),
139};
140
141static struct snd_soc_jack_pin sof_es8316_jack_pins[] = {
142 {
143 .pin = "Headphone",
144 .mask = SND_JACK_HEADPHONE,
145 },
146 {
147 .pin = "Headset Mic",
148 .mask = SND_JACK_MICROPHONE,
149 },
150};
151
152static int dmic_init(struct snd_soc_pcm_runtime *runtime)
153{
154 struct snd_soc_card *card = runtime->card;
155 int ret;
156
157 ret = snd_soc_dapm_new_controls(&card->dapm, dmic_widgets,
158 ARRAY_SIZE(dmic_widgets));
159 if (ret) {
160 dev_err(card->dev, "DMic widget addition failed: %d\n", ret);
161 return ret;
162 }
163
164 ret = snd_soc_dapm_add_routes(&card->dapm, dmic_map,
165 ARRAY_SIZE(dmic_map));
166 if (ret)
167 dev_err(card->dev, "DMic map addition failed: %d\n", ret);
168
169 return ret;
170}
171
172static int sof_hdmi_init(struct snd_soc_pcm_runtime *runtime)
173{
174 struct sof_es8336_private *priv = snd_soc_card_get_drvdata(runtime->card);
175 struct snd_soc_dai *dai = asoc_rtd_to_codec(runtime, 0);
176 struct sof_hdmi_pcm *pcm;
177
178 pcm = devm_kzalloc(runtime->card->dev, sizeof(*pcm), GFP_KERNEL);
179 if (!pcm)
180 return -ENOMEM;
181
182 /* dai_link id is 1:1 mapped to the PCM device */
183 pcm->device = runtime->dai_link->id;
184 pcm->codec_dai = dai;
185
186 list_add_tail(&pcm->head, &priv->hdmi_pcm_list);
187
188 return 0;
189}
190
191static int sof_es8316_init(struct snd_soc_pcm_runtime *runtime)
192{
193 struct snd_soc_component *codec = asoc_rtd_to_codec(runtime, 0)->component;
194 struct snd_soc_card *card = runtime->card;
195 struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card);
196 const struct snd_soc_dapm_route *custom_map;
197 int num_routes;
198 int ret;
199
200 card->dapm.idle_bias_off = true;
201
202 custom_map = sof_es8316_intmic_in1_map;
203 num_routes = ARRAY_SIZE(sof_es8316_intmic_in1_map);
204
205 ret = snd_soc_dapm_add_routes(&card->dapm, custom_map, num_routes);
206 if (ret)
207 return ret;
208
209 ret = snd_soc_card_jack_new(card, "Headset",
210 SND_JACK_HEADSET | SND_JACK_BTN_0,
211 &priv->jack, sof_es8316_jack_pins,
212 ARRAY_SIZE(sof_es8316_jack_pins));
213 if (ret) {
214 dev_err(card->dev, "jack creation failed %d\n", ret);
215 return ret;
216 }
217
218 snd_jack_set_key(priv->jack.jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
219
220 snd_soc_component_set_jack(codec, &priv->jack, NULL);
221
222 return 0;
223}
224
225static void sof_es8316_exit(struct snd_soc_pcm_runtime *rtd)
226{
227 struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
228
229 snd_soc_component_set_jack(component, NULL, NULL);
230}
231
232static int sof_es8336_quirk_cb(const struct dmi_system_id *id)
233{
234 quirk = (unsigned long)id->driver_data;
235
236 if (quirk & SOF_ES8336_TGL_GPIO_QUIRK)
237 gpio_mapping = quirk_acpi_es8336_gpios;
238
239 return 1;
240}
241
651c304d
PLB
242/*
243 * this table should only be used to add GPIO or jack-detection quirks
244 * that cannot be detected from ACPI tables. The SSP and DMIC
245 * information are providing by the platform driver and are aligned
246 * with the topology used.
247 *
248 * If the GPIO support is missing, the quirk parameter can be used to
249 * enable speakers. In that case it's recommended to keep the SSP and DMIC
250 * information consistent, overriding the SSP and DMIC can only be done
251 * if the topology file is modified as well.
252 */
a164137c 253static const struct dmi_system_id sof_es8336_quirk_table[] = {
a164137c
PLB
254 {
255 .callback = sof_es8336_quirk_cb,
256 .matches = {
257 DMI_MATCH(DMI_SYS_VENDOR, "IP3 tech"),
258 DMI_MATCH(DMI_BOARD_NAME, "WN1"),
259 },
651c304d 260 .driver_data = (void *)(SOF_ES8336_TGL_GPIO_QUIRK)
a164137c
PLB
261 },
262 {}
263};
264
265static int sof_es8336_hw_params(struct snd_pcm_substream *substream,
266 struct snd_pcm_hw_params *params)
267{
268 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
269 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
270 const int sysclk = 19200000;
271 int ret;
272
273 ret = snd_soc_dai_set_sysclk(codec_dai, 1, sysclk, SND_SOC_CLOCK_OUT);
274 if (ret < 0) {
275 dev_err(rtd->dev, "%s, Failed to set ES8336 SYSCLK: %d\n",
276 __func__, ret);
277 return ret;
278 }
279
280 return 0;
281}
282
283/* machine stream operations */
284static struct snd_soc_ops sof_es8336_ops = {
285 .hw_params = sof_es8336_hw_params,
286};
287
288static struct snd_soc_dai_link_component platform_component[] = {
289 {
290 /* name might be overridden during probe */
291 .name = "0000:00:1f.3"
292 }
293};
294
70b519e5 295SND_SOC_DAILINK_DEF(es8336_codec,
a164137c
PLB
296 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-ESSX8336:00", "ES8316 HiFi")));
297
298static struct snd_soc_dai_link_component dmic_component[] = {
299 {
300 .name = "dmic-codec",
301 .dai_name = "dmic-hifi",
302 }
303};
304
305static int sof_es8336_late_probe(struct snd_soc_card *card)
306{
307 struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card);
308 struct sof_hdmi_pcm *pcm;
309
310 if (list_empty(&priv->hdmi_pcm_list))
311 return -ENOENT;
312
313 pcm = list_first_entry(&priv->hdmi_pcm_list, struct sof_hdmi_pcm, head);
314
315 return hda_dsp_hdmi_build_controls(card, pcm->codec_dai->component);
316}
317
318/* SoC card */
319static struct snd_soc_card sof_es8336_card = {
320 .name = "essx8336", /* sof- prefix added automatically */
321 .owner = THIS_MODULE,
322 .dapm_widgets = sof_es8316_widgets,
323 .num_dapm_widgets = ARRAY_SIZE(sof_es8316_widgets),
324 .dapm_routes = sof_es8316_audio_map,
325 .num_dapm_routes = ARRAY_SIZE(sof_es8316_audio_map),
326 .controls = sof_es8316_controls,
327 .num_controls = ARRAY_SIZE(sof_es8316_controls),
328 .fully_routed = true,
329 .late_probe = sof_es8336_late_probe,
330 .num_links = 1,
331};
332
333static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
334 int ssp_codec,
335 int dmic_be_num,
336 int hdmi_num)
337{
338 struct snd_soc_dai_link_component *cpus;
339 struct snd_soc_dai_link *links;
340 struct snd_soc_dai_link_component *idisp_components;
341 int hdmi_id_offset = 0;
342 int id = 0;
343 int i;
344
345 links = devm_kcalloc(dev, sof_es8336_card.num_links,
346 sizeof(struct snd_soc_dai_link), GFP_KERNEL);
347 cpus = devm_kcalloc(dev, sof_es8336_card.num_links,
348 sizeof(struct snd_soc_dai_link_component), GFP_KERNEL);
349 if (!links || !cpus)
350 goto devm_err;
351
352 /* codec SSP */
353 links[id].name = devm_kasprintf(dev, GFP_KERNEL,
354 "SSP%d-Codec", ssp_codec);
355 if (!links[id].name)
356 goto devm_err;
357
358 links[id].id = id;
70b519e5
PLB
359 links[id].codecs = es8336_codec;
360 links[id].num_codecs = ARRAY_SIZE(es8336_codec);
a164137c
PLB
361 links[id].platforms = platform_component;
362 links[id].num_platforms = ARRAY_SIZE(platform_component);
363 links[id].init = sof_es8316_init;
364 links[id].exit = sof_es8316_exit;
365 links[id].ops = &sof_es8336_ops;
366 links[id].nonatomic = true;
367 links[id].dpcm_playback = 1;
368 links[id].dpcm_capture = 1;
369 links[id].no_pcm = 1;
370 links[id].cpus = &cpus[id];
371 links[id].num_cpus = 1;
372
373 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL,
374 "SSP%d Pin",
375 ssp_codec);
376 if (!links[id].cpus->dai_name)
377 goto devm_err;
378
379 id++;
380
381 /* dmic */
382 if (dmic_be_num > 0) {
383 /* at least we have dmic01 */
384 links[id].name = "dmic01";
385 links[id].cpus = &cpus[id];
386 links[id].cpus->dai_name = "DMIC01 Pin";
387 links[id].init = dmic_init;
388 if (dmic_be_num > 1) {
389 /* set up 2 BE links at most */
390 links[id + 1].name = "dmic16k";
391 links[id + 1].cpus = &cpus[id + 1];
392 links[id + 1].cpus->dai_name = "DMIC16k Pin";
393 dmic_be_num = 2;
394 }
395 } else {
396 /* HDMI dai link starts at 3 according to current topology settings */
397 hdmi_id_offset = 2;
398 }
399
400 for (i = 0; i < dmic_be_num; i++) {
401 links[id].id = id;
402 links[id].num_cpus = 1;
403 links[id].codecs = dmic_component;
404 links[id].num_codecs = ARRAY_SIZE(dmic_component);
405 links[id].platforms = platform_component;
406 links[id].num_platforms = ARRAY_SIZE(platform_component);
407 links[id].ignore_suspend = 1;
408 links[id].dpcm_capture = 1;
409 links[id].no_pcm = 1;
410
411 id++;
412 }
413
414 /* HDMI */
415 if (hdmi_num > 0) {
416 idisp_components = devm_kzalloc(dev,
417 sizeof(struct snd_soc_dai_link_component) *
418 hdmi_num, GFP_KERNEL);
419 if (!idisp_components)
420 goto devm_err;
421 }
422
423 for (i = 1; i <= hdmi_num; i++) {
424 links[id].name = devm_kasprintf(dev, GFP_KERNEL,
425 "iDisp%d", i);
426 if (!links[id].name)
427 goto devm_err;
428
429 links[id].id = id + hdmi_id_offset;
430 links[id].cpus = &cpus[id];
431 links[id].num_cpus = 1;
432 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL,
433 "iDisp%d Pin", i);
434 if (!links[id].cpus->dai_name)
435 goto devm_err;
436
437 idisp_components[i - 1].name = "ehdaudio0D2";
438 idisp_components[i - 1].dai_name = devm_kasprintf(dev,
439 GFP_KERNEL,
440 "intel-hdmi-hifi%d",
441 i);
442 if (!idisp_components[i - 1].dai_name)
443 goto devm_err;
444
445 links[id].codecs = &idisp_components[i - 1];
446 links[id].num_codecs = 1;
447 links[id].platforms = platform_component;
448 links[id].num_platforms = ARRAY_SIZE(platform_component);
449 links[id].init = sof_hdmi_init;
450 links[id].dpcm_playback = 1;
451 links[id].no_pcm = 1;
452
453 id++;
454 }
455
456 return links;
457
458devm_err:
459 return NULL;
460}
461
462 /* i2c-<HID>:00 with HID being 8 chars */
463static char codec_name[SND_ACPI_I2C_ID_LEN];
464
465static int sof_es8336_probe(struct platform_device *pdev)
466{
467 struct device *dev = &pdev->dev;
468 struct snd_soc_card *card;
469 struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
8e5db491 470 struct property_entry props[MAX_NO_PROPS] = {};
a164137c 471 struct sof_es8336_private *priv;
8e5db491 472 struct fwnode_handle *fwnode;
a164137c
PLB
473 struct acpi_device *adev;
474 struct snd_soc_dai_link *dai_links;
475 struct device *codec_dev;
8e5db491 476 unsigned int cnt = 0;
a164137c
PLB
477 int dmic_be_num = 0;
478 int hdmi_num = 3;
479 int ret;
480
481 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
482 if (!priv)
483 return -ENOMEM;
484
485 card = &sof_es8336_card;
486 card->dev = dev;
487
651c304d
PLB
488 /* check GPIO DMI quirks */
489 dmi_check_system(sof_es8336_quirk_table);
a164137c 490
651c304d
PLB
491 if (!mach->mach_params.i2s_link_mask) {
492 dev_warn(dev, "No I2S link information provided, using SSP0. This may need to be modified with the quirk module parameter\n");
493 } else {
494 /*
495 * Set configuration based on platform NHLT.
496 * In this machine driver, we can only support one SSP for the
497 * ES8336 link, the else-if below are intentional.
498 * In some cases multiple SSPs can be reported by NHLT, starting MSB-first
499 * seems to pick the right connection.
500 */
501 unsigned long ssp = 0;
502
503 if (mach->mach_params.i2s_link_mask & BIT(2))
504 ssp = SOF_ES8336_SSP_CODEC(2);
505 else if (mach->mach_params.i2s_link_mask & BIT(1))
506 ssp = SOF_ES8336_SSP_CODEC(1);
507 else if (mach->mach_params.i2s_link_mask & BIT(0))
508 ssp = SOF_ES8336_SSP_CODEC(0);
509
510 quirk |= ssp;
511 }
512
513 if (mach->mach_params.dmic_num)
514 quirk |= SOF_ES8336_ENABLE_DMIC;
a164137c
PLB
515
516 if (quirk_override != -1) {
517 dev_info(dev, "Overriding quirk 0x%lx => 0x%x\n",
518 quirk, quirk_override);
519 quirk = quirk_override;
520 }
521 log_quirks(dev);
522
651c304d
PLB
523 if (quirk & SOF_ES8336_ENABLE_DMIC)
524 dmic_be_num = 2;
525
a164137c
PLB
526 sof_es8336_card.num_links += dmic_be_num + hdmi_num;
527 dai_links = sof_card_dai_links_create(dev,
528 SOF_ES8336_SSP_CODEC(quirk),
529 dmic_be_num, hdmi_num);
530 if (!dai_links)
531 return -ENOMEM;
532
533 sof_es8336_card.dai_link = dai_links;
534
535 /* fixup codec name based on HID */
536 adev = acpi_dev_get_first_match_dev(mach->id, NULL, -1);
537 if (adev) {
538 snprintf(codec_name, sizeof(codec_name),
539 "i2c-%s", acpi_dev_name(adev));
540 put_device(&adev->dev);
541 dai_links[0].codecs->name = codec_name;
70b519e5
PLB
542
543 /* also fixup codec dai name if relevant */
544 if (!strncmp(mach->id, "ESSX8326", SND_ACPI_I2C_ID_LEN))
545 dai_links[0].codecs->dai_name = "ES8326 HiFi";
8e5db491
PLB
546 } else {
547 dev_err(dev, "Error cannot find '%s' dev\n", mach->id);
548 return -ENXIO;
a164137c
PLB
549 }
550
551 ret = snd_soc_fixup_dai_links_platform_name(&sof_es8336_card,
552 mach->mach_params.platform);
553 if (ret)
554 return ret;
555
42302b20 556 codec_dev = acpi_get_first_physical_node(adev);
a164137c
PLB
557 if (!codec_dev)
558 return -EPROBE_DEFER;
42302b20 559 priv->codec_dev = get_device(codec_dev);
a164137c 560
8e5db491
PLB
561 if (quirk & SOF_ES8336_JD_INVERTED)
562 props[cnt++] = PROPERTY_ENTRY_BOOL("everest,jack-detect-inverted");
563
564 if (cnt) {
565 fwnode = fwnode_create_software_node(props, NULL);
566 if (IS_ERR(fwnode)) {
567 put_device(codec_dev);
568 return PTR_ERR(fwnode);
569 }
570
571 ret = device_add_software_node(codec_dev, to_software_node(fwnode));
572
573 fwnode_handle_put(fwnode);
574
575 if (ret) {
576 put_device(codec_dev);
577 return ret;
578 }
579 }
580
d94c11a9 581 /* get speaker enable GPIO */
a164137c
PLB
582 ret = devm_acpi_dev_add_driver_gpios(codec_dev, gpio_mapping);
583 if (ret)
584 dev_warn(codec_dev, "unable to add GPIO mapping table\n");
585
5a6cfba5 586 priv->gpio_pa = gpiod_get_optional(codec_dev, "pa-enable", GPIOD_OUT_LOW);
a164137c 587 if (IS_ERR(priv->gpio_pa)) {
5a6cfba5
PLB
588 ret = dev_err_probe(dev, PTR_ERR(priv->gpio_pa),
589 "could not get pa-enable GPIO\n");
8e5db491 590 goto err_put_codec;
a164137c
PLB
591 }
592
a164137c
PLB
593 INIT_LIST_HEAD(&priv->hdmi_pcm_list);
594
595 snd_soc_card_set_drvdata(card, priv);
596
597 ret = devm_snd_soc_register_card(dev, card);
598 if (ret) {
599 gpiod_put(priv->gpio_pa);
600 dev_err(dev, "snd_soc_register_card failed: %d\n", ret);
8e5db491 601 goto err_put_codec;
a164137c
PLB
602 }
603 platform_set_drvdata(pdev, &sof_es8336_card);
604 return 0;
605
8e5db491
PLB
606err_put_codec:
607 device_remove_software_node(priv->codec_dev);
a164137c
PLB
608 put_device(codec_dev);
609 return ret;
610}
611
612static int sof_es8336_remove(struct platform_device *pdev)
613{
614 struct snd_soc_card *card = platform_get_drvdata(pdev);
615 struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card);
616
617 gpiod_put(priv->gpio_pa);
8e5db491 618 device_remove_software_node(priv->codec_dev);
a164137c
PLB
619 put_device(priv->codec_dev);
620
621 return 0;
622}
623
624static struct platform_driver sof_es8336_driver = {
625 .driver = {
626 .name = "sof-essx8336",
627 .pm = &snd_soc_pm_ops,
628 },
629 .probe = sof_es8336_probe,
630 .remove = sof_es8336_remove,
631};
632module_platform_driver(sof_es8336_driver);
633
634MODULE_DESCRIPTION("ASoC Intel(R) SOF + ES8336 Machine driver");
635MODULE_LICENSE("GPL");
636MODULE_ALIAS("platform:sof-essx8336");
637MODULE_IMPORT_NS(SND_SOC_INTEL_HDA_DSP_COMMON);
This page took 0.114687 seconds and 4 git commands to generate.