18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  cht-bsw-nau8824.c - ASoc Machine driver for Intel Cherryview-based
48c2ecf20Sopenharmony_ci *          platforms Cherrytrail and Braswell, with nau8824 codec.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci *  Copyright (C) 2018 Intel Corp
78c2ecf20Sopenharmony_ci *  Copyright (C) 2018 Nuvoton Technology Corp
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci *  Author: Wang, Joseph C <joequant@gmail.com>
108c2ecf20Sopenharmony_ci *  Co-author: John Hsu <KCHSU0@nuvoton.com>
118c2ecf20Sopenharmony_ci *  This file is based on cht_bsw_rt5672.c and cht-bsw-max98090.c
128c2ecf20Sopenharmony_ci */
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#include <linux/module.h>
158c2ecf20Sopenharmony_ci#include <linux/platform_device.h>
168c2ecf20Sopenharmony_ci#include <linux/slab.h>
178c2ecf20Sopenharmony_ci#include <sound/pcm.h>
188c2ecf20Sopenharmony_ci#include <sound/pcm_params.h>
198c2ecf20Sopenharmony_ci#include <sound/soc.h>
208c2ecf20Sopenharmony_ci#include <sound/soc-acpi.h>
218c2ecf20Sopenharmony_ci#include <sound/jack.h>
228c2ecf20Sopenharmony_ci#include <linux/input.h>
238c2ecf20Sopenharmony_ci#include "../atom/sst-atom-controls.h"
248c2ecf20Sopenharmony_ci#include "../../codecs/nau8824.h"
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_cistruct cht_mc_private {
278c2ecf20Sopenharmony_ci	struct snd_soc_jack jack;
288c2ecf20Sopenharmony_ci};
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_cistatic struct snd_soc_jack_pin cht_bsw_jack_pins[] = {
318c2ecf20Sopenharmony_ci	{
328c2ecf20Sopenharmony_ci		.pin = "Headphone",
338c2ecf20Sopenharmony_ci		.mask = SND_JACK_HEADPHONE,
348c2ecf20Sopenharmony_ci	},
358c2ecf20Sopenharmony_ci	{
368c2ecf20Sopenharmony_ci		.pin = "Headset Mic",
378c2ecf20Sopenharmony_ci		.mask = SND_JACK_MICROPHONE,
388c2ecf20Sopenharmony_ci	},
398c2ecf20Sopenharmony_ci};
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_cistatic const struct snd_soc_dapm_widget cht_dapm_widgets[] = {
428c2ecf20Sopenharmony_ci	SND_SOC_DAPM_HP("Headphone", NULL),
438c2ecf20Sopenharmony_ci	SND_SOC_DAPM_MIC("Headset Mic", NULL),
448c2ecf20Sopenharmony_ci	SND_SOC_DAPM_MIC("Int Mic", NULL),
458c2ecf20Sopenharmony_ci	SND_SOC_DAPM_SPK("Ext Spk", NULL),
468c2ecf20Sopenharmony_ci};
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_cistatic const struct snd_soc_dapm_route cht_audio_map[] = {
498c2ecf20Sopenharmony_ci	{"Ext Spk", NULL, "SPKOUTL"},
508c2ecf20Sopenharmony_ci	{"Ext Spk", NULL, "SPKOUTR"},
518c2ecf20Sopenharmony_ci	{"Headphone", NULL, "HPOL"},
528c2ecf20Sopenharmony_ci	{"Headphone", NULL, "HPOR"},
538c2ecf20Sopenharmony_ci	{"MIC1", NULL, "Int Mic"},
548c2ecf20Sopenharmony_ci	{"MIC2", NULL, "Int Mic"},
558c2ecf20Sopenharmony_ci	{"HSMIC1", NULL, "Headset Mic"},
568c2ecf20Sopenharmony_ci	{"HSMIC2", NULL, "Headset Mic"},
578c2ecf20Sopenharmony_ci	{"Playback", NULL, "ssp2 Tx"},
588c2ecf20Sopenharmony_ci	{"ssp2 Tx", NULL, "codec_out0"},
598c2ecf20Sopenharmony_ci	{"ssp2 Tx", NULL, "codec_out1"},
608c2ecf20Sopenharmony_ci	{"codec_in0", NULL, "ssp2 Rx" },
618c2ecf20Sopenharmony_ci	{"codec_in1", NULL, "ssp2 Rx" },
628c2ecf20Sopenharmony_ci	{"ssp2 Rx", NULL, "Capture"},
638c2ecf20Sopenharmony_ci};
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_cistatic const struct snd_kcontrol_new cht_mc_controls[] = {
668c2ecf20Sopenharmony_ci	SOC_DAPM_PIN_SWITCH("Headphone"),
678c2ecf20Sopenharmony_ci	SOC_DAPM_PIN_SWITCH("Headset Mic"),
688c2ecf20Sopenharmony_ci	SOC_DAPM_PIN_SWITCH("Int Mic"),
698c2ecf20Sopenharmony_ci	SOC_DAPM_PIN_SWITCH("Ext Spk"),
708c2ecf20Sopenharmony_ci};
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_cistatic int cht_aif1_hw_params(struct snd_pcm_substream *substream,
738c2ecf20Sopenharmony_ci	struct snd_pcm_hw_params *params)
748c2ecf20Sopenharmony_ci{
758c2ecf20Sopenharmony_ci	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
768c2ecf20Sopenharmony_ci	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
778c2ecf20Sopenharmony_ci	int ret;
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ci	ret = snd_soc_dai_set_sysclk(codec_dai, NAU8824_CLK_FLL_FS, 0,
808c2ecf20Sopenharmony_ci		SND_SOC_CLOCK_IN);
818c2ecf20Sopenharmony_ci	if (ret < 0) {
828c2ecf20Sopenharmony_ci		dev_err(codec_dai->dev, "can't set FS clock %d\n", ret);
838c2ecf20Sopenharmony_ci		return ret;
848c2ecf20Sopenharmony_ci	}
858c2ecf20Sopenharmony_ci	ret = snd_soc_dai_set_pll(codec_dai, 0, 0, params_rate(params),
868c2ecf20Sopenharmony_ci		params_rate(params) * 256);
878c2ecf20Sopenharmony_ci	if (ret < 0) {
888c2ecf20Sopenharmony_ci		dev_err(codec_dai->dev, "can't set FLL: %d\n", ret);
898c2ecf20Sopenharmony_ci		return ret;
908c2ecf20Sopenharmony_ci	}
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci	return 0;
938c2ecf20Sopenharmony_ci}
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_cistatic int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
968c2ecf20Sopenharmony_ci{
978c2ecf20Sopenharmony_ci	struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card);
988c2ecf20Sopenharmony_ci	struct snd_soc_jack *jack = &ctx->jack;
998c2ecf20Sopenharmony_ci	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0);
1008c2ecf20Sopenharmony_ci	struct snd_soc_component *component = codec_dai->component;
1018c2ecf20Sopenharmony_ci	int ret, jack_type;
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci	/* TDM 4 slots 24 bit, set Rx & Tx bitmask to 4 active slots */
1048c2ecf20Sopenharmony_ci	ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xf, 0x1, 4, 24);
1058c2ecf20Sopenharmony_ci	if (ret < 0) {
1068c2ecf20Sopenharmony_ci		dev_err(runtime->dev, "can't set codec TDM slot %d\n", ret);
1078c2ecf20Sopenharmony_ci		return ret;
1088c2ecf20Sopenharmony_ci	}
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci	/* NAU88L24 supports 4 butons headset detection
1118c2ecf20Sopenharmony_ci	 * KEY_PLAYPAUSE
1128c2ecf20Sopenharmony_ci	 * KEY_VOICECOMMAND
1138c2ecf20Sopenharmony_ci	 * KEY_VOLUMEUP
1148c2ecf20Sopenharmony_ci	 * KEY_VOLUMEDOWN
1158c2ecf20Sopenharmony_ci	 */
1168c2ecf20Sopenharmony_ci	jack_type = SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 |
1178c2ecf20Sopenharmony_ci		SND_JACK_BTN_2 | SND_JACK_BTN_3;
1188c2ecf20Sopenharmony_ci	ret = snd_soc_card_jack_new(runtime->card, "Headset", jack_type, jack,
1198c2ecf20Sopenharmony_ci		cht_bsw_jack_pins, ARRAY_SIZE(cht_bsw_jack_pins));
1208c2ecf20Sopenharmony_ci	if (ret) {
1218c2ecf20Sopenharmony_ci		dev_err(runtime->dev,
1228c2ecf20Sopenharmony_ci			"Headset Jack creation failed %d\n", ret);
1238c2ecf20Sopenharmony_ci		return ret;
1248c2ecf20Sopenharmony_ci	}
1258c2ecf20Sopenharmony_ci	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
1268c2ecf20Sopenharmony_ci	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
1278c2ecf20Sopenharmony_ci	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
1288c2ecf20Sopenharmony_ci	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_ci	nau8824_enable_jack_detect(component, jack);
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_ci	return ret;
1338c2ecf20Sopenharmony_ci}
1348c2ecf20Sopenharmony_ci
1358c2ecf20Sopenharmony_cistatic int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd,
1368c2ecf20Sopenharmony_ci	struct snd_pcm_hw_params *params)
1378c2ecf20Sopenharmony_ci{
1388c2ecf20Sopenharmony_ci	struct snd_interval *rate = hw_param_interval(params,
1398c2ecf20Sopenharmony_ci		SNDRV_PCM_HW_PARAM_RATE);
1408c2ecf20Sopenharmony_ci	struct snd_interval *channels = hw_param_interval(params,
1418c2ecf20Sopenharmony_ci		SNDRV_PCM_HW_PARAM_CHANNELS);
1428c2ecf20Sopenharmony_ci	struct snd_mask *fmt =
1438c2ecf20Sopenharmony_ci		hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
1448c2ecf20Sopenharmony_ci
1458c2ecf20Sopenharmony_ci	/* The DSP will covert the FE rate to 48k, stereo, 24bits */
1468c2ecf20Sopenharmony_ci	rate->min = rate->max = 48000;
1478c2ecf20Sopenharmony_ci	channels->min = channels->max = 2;
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ci	/* set SSP2 to 24-bit */
1508c2ecf20Sopenharmony_ci	snd_mask_none(fmt);
1518c2ecf20Sopenharmony_ci	params_set_format(params, SNDRV_PCM_FORMAT_S24_LE);
1528c2ecf20Sopenharmony_ci
1538c2ecf20Sopenharmony_ci	return 0;
1548c2ecf20Sopenharmony_ci}
1558c2ecf20Sopenharmony_ci
1568c2ecf20Sopenharmony_cistatic int cht_aif1_startup(struct snd_pcm_substream *substream)
1578c2ecf20Sopenharmony_ci{
1588c2ecf20Sopenharmony_ci	return snd_pcm_hw_constraint_single(substream->runtime,
1598c2ecf20Sopenharmony_ci		SNDRV_PCM_HW_PARAM_RATE, 48000);
1608c2ecf20Sopenharmony_ci}
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_cistatic const struct snd_soc_ops cht_aif1_ops = {
1638c2ecf20Sopenharmony_ci	.startup = cht_aif1_startup,
1648c2ecf20Sopenharmony_ci};
1658c2ecf20Sopenharmony_ci
1668c2ecf20Sopenharmony_cistatic const struct snd_soc_ops cht_be_ssp2_ops = {
1678c2ecf20Sopenharmony_ci	.hw_params = cht_aif1_hw_params,
1688c2ecf20Sopenharmony_ci};
1698c2ecf20Sopenharmony_ci
1708c2ecf20Sopenharmony_ciSND_SOC_DAILINK_DEF(dummy,
1718c2ecf20Sopenharmony_ci	DAILINK_COMP_ARRAY(COMP_DUMMY()));
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ciSND_SOC_DAILINK_DEF(media,
1748c2ecf20Sopenharmony_ci	DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai")));
1758c2ecf20Sopenharmony_ci
1768c2ecf20Sopenharmony_ciSND_SOC_DAILINK_DEF(deepbuffer,
1778c2ecf20Sopenharmony_ci	DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai")));
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_ciSND_SOC_DAILINK_DEF(compress,
1808c2ecf20Sopenharmony_ci	DAILINK_COMP_ARRAY(COMP_CPU("compress-cpu-dai")));
1818c2ecf20Sopenharmony_ci
1828c2ecf20Sopenharmony_ciSND_SOC_DAILINK_DEF(ssp2_port,
1838c2ecf20Sopenharmony_ci	DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port")));
1848c2ecf20Sopenharmony_ciSND_SOC_DAILINK_DEF(ssp2_codec,
1858c2ecf20Sopenharmony_ci	DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10508824:00",
1868c2ecf20Sopenharmony_ci				      NAU8824_CODEC_DAI)));
1878c2ecf20Sopenharmony_ci
1888c2ecf20Sopenharmony_ciSND_SOC_DAILINK_DEF(platform,
1898c2ecf20Sopenharmony_ci	DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform")));
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_cistatic struct snd_soc_dai_link cht_dailink[] = {
1928c2ecf20Sopenharmony_ci	/* Front End DAI links */
1938c2ecf20Sopenharmony_ci	[MERR_DPCM_AUDIO] = {
1948c2ecf20Sopenharmony_ci		.name = "Audio Port",
1958c2ecf20Sopenharmony_ci		.stream_name = "Audio",
1968c2ecf20Sopenharmony_ci		.nonatomic = true,
1978c2ecf20Sopenharmony_ci		.dynamic = 1,
1988c2ecf20Sopenharmony_ci		.dpcm_playback = 1,
1998c2ecf20Sopenharmony_ci		.dpcm_capture = 1,
2008c2ecf20Sopenharmony_ci		.ops = &cht_aif1_ops,
2018c2ecf20Sopenharmony_ci		SND_SOC_DAILINK_REG(media, dummy, platform),
2028c2ecf20Sopenharmony_ci	},
2038c2ecf20Sopenharmony_ci	[MERR_DPCM_DEEP_BUFFER] = {
2048c2ecf20Sopenharmony_ci		.name = "Deep-Buffer Audio Port",
2058c2ecf20Sopenharmony_ci		.stream_name = "Deep-Buffer Audio",
2068c2ecf20Sopenharmony_ci		.nonatomic = true,
2078c2ecf20Sopenharmony_ci		.dynamic = 1,
2088c2ecf20Sopenharmony_ci		.dpcm_playback = 1,
2098c2ecf20Sopenharmony_ci		.ops = &cht_aif1_ops,
2108c2ecf20Sopenharmony_ci		SND_SOC_DAILINK_REG(deepbuffer, dummy, platform),
2118c2ecf20Sopenharmony_ci	},
2128c2ecf20Sopenharmony_ci	[MERR_DPCM_COMPR] = {
2138c2ecf20Sopenharmony_ci		.name = "Compressed Port",
2148c2ecf20Sopenharmony_ci		.stream_name = "Compress",
2158c2ecf20Sopenharmony_ci		SND_SOC_DAILINK_REG(compress, dummy, platform),
2168c2ecf20Sopenharmony_ci	},
2178c2ecf20Sopenharmony_ci	/* Back End DAI links */
2188c2ecf20Sopenharmony_ci	{
2198c2ecf20Sopenharmony_ci		/* SSP2 - Codec */
2208c2ecf20Sopenharmony_ci		.name = "SSP2-Codec",
2218c2ecf20Sopenharmony_ci		.id = 1,
2228c2ecf20Sopenharmony_ci		.no_pcm = 1,
2238c2ecf20Sopenharmony_ci		.dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF
2248c2ecf20Sopenharmony_ci			| SND_SOC_DAIFMT_CBS_CFS,
2258c2ecf20Sopenharmony_ci		.init = cht_codec_init,
2268c2ecf20Sopenharmony_ci		.be_hw_params_fixup = cht_codec_fixup,
2278c2ecf20Sopenharmony_ci		.dpcm_playback = 1,
2288c2ecf20Sopenharmony_ci		.dpcm_capture = 1,
2298c2ecf20Sopenharmony_ci		.ops = &cht_be_ssp2_ops,
2308c2ecf20Sopenharmony_ci		SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform),
2318c2ecf20Sopenharmony_ci	},
2328c2ecf20Sopenharmony_ci};
2338c2ecf20Sopenharmony_ci
2348c2ecf20Sopenharmony_ci#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
2358c2ecf20Sopenharmony_ci/* use space before codec name to simplify card ID, and simplify driver name */
2368c2ecf20Sopenharmony_ci#define CARD_NAME "bytcht nau8824" /* card name will be 'sof-bytcht nau8824 */
2378c2ecf20Sopenharmony_ci#define DRIVER_NAME "SOF"
2388c2ecf20Sopenharmony_ci#else
2398c2ecf20Sopenharmony_ci#define CARD_NAME "chtnau8824"
2408c2ecf20Sopenharmony_ci#define DRIVER_NAME NULL /* card name will be used for driver name */
2418c2ecf20Sopenharmony_ci#endif
2428c2ecf20Sopenharmony_ci
2438c2ecf20Sopenharmony_ci/* SoC card */
2448c2ecf20Sopenharmony_cistatic struct snd_soc_card snd_soc_card_cht = {
2458c2ecf20Sopenharmony_ci	.name = CARD_NAME,
2468c2ecf20Sopenharmony_ci	.driver_name = DRIVER_NAME,
2478c2ecf20Sopenharmony_ci	.owner = THIS_MODULE,
2488c2ecf20Sopenharmony_ci	.dai_link = cht_dailink,
2498c2ecf20Sopenharmony_ci	.num_links = ARRAY_SIZE(cht_dailink),
2508c2ecf20Sopenharmony_ci	.dapm_widgets = cht_dapm_widgets,
2518c2ecf20Sopenharmony_ci	.num_dapm_widgets = ARRAY_SIZE(cht_dapm_widgets),
2528c2ecf20Sopenharmony_ci	.dapm_routes = cht_audio_map,
2538c2ecf20Sopenharmony_ci	.num_dapm_routes = ARRAY_SIZE(cht_audio_map),
2548c2ecf20Sopenharmony_ci	.controls = cht_mc_controls,
2558c2ecf20Sopenharmony_ci	.num_controls = ARRAY_SIZE(cht_mc_controls),
2568c2ecf20Sopenharmony_ci};
2578c2ecf20Sopenharmony_ci
2588c2ecf20Sopenharmony_cistatic int snd_cht_mc_probe(struct platform_device *pdev)
2598c2ecf20Sopenharmony_ci{
2608c2ecf20Sopenharmony_ci	struct cht_mc_private *drv;
2618c2ecf20Sopenharmony_ci	struct snd_soc_acpi_mach *mach;
2628c2ecf20Sopenharmony_ci	const char *platform_name;
2638c2ecf20Sopenharmony_ci	int ret_val;
2648c2ecf20Sopenharmony_ci
2658c2ecf20Sopenharmony_ci	drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
2668c2ecf20Sopenharmony_ci	if (!drv)
2678c2ecf20Sopenharmony_ci		return -ENOMEM;
2688c2ecf20Sopenharmony_ci	snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);
2698c2ecf20Sopenharmony_ci
2708c2ecf20Sopenharmony_ci	/* override plaform name, if required */
2718c2ecf20Sopenharmony_ci	snd_soc_card_cht.dev = &pdev->dev;
2728c2ecf20Sopenharmony_ci	mach = pdev->dev.platform_data;
2738c2ecf20Sopenharmony_ci	platform_name = mach->mach_params.platform;
2748c2ecf20Sopenharmony_ci
2758c2ecf20Sopenharmony_ci	ret_val = snd_soc_fixup_dai_links_platform_name(&snd_soc_card_cht,
2768c2ecf20Sopenharmony_ci							platform_name);
2778c2ecf20Sopenharmony_ci	if (ret_val)
2788c2ecf20Sopenharmony_ci		return ret_val;
2798c2ecf20Sopenharmony_ci
2808c2ecf20Sopenharmony_ci	/* register the soc card */
2818c2ecf20Sopenharmony_ci	ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht);
2828c2ecf20Sopenharmony_ci	if (ret_val) {
2838c2ecf20Sopenharmony_ci		dev_err(&pdev->dev,
2848c2ecf20Sopenharmony_ci			"snd_soc_register_card failed %d\n", ret_val);
2858c2ecf20Sopenharmony_ci		return ret_val;
2868c2ecf20Sopenharmony_ci	}
2878c2ecf20Sopenharmony_ci	platform_set_drvdata(pdev, &snd_soc_card_cht);
2888c2ecf20Sopenharmony_ci
2898c2ecf20Sopenharmony_ci	return ret_val;
2908c2ecf20Sopenharmony_ci}
2918c2ecf20Sopenharmony_ci
2928c2ecf20Sopenharmony_cistatic struct platform_driver snd_cht_mc_driver = {
2938c2ecf20Sopenharmony_ci	.driver = {
2948c2ecf20Sopenharmony_ci		.name = "cht-bsw-nau8824",
2958c2ecf20Sopenharmony_ci#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
2968c2ecf20Sopenharmony_ci		.pm = &snd_soc_pm_ops,
2978c2ecf20Sopenharmony_ci#endif
2988c2ecf20Sopenharmony_ci	},
2998c2ecf20Sopenharmony_ci	.probe = snd_cht_mc_probe,
3008c2ecf20Sopenharmony_ci};
3018c2ecf20Sopenharmony_ci
3028c2ecf20Sopenharmony_cimodule_platform_driver(snd_cht_mc_driver);
3038c2ecf20Sopenharmony_ci
3048c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("ASoC Intel(R) Baytrail CR Machine driver");
3058c2ecf20Sopenharmony_ciMODULE_AUTHOR("Wang, Joseph C <joequant@gmail.com>");
3068c2ecf20Sopenharmony_ciMODULE_AUTHOR("John Hsu <KCHSU0@nuvoton.com>");
3078c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL v2");
3088c2ecf20Sopenharmony_ciMODULE_ALIAS("platform:cht-bsw-nau8824");
309