2 * Intel Skylake I2S Machine Driver for NAU88L25+SSM4567
4 * Copyright (C) 2015, Intel Corporation. All rights reserved.
7 * Intel Skylake I2S Machine Driver for NAU88L25 and SSM4567
9 * Copyright (C) 2015, Intel Corporation. All rights reserved.
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License version
13 * 2 as published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
21 #include <linux/module.h>
22 #include <linux/platform_device.h>
23 #include <sound/core.h>
24 #include <sound/pcm.h>
25 #include <sound/soc.h>
26 #include <sound/jack.h>
27 #include <sound/pcm_params.h>
28 #include "../../codecs/nau8825.h"
29 #include "../../codecs/hdac_hdmi.h"
30 #include "../skylake/skl.h"
32 #define SKL_NUVOTON_CODEC_DAI "nau8825-hifi"
33 #define SKL_SSM_CODEC_DAI "ssm4567-hifi"
34 #define DMIC_CH(p) p->list[p->count-1]
36 static struct snd_soc_jack skylake_headset
;
37 static struct snd_soc_card skylake_audio_card
;
38 static const struct snd_pcm_hw_constraint_list
*dmic_constraints
;
39 static struct snd_soc_jack skylake_hdmi
[3];
42 struct list_head head
;
43 struct snd_soc_dai
*codec_dai
;
47 struct skl_nau88125_private
{
48 struct list_head hdmi_pcm_list
;
51 SKL_DPCM_AUDIO_PB
= 0,
53 SKL_DPCM_AUDIO_REF_CP
,
54 SKL_DPCM_AUDIO_DMIC_CP
,
55 SKL_DPCM_AUDIO_HDMI1_PB
,
56 SKL_DPCM_AUDIO_HDMI2_PB
,
57 SKL_DPCM_AUDIO_HDMI3_PB
,
60 static inline struct snd_soc_dai
*skl_get_codec_dai(struct snd_soc_card
*card
)
62 struct snd_soc_pcm_runtime
*rtd
;
64 list_for_each_entry(rtd
, &card
->rtd_list
, list
) {
66 if (!strncmp(rtd
->codec_dai
->name
, SKL_NUVOTON_CODEC_DAI
,
67 strlen(SKL_NUVOTON_CODEC_DAI
)))
68 return rtd
->codec_dai
;
74 static const struct snd_kcontrol_new skylake_controls
[] = {
75 SOC_DAPM_PIN_SWITCH("Headphone Jack"),
76 SOC_DAPM_PIN_SWITCH("Headset Mic"),
77 SOC_DAPM_PIN_SWITCH("Left Speaker"),
78 SOC_DAPM_PIN_SWITCH("Right Speaker"),
81 static int platform_clock_control(struct snd_soc_dapm_widget
*w
,
82 struct snd_kcontrol
*k
, int event
)
84 struct snd_soc_dapm_context
*dapm
= w
->dapm
;
85 struct snd_soc_card
*card
= dapm
->card
;
86 struct snd_soc_dai
*codec_dai
;
89 codec_dai
= skl_get_codec_dai(card
);
91 dev_err(card
->dev
, "Codec dai not found\n");
95 if (SND_SOC_DAPM_EVENT_ON(event
)) {
96 ret
= snd_soc_dai_set_sysclk(codec_dai
,
97 NAU8825_CLK_MCLK
, 24000000, SND_SOC_CLOCK_IN
);
99 dev_err(card
->dev
, "set sysclk err = %d\n", ret
);
103 ret
= snd_soc_dai_set_sysclk(codec_dai
,
104 NAU8825_CLK_INTERNAL
, 0, SND_SOC_CLOCK_IN
);
106 dev_err(card
->dev
, "set sysclk err = %d\n", ret
);
113 static const struct snd_soc_dapm_widget skylake_widgets
[] = {
114 SND_SOC_DAPM_HP("Headphone Jack", NULL
),
115 SND_SOC_DAPM_MIC("Headset Mic", NULL
),
116 SND_SOC_DAPM_SPK("Left Speaker", NULL
),
117 SND_SOC_DAPM_SPK("Right Speaker", NULL
),
118 SND_SOC_DAPM_MIC("SoC DMIC", NULL
),
119 SND_SOC_DAPM_SPK("DP1", NULL
),
120 SND_SOC_DAPM_SPK("DP2", NULL
),
121 SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM
, 0, 0,
122 platform_clock_control
, SND_SOC_DAPM_PRE_PMU
|
123 SND_SOC_DAPM_POST_PMD
),
126 static const struct snd_soc_dapm_route skylake_map
[] = {
127 /* HP jack connectors - unknown if we have jack detection */
128 {"Headphone Jack", NULL
, "HPOL"},
129 {"Headphone Jack", NULL
, "HPOR"},
132 {"Left Speaker", NULL
, "Left OUT"},
133 {"Right Speaker", NULL
, "Right OUT"},
136 {"MIC", NULL
, "Headset Mic"},
137 {"DMic", NULL
, "SoC DMIC"},
139 /* CODEC BE connections */
140 { "Left Playback", NULL
, "ssp0 Tx"},
141 { "Right Playback", NULL
, "ssp0 Tx"},
142 { "ssp0 Tx", NULL
, "codec0_out"},
144 /* IV feedback path */
145 { "codec0_lp_in", NULL
, "ssp0 Rx"},
146 { "ssp0 Rx", NULL
, "Left Capture Sense" },
147 { "ssp0 Rx", NULL
, "Right Capture Sense" },
149 { "Playback", NULL
, "ssp1 Tx"},
150 { "ssp1 Tx", NULL
, "codec1_out"},
152 { "codec0_in", NULL
, "ssp1 Rx" },
153 { "ssp1 Rx", NULL
, "Capture" },
156 { "dmic01_hifi", NULL
, "DMIC01 Rx" },
157 { "DMIC01 Rx", NULL
, "DMIC AIF" },
159 { "hifi3", NULL
, "iDisp3 Tx"},
160 { "iDisp3 Tx", NULL
, "iDisp3_out"},
161 { "hifi2", NULL
, "iDisp2 Tx"},
162 { "iDisp2 Tx", NULL
, "iDisp2_out"},
163 { "hifi1", NULL
, "iDisp1 Tx"},
164 { "iDisp1 Tx", NULL
, "iDisp1_out"},
166 { "Headphone Jack", NULL
, "Platform Clock" },
167 { "Headset Mic", NULL
, "Platform Clock" },
170 static struct snd_soc_codec_conf ssm4567_codec_conf
[] = {
172 .dev_name
= "i2c-INT343B:00",
173 .name_prefix
= "Left",
176 .dev_name
= "i2c-INT343B:01",
177 .name_prefix
= "Right",
181 static struct snd_soc_dai_link_component ssm4567_codec_components
[] = {
183 .name
= "i2c-INT343B:00",
184 .dai_name
= SKL_SSM_CODEC_DAI
,
187 .name
= "i2c-INT343B:01",
188 .dai_name
= SKL_SSM_CODEC_DAI
,
192 static int skylake_ssm4567_codec_init(struct snd_soc_pcm_runtime
*rtd
)
196 /* Slot 1 for left */
197 ret
= snd_soc_dai_set_tdm_slot(rtd
->codec_dais
[0], 0x01, 0x01, 2, 48);
201 /* Slot 2 for right */
202 ret
= snd_soc_dai_set_tdm_slot(rtd
->codec_dais
[1], 0x02, 0x02, 2, 48);
209 static int skylake_nau8825_codec_init(struct snd_soc_pcm_runtime
*rtd
)
212 struct snd_soc_codec
*codec
= rtd
->codec
;
215 * 4 buttons here map to the google Reference headset
216 * The use of these buttons can be decided by the user space.
218 ret
= snd_soc_card_jack_new(&skylake_audio_card
, "Headset Jack",
219 SND_JACK_HEADSET
| SND_JACK_BTN_0
| SND_JACK_BTN_1
|
220 SND_JACK_BTN_2
| SND_JACK_BTN_3
, &skylake_headset
,
223 dev_err(rtd
->dev
, "Headset Jack creation failed %d\n", ret
);
227 nau8825_enable_jack_detect(codec
, &skylake_headset
);
229 snd_soc_dapm_ignore_suspend(&rtd
->card
->dapm
, "SoC DMIC");
234 static int skylake_hdmi1_init(struct snd_soc_pcm_runtime
*rtd
)
236 struct skl_nau88125_private
*ctx
= snd_soc_card_get_drvdata(rtd
->card
);
237 struct snd_soc_dai
*dai
= rtd
->codec_dai
;
238 struct skl_hdmi_pcm
*pcm
;
240 pcm
= devm_kzalloc(rtd
->card
->dev
, sizeof(*pcm
), GFP_KERNEL
);
244 pcm
->device
= SKL_DPCM_AUDIO_HDMI1_PB
;
245 pcm
->codec_dai
= dai
;
247 list_add_tail(&pcm
->head
, &ctx
->hdmi_pcm_list
);
252 static int skylake_hdmi2_init(struct snd_soc_pcm_runtime
*rtd
)
254 struct skl_nau88125_private
*ctx
= snd_soc_card_get_drvdata(rtd
->card
);
255 struct snd_soc_dai
*dai
= rtd
->codec_dai
;
256 struct skl_hdmi_pcm
*pcm
;
258 pcm
= devm_kzalloc(rtd
->card
->dev
, sizeof(*pcm
), GFP_KERNEL
);
262 pcm
->device
= SKL_DPCM_AUDIO_HDMI2_PB
;
263 pcm
->codec_dai
= dai
;
265 list_add_tail(&pcm
->head
, &ctx
->hdmi_pcm_list
);
271 static int skylake_hdmi3_init(struct snd_soc_pcm_runtime
*rtd
)
273 struct skl_nau88125_private
*ctx
= snd_soc_card_get_drvdata(rtd
->card
);
274 struct snd_soc_dai
*dai
= rtd
->codec_dai
;
275 struct skl_hdmi_pcm
*pcm
;
277 pcm
= devm_kzalloc(rtd
->card
->dev
, sizeof(*pcm
), GFP_KERNEL
);
281 pcm
->device
= SKL_DPCM_AUDIO_HDMI3_PB
;
282 pcm
->codec_dai
= dai
;
284 list_add_tail(&pcm
->head
, &ctx
->hdmi_pcm_list
);
289 static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime
*rtd
)
291 struct snd_soc_dapm_context
*dapm
;
292 struct snd_soc_component
*component
= rtd
->cpu_dai
->component
;
294 dapm
= snd_soc_component_get_dapm(component
);
295 snd_soc_dapm_ignore_suspend(dapm
, "Reference Capture");
300 static unsigned int rates
[] = {
304 static struct snd_pcm_hw_constraint_list constraints_rates
= {
305 .count
= ARRAY_SIZE(rates
),
310 static unsigned int channels
[] = {
314 static struct snd_pcm_hw_constraint_list constraints_channels
= {
315 .count
= ARRAY_SIZE(channels
),
320 static int skl_fe_startup(struct snd_pcm_substream
*substream
)
322 struct snd_pcm_runtime
*runtime
= substream
->runtime
;
325 * on this platform for PCM device we support,
331 runtime
->hw
.channels_max
= 2;
332 snd_pcm_hw_constraint_list(runtime
, 0, SNDRV_PCM_HW_PARAM_CHANNELS
,
333 &constraints_channels
);
335 runtime
->hw
.formats
= SNDRV_PCM_FMTBIT_S16_LE
;
336 snd_pcm_hw_constraint_msbits(runtime
, 0, 16, 16);
338 snd_pcm_hw_constraint_list(runtime
, 0,
339 SNDRV_PCM_HW_PARAM_RATE
, &constraints_rates
);
344 static const struct snd_soc_ops skylake_nau8825_fe_ops
= {
345 .startup
= skl_fe_startup
,
348 static int skylake_ssp_fixup(struct snd_soc_pcm_runtime
*rtd
,
349 struct snd_pcm_hw_params
*params
)
351 struct snd_interval
*rate
= hw_param_interval(params
,
352 SNDRV_PCM_HW_PARAM_RATE
);
353 struct snd_interval
*channels
= hw_param_interval(params
,
354 SNDRV_PCM_HW_PARAM_CHANNELS
);
355 struct snd_mask
*fmt
= hw_param_mask(params
, SNDRV_PCM_HW_PARAM_FORMAT
);
357 /* The ADSP will covert the FE rate to 48k, stereo */
358 rate
->min
= rate
->max
= 48000;
359 channels
->min
= channels
->max
= 2;
361 /* set SSP0 to 24 bit */
363 snd_mask_set(fmt
, SNDRV_PCM_FORMAT_S24_LE
);
367 static int skylake_dmic_fixup(struct snd_soc_pcm_runtime
*rtd
,
368 struct snd_pcm_hw_params
*params
)
370 struct snd_interval
*channels
= hw_param_interval(params
,
371 SNDRV_PCM_HW_PARAM_CHANNELS
);
372 if (params_channels(params
) == 2 || DMIC_CH(dmic_constraints
) == 2)
373 channels
->min
= channels
->max
= 2;
375 channels
->min
= channels
->max
= 4;
380 static int skylake_nau8825_hw_params(struct snd_pcm_substream
*substream
,
381 struct snd_pcm_hw_params
*params
)
383 struct snd_soc_pcm_runtime
*rtd
= substream
->private_data
;
384 struct snd_soc_dai
*codec_dai
= rtd
->codec_dai
;
387 ret
= snd_soc_dai_set_sysclk(codec_dai
,
388 NAU8825_CLK_MCLK
, 24000000, SND_SOC_CLOCK_IN
);
391 dev_err(rtd
->dev
, "snd_soc_dai_set_sysclk err = %d\n", ret
);
396 static const struct snd_soc_ops skylake_nau8825_ops
= {
397 .hw_params
= skylake_nau8825_hw_params
,
400 static unsigned int channels_dmic
[] = {
404 static struct snd_pcm_hw_constraint_list constraints_dmic_channels
= {
405 .count
= ARRAY_SIZE(channels_dmic
),
406 .list
= channels_dmic
,
410 static const unsigned int dmic_2ch
[] = {
414 static const struct snd_pcm_hw_constraint_list constraints_dmic_2ch
= {
415 .count
= ARRAY_SIZE(dmic_2ch
),
420 static int skylake_dmic_startup(struct snd_pcm_substream
*substream
)
422 struct snd_pcm_runtime
*runtime
= substream
->runtime
;
424 runtime
->hw
.channels_max
= DMIC_CH(dmic_constraints
);
425 snd_pcm_hw_constraint_list(runtime
, 0, SNDRV_PCM_HW_PARAM_CHANNELS
,
428 return snd_pcm_hw_constraint_list(substream
->runtime
, 0,
429 SNDRV_PCM_HW_PARAM_RATE
, &constraints_rates
);
432 static const struct snd_soc_ops skylake_dmic_ops
= {
433 .startup
= skylake_dmic_startup
,
436 static unsigned int rates_16000
[] = {
440 static struct snd_pcm_hw_constraint_list constraints_16000
= {
441 .count
= ARRAY_SIZE(rates_16000
),
445 static const unsigned int ch_mono
[] = {
449 static const struct snd_pcm_hw_constraint_list constraints_refcap
= {
450 .count
= ARRAY_SIZE(ch_mono
),
454 static int skylake_refcap_startup(struct snd_pcm_substream
*substream
)
456 substream
->runtime
->hw
.channels_max
= 1;
457 snd_pcm_hw_constraint_list(substream
->runtime
, 0,
458 SNDRV_PCM_HW_PARAM_CHANNELS
,
459 &constraints_refcap
);
461 return snd_pcm_hw_constraint_list(substream
->runtime
, 0,
462 SNDRV_PCM_HW_PARAM_RATE
,
466 static const struct snd_soc_ops skylaye_refcap_ops
= {
467 .startup
= skylake_refcap_startup
,
470 /* skylake digital audio interface glue - connects codec <--> CPU */
471 static struct snd_soc_dai_link skylake_dais
[] = {
472 /* Front End DAI links */
473 [SKL_DPCM_AUDIO_PB
] = {
474 .name
= "Skl Audio Port",
475 .stream_name
= "Audio",
476 .cpu_dai_name
= "System Pin",
477 .platform_name
= "0000:00:1f.3",
479 .codec_name
= "snd-soc-dummy",
480 .codec_dai_name
= "snd-soc-dummy-dai",
482 .init
= skylake_nau8825_fe_init
,
484 SND_SOC_DPCM_TRIGGER_POST
, SND_SOC_DPCM_TRIGGER_POST
},
486 .ops
= &skylake_nau8825_fe_ops
,
488 [SKL_DPCM_AUDIO_CP
] = {
489 .name
= "Skl Audio Capture Port",
490 .stream_name
= "Audio Record",
491 .cpu_dai_name
= "System Pin",
492 .platform_name
= "0000:00:1f.3",
494 .codec_name
= "snd-soc-dummy",
495 .codec_dai_name
= "snd-soc-dummy-dai",
498 SND_SOC_DPCM_TRIGGER_POST
, SND_SOC_DPCM_TRIGGER_POST
},
500 .ops
= &skylake_nau8825_fe_ops
,
502 [SKL_DPCM_AUDIO_REF_CP
] = {
503 .name
= "Skl Audio Reference cap",
504 .stream_name
= "Wake on Voice",
505 .cpu_dai_name
= "Reference Pin",
506 .codec_name
= "snd-soc-dummy",
507 .codec_dai_name
= "snd-soc-dummy-dai",
508 .platform_name
= "0000:00:1f.3",
513 .ops
= &skylaye_refcap_ops
,
515 [SKL_DPCM_AUDIO_DMIC_CP
] = {
516 .name
= "Skl Audio DMIC cap",
517 .stream_name
= "dmiccap",
518 .cpu_dai_name
= "DMIC Pin",
519 .codec_name
= "snd-soc-dummy",
520 .codec_dai_name
= "snd-soc-dummy-dai",
521 .platform_name
= "0000:00:1f.3",
526 .ops
= &skylake_dmic_ops
,
528 [SKL_DPCM_AUDIO_HDMI1_PB
] = {
529 .name
= "Skl HDMI Port1",
530 .stream_name
= "Hdmi1",
531 .cpu_dai_name
= "HDMI1 Pin",
532 .codec_name
= "snd-soc-dummy",
533 .codec_dai_name
= "snd-soc-dummy-dai",
534 .platform_name
= "0000:00:1f.3",
538 SND_SOC_DPCM_TRIGGER_POST
, SND_SOC_DPCM_TRIGGER_POST
},
542 [SKL_DPCM_AUDIO_HDMI2_PB
] = {
543 .name
= "Skl HDMI Port2",
544 .stream_name
= "Hdmi2",
545 .cpu_dai_name
= "HDMI2 Pin",
546 .codec_name
= "snd-soc-dummy",
547 .codec_dai_name
= "snd-soc-dummy-dai",
548 .platform_name
= "0000:00:1f.3",
552 SND_SOC_DPCM_TRIGGER_POST
, SND_SOC_DPCM_TRIGGER_POST
},
556 [SKL_DPCM_AUDIO_HDMI3_PB
] = {
557 .name
= "Skl HDMI Port3",
558 .stream_name
= "Hdmi3",
559 .cpu_dai_name
= "HDMI3 Pin",
560 .codec_name
= "snd-soc-dummy",
561 .codec_dai_name
= "snd-soc-dummy-dai",
562 .platform_name
= "0000:00:1f.3",
564 SND_SOC_DPCM_TRIGGER_POST
, SND_SOC_DPCM_TRIGGER_POST
},
571 /* Back End DAI links */
574 .name
= "SSP0-Codec",
576 .cpu_dai_name
= "SSP0 Pin",
577 .platform_name
= "0000:00:1f.3",
579 .codecs
= ssm4567_codec_components
,
580 .num_codecs
= ARRAY_SIZE(ssm4567_codec_components
),
581 .dai_fmt
= SND_SOC_DAIFMT_DSP_A
|
582 SND_SOC_DAIFMT_IB_NF
|
583 SND_SOC_DAIFMT_CBS_CFS
,
584 .init
= skylake_ssm4567_codec_init
,
585 .ignore_pmdown_time
= 1,
586 .be_hw_params_fixup
= skylake_ssp_fixup
,
592 .name
= "SSP1-Codec",
594 .cpu_dai_name
= "SSP1 Pin",
595 .platform_name
= "0000:00:1f.3",
597 .codec_name
= "i2c-10508825:00",
598 .codec_dai_name
= SKL_NUVOTON_CODEC_DAI
,
599 .init
= skylake_nau8825_codec_init
,
600 .dai_fmt
= SND_SOC_DAIFMT_I2S
| SND_SOC_DAIFMT_NB_NF
|
601 SND_SOC_DAIFMT_CBS_CFS
,
602 .ignore_pmdown_time
= 1,
603 .be_hw_params_fixup
= skylake_ssp_fixup
,
604 .ops
= &skylake_nau8825_ops
,
611 .cpu_dai_name
= "DMIC01 Pin",
612 .codec_name
= "dmic-codec",
613 .codec_dai_name
= "dmic-hifi",
614 .platform_name
= "0000:00:1f.3",
616 .be_hw_params_fixup
= skylake_dmic_fixup
,
623 .cpu_dai_name
= "iDisp1 Pin",
624 .codec_name
= "ehdaudio0D2",
625 .codec_dai_name
= "intel-hdmi-hifi1",
626 .platform_name
= "0000:00:1f.3",
628 .init
= skylake_hdmi1_init
,
634 .cpu_dai_name
= "iDisp2 Pin",
635 .codec_name
= "ehdaudio0D2",
636 .codec_dai_name
= "intel-hdmi-hifi2",
637 .platform_name
= "0000:00:1f.3",
638 .init
= skylake_hdmi2_init
,
645 .cpu_dai_name
= "iDisp3 Pin",
646 .codec_name
= "ehdaudio0D2",
647 .codec_dai_name
= "intel-hdmi-hifi3",
648 .platform_name
= "0000:00:1f.3",
649 .init
= skylake_hdmi3_init
,
656 static int skylake_card_late_probe(struct snd_soc_card
*card
)
658 struct skl_nau88125_private
*ctx
= snd_soc_card_get_drvdata(card
);
659 struct skl_hdmi_pcm
*pcm
;
660 struct snd_soc_codec
*codec
= NULL
;
662 char jack_name
[NAME_SIZE
];
664 list_for_each_entry(pcm
, &ctx
->hdmi_pcm_list
, head
) {
665 codec
= pcm
->codec_dai
->codec
;
666 snprintf(jack_name
, sizeof(jack_name
),
667 "HDMI/DP, pcm=%d Jack", pcm
->device
);
668 err
= snd_soc_card_jack_new(card
, jack_name
,
676 err
= hdac_hdmi_jack_init(pcm
->codec_dai
, pcm
->device
,
687 return hdac_hdmi_jack_port_init(codec
, &card
->dapm
);
690 /* skylake audio machine driver for SPT + NAU88L25 */
691 static struct snd_soc_card skylake_audio_card
= {
692 .name
= "sklnau8825adi",
693 .owner
= THIS_MODULE
,
694 .dai_link
= skylake_dais
,
695 .num_links
= ARRAY_SIZE(skylake_dais
),
696 .controls
= skylake_controls
,
697 .num_controls
= ARRAY_SIZE(skylake_controls
),
698 .dapm_widgets
= skylake_widgets
,
699 .num_dapm_widgets
= ARRAY_SIZE(skylake_widgets
),
700 .dapm_routes
= skylake_map
,
701 .num_dapm_routes
= ARRAY_SIZE(skylake_map
),
702 .codec_conf
= ssm4567_codec_conf
,
703 .num_configs
= ARRAY_SIZE(ssm4567_codec_conf
),
704 .fully_routed
= true,
705 .late_probe
= skylake_card_late_probe
,
708 static int skylake_audio_probe(struct platform_device
*pdev
)
710 struct skl_nau88125_private
*ctx
;
711 struct skl_machine_pdata
*pdata
;
713 ctx
= devm_kzalloc(&pdev
->dev
, sizeof(*ctx
), GFP_ATOMIC
);
717 INIT_LIST_HEAD(&ctx
->hdmi_pcm_list
);
719 skylake_audio_card
.dev
= &pdev
->dev
;
720 snd_soc_card_set_drvdata(&skylake_audio_card
, ctx
);
722 pdata
= dev_get_drvdata(&pdev
->dev
);
724 dmic_constraints
= pdata
->dmic_num
== 2 ?
725 &constraints_dmic_2ch
: &constraints_dmic_channels
;
727 return devm_snd_soc_register_card(&pdev
->dev
, &skylake_audio_card
);
730 static const struct platform_device_id skl_board_ids
[] = {
731 { .name
= "skl_n88l25_s4567" },
732 { .name
= "kbl_n88l25_s4567" },
736 static struct platform_driver skylake_audio
= {
737 .probe
= skylake_audio_probe
,
739 .name
= "skl_n88l25_s4567",
740 .pm
= &snd_soc_pm_ops
,
742 .id_table
= skl_board_ids
,
745 module_platform_driver(skylake_audio
)
747 /* Module information */
748 MODULE_AUTHOR("Conrad Cooke <conrad.cooke@intel.com>");
749 MODULE_AUTHOR("Harsha Priya <harshapriya.n@intel.com>");
750 MODULE_AUTHOR("Naveen M <naveen.m@intel.com>");
751 MODULE_AUTHOR("Sathya Prakash M R <sathya.prakash.m.r@intel.com>");
752 MODULE_AUTHOR("Yong Zhi <yong.zhi@intel.com>");
753 MODULE_DESCRIPTION("Intel Audio Machine driver for SKL with NAU88L25 and SSM4567 in I2S Mode");
754 MODULE_LICENSE("GPL v2");
755 MODULE_ALIAS("platform:skl_n88l25_s4567");
756 MODULE_ALIAS("platform:kbl_n88l25_s4567");