Thomas Gleixner | 1802d0b | 2019-05-27 08:55:21 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Intel Broadwell Wildcatpoint SST Audio |
| 4 | * |
| 5 | * Copyright (C) 2013, Intel Corporation. All rights reserved. |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <linux/module.h> |
| 9 | #include <linux/platform_device.h> |
| 10 | #include <sound/core.h> |
| 11 | #include <sound/pcm.h> |
| 12 | #include <sound/soc.h> |
Jie Yang | c1e99c9 | 2014-10-30 21:16:23 +0800 | [diff] [blame] | 13 | #include <sound/jack.h> |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 14 | #include <sound/pcm_params.h> |
Pierre-Louis Bossart | 2d067b2 | 2019-01-25 14:34:57 -0600 | [diff] [blame] | 15 | #include <sound/soc-acpi.h> |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 16 | |
Jie Yang | e56c72d | 2015-04-02 15:37:02 +0800 | [diff] [blame] | 17 | #include "../common/sst-dsp.h" |
| 18 | #include "../haswell/sst-haswell-ipc.h" |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 19 | |
Jie Yang | e56c72d | 2015-04-02 15:37:02 +0800 | [diff] [blame] | 20 | #include "../../codecs/rt286.h" |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 21 | |
Jie Yang | c1e99c9 | 2014-10-30 21:16:23 +0800 | [diff] [blame] | 22 | static struct snd_soc_jack broadwell_headset; |
| 23 | /* Headset jack detection DAPM pins */ |
| 24 | static struct snd_soc_jack_pin broadwell_headset_pins[] = { |
| 25 | { |
| 26 | .pin = "Mic Jack", |
| 27 | .mask = SND_JACK_MICROPHONE, |
| 28 | }, |
| 29 | { |
| 30 | .pin = "Headphone Jack", |
| 31 | .mask = SND_JACK_HEADPHONE, |
| 32 | }, |
| 33 | }; |
| 34 | |
| 35 | static const struct snd_kcontrol_new broadwell_controls[] = { |
| 36 | SOC_DAPM_PIN_SWITCH("Speaker"), |
| 37 | SOC_DAPM_PIN_SWITCH("Headphone Jack"), |
| 38 | }; |
| 39 | |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 40 | static const struct snd_soc_dapm_widget broadwell_widgets[] = { |
Jie Yang | c1e99c9 | 2014-10-30 21:16:23 +0800 | [diff] [blame] | 41 | SND_SOC_DAPM_HP("Headphone Jack", NULL), |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 42 | SND_SOC_DAPM_SPK("Speaker", NULL), |
| 43 | SND_SOC_DAPM_MIC("Mic Jack", NULL), |
| 44 | SND_SOC_DAPM_MIC("DMIC1", NULL), |
| 45 | SND_SOC_DAPM_MIC("DMIC2", NULL), |
| 46 | SND_SOC_DAPM_LINE("Line Jack", NULL), |
| 47 | }; |
| 48 | |
| 49 | static const struct snd_soc_dapm_route broadwell_rt286_map[] = { |
| 50 | |
| 51 | /* speaker */ |
| 52 | {"Speaker", NULL, "SPOR"}, |
| 53 | {"Speaker", NULL, "SPOL"}, |
| 54 | |
| 55 | /* HP jack connectors - unknown if we have jack deteck */ |
Jie Yang | c1e99c9 | 2014-10-30 21:16:23 +0800 | [diff] [blame] | 56 | {"Headphone Jack", NULL, "HPO Pin"}, |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 57 | |
| 58 | /* other jacks */ |
| 59 | {"MIC1", NULL, "Mic Jack"}, |
| 60 | {"LINE1", NULL, "Line Jack"}, |
| 61 | |
| 62 | /* digital mics */ |
| 63 | {"DMIC1 Pin", NULL, "DMIC1"}, |
| 64 | {"DMIC2 Pin", NULL, "DMIC2"}, |
| 65 | |
| 66 | /* CODEC BE connections */ |
| 67 | {"SSP0 CODEC IN", NULL, "AIF1 Capture"}, |
| 68 | {"AIF1 Playback", NULL, "SSP0 CODEC OUT"}, |
| 69 | }; |
| 70 | |
Jie Yang | c1e99c9 | 2014-10-30 21:16:23 +0800 | [diff] [blame] | 71 | static int broadwell_rt286_codec_init(struct snd_soc_pcm_runtime *rtd) |
| 72 | { |
Kuninori Morimoto | 4510112 | 2018-01-29 04:36:54 +0000 | [diff] [blame] | 73 | struct snd_soc_component *component = rtd->codec_dai->component; |
Jie Yang | c1e99c9 | 2014-10-30 21:16:23 +0800 | [diff] [blame] | 74 | int ret = 0; |
Lars-Peter Clausen | 85c85e5 | 2015-03-04 10:33:21 +0100 | [diff] [blame] | 75 | ret = snd_soc_card_jack_new(rtd->card, "Headset", |
| 76 | SND_JACK_HEADSET | SND_JACK_BTN_0, &broadwell_headset, |
| 77 | broadwell_headset_pins, ARRAY_SIZE(broadwell_headset_pins)); |
Jie Yang | c1e99c9 | 2014-10-30 21:16:23 +0800 | [diff] [blame] | 78 | if (ret) |
| 79 | return ret; |
| 80 | |
Kuninori Morimoto | 4510112 | 2018-01-29 04:36:54 +0000 | [diff] [blame] | 81 | rt286_mic_detect(component, &broadwell_headset); |
Jie Yang | c1e99c9 | 2014-10-30 21:16:23 +0800 | [diff] [blame] | 82 | return 0; |
| 83 | } |
| 84 | |
| 85 | |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 86 | static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, |
| 87 | struct snd_pcm_hw_params *params) |
| 88 | { |
| 89 | struct snd_interval *rate = hw_param_interval(params, |
| 90 | SNDRV_PCM_HW_PARAM_RATE); |
| 91 | struct snd_interval *channels = hw_param_interval(params, |
| 92 | SNDRV_PCM_HW_PARAM_CHANNELS); |
| 93 | |
| 94 | /* The ADSP will covert the FE rate to 48k, stereo */ |
| 95 | rate->min = rate->max = 48000; |
| 96 | channels->min = channels->max = 2; |
| 97 | |
| 98 | /* set SSP0 to 16 bit */ |
Fang, Yang A | 369a9f5 | 2015-02-09 00:18:12 -0800 | [diff] [blame] | 99 | params_set_format(params, SNDRV_PCM_FORMAT_S16_LE); |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 100 | return 0; |
| 101 | } |
| 102 | |
| 103 | static int broadwell_rt286_hw_params(struct snd_pcm_substream *substream, |
| 104 | struct snd_pcm_hw_params *params) |
| 105 | { |
| 106 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
| 107 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
| 108 | int ret; |
| 109 | |
| 110 | ret = snd_soc_dai_set_sysclk(codec_dai, RT286_SCLK_S_PLL, 24000000, |
| 111 | SND_SOC_CLOCK_IN); |
| 112 | |
| 113 | if (ret < 0) { |
| 114 | dev_err(rtd->dev, "can't set codec sysclk configuration\n"); |
| 115 | return ret; |
| 116 | } |
| 117 | |
| 118 | return ret; |
| 119 | } |
| 120 | |
Julia Lawall | d5bc18c | 2016-10-15 16:55:45 +0200 | [diff] [blame] | 121 | static const struct snd_soc_ops broadwell_rt286_ops = { |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 122 | .hw_params = broadwell_rt286_hw_params, |
| 123 | }; |
| 124 | |
Liam Girdwood | f35bf70 | 2019-04-12 11:09:03 -0500 | [diff] [blame] | 125 | #if !IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL) |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 126 | static int broadwell_rtd_init(struct snd_soc_pcm_runtime *rtd) |
| 127 | { |
Kuninori Morimoto | 2ee178d | 2018-01-29 02:42:21 +0000 | [diff] [blame] | 128 | struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); |
| 129 | struct sst_pdata *pdata = dev_get_platdata(component->dev); |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 130 | struct sst_hsw *broadwell = pdata->dsp; |
| 131 | int ret; |
| 132 | |
| 133 | /* Set ADSP SSP port settings */ |
| 134 | ret = sst_hsw_device_set_config(broadwell, SST_HSW_DEVICE_SSP_0, |
| 135 | SST_HSW_DEVICE_MCLK_FREQ_24_MHZ, |
| 136 | SST_HSW_DEVICE_CLOCK_MASTER, 9); |
| 137 | if (ret < 0) { |
| 138 | dev_err(rtd->dev, "error: failed to set device config\n"); |
| 139 | return ret; |
| 140 | } |
| 141 | |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 142 | return 0; |
| 143 | } |
Liam Girdwood | f35bf70 | 2019-04-12 11:09:03 -0500 | [diff] [blame] | 144 | #endif |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 145 | |
Kuninori Morimoto | 4c3db47 | 2019-06-06 13:19:40 +0900 | [diff] [blame] | 146 | SND_SOC_DAILINK_DEF(system, |
| 147 | DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); |
| 148 | |
| 149 | SND_SOC_DAILINK_DEF(offload0, |
| 150 | DAILINK_COMP_ARRAY(COMP_CPU("Offload0 Pin"))); |
| 151 | |
| 152 | SND_SOC_DAILINK_DEF(offload1, |
| 153 | DAILINK_COMP_ARRAY(COMP_CPU("Offload1 Pin"))); |
| 154 | |
| 155 | SND_SOC_DAILINK_DEF(loopback, |
| 156 | DAILINK_COMP_ARRAY(COMP_CPU("Loopback Pin"))); |
| 157 | |
| 158 | SND_SOC_DAILINK_DEF(dummy, |
| 159 | DAILINK_COMP_ARRAY(COMP_DUMMY())); |
| 160 | |
| 161 | SND_SOC_DAILINK_DEF(platform, |
| 162 | DAILINK_COMP_ARRAY(COMP_PLATFORM("haswell-pcm-audio"))); |
| 163 | |
| 164 | SND_SOC_DAILINK_DEF(codec, |
| 165 | DAILINK_COMP_ARRAY(COMP_CODEC("i2c-INT343A:00", "rt286-aif1"))); |
| 166 | |
Pan Xiuli | 64df6af | 2020-01-10 17:57:46 -0600 | [diff] [blame] | 167 | #if IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL) |
| 168 | SND_SOC_DAILINK_DEF(ssp0_port, |
| 169 | DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port"))); |
| 170 | #else |
| 171 | SND_SOC_DAILINK_DEF(ssp0_port, |
| 172 | DAILINK_COMP_ARRAY(COMP_DUMMY())); |
| 173 | #endif |
| 174 | |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 175 | /* broadwell digital audio interface glue - connects codec <--> CPU */ |
| 176 | static struct snd_soc_dai_link broadwell_rt286_dais[] = { |
| 177 | /* Front End DAI links */ |
| 178 | { |
| 179 | .name = "System PCM", |
Jie Yang | 7bb73cb | 2014-11-28 21:52:11 +0800 | [diff] [blame] | 180 | .stream_name = "System Playback/Capture", |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 181 | .dynamic = 1, |
Liam Girdwood | f35bf70 | 2019-04-12 11:09:03 -0500 | [diff] [blame] | 182 | #if !IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL) |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 183 | .init = broadwell_rtd_init, |
Liam Girdwood | f35bf70 | 2019-04-12 11:09:03 -0500 | [diff] [blame] | 184 | #endif |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 185 | .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, |
| 186 | .dpcm_playback = 1, |
Jie Yang | 7bb73cb | 2014-11-28 21:52:11 +0800 | [diff] [blame] | 187 | .dpcm_capture = 1, |
Kuninori Morimoto | 4c3db47 | 2019-06-06 13:19:40 +0900 | [diff] [blame] | 188 | SND_SOC_DAILINK_REG(system, dummy, platform), |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 189 | }, |
| 190 | { |
| 191 | .name = "Offload0", |
| 192 | .stream_name = "Offload0 Playback", |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 193 | .dynamic = 1, |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 194 | .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, |
| 195 | .dpcm_playback = 1, |
Kuninori Morimoto | 4c3db47 | 2019-06-06 13:19:40 +0900 | [diff] [blame] | 196 | SND_SOC_DAILINK_REG(offload0, dummy, platform), |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 197 | }, |
| 198 | { |
| 199 | .name = "Offload1", |
| 200 | .stream_name = "Offload1 Playback", |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 201 | .dynamic = 1, |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 202 | .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, |
| 203 | .dpcm_playback = 1, |
Kuninori Morimoto | 4c3db47 | 2019-06-06 13:19:40 +0900 | [diff] [blame] | 204 | SND_SOC_DAILINK_REG(offload1, dummy, platform), |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 205 | }, |
| 206 | { |
| 207 | .name = "Loopback PCM", |
| 208 | .stream_name = "Loopback", |
Rander Wang | 906a9ab | 2018-12-18 16:24:54 +0800 | [diff] [blame] | 209 | .dynamic = 1, |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 210 | .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, |
| 211 | .dpcm_capture = 1, |
Kuninori Morimoto | 4c3db47 | 2019-06-06 13:19:40 +0900 | [diff] [blame] | 212 | SND_SOC_DAILINK_REG(loopback, dummy, platform), |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 213 | }, |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 214 | /* Back End DAI links */ |
| 215 | { |
| 216 | /* SSP0 - Codec */ |
| 217 | .name = "Codec", |
Mengdong Lin | 2f0ad49 | 2016-04-19 13:12:35 +0800 | [diff] [blame] | 218 | .id = 0, |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 219 | .no_pcm = 1, |
Jie Yang | c1e99c9 | 2014-10-30 21:16:23 +0800 | [diff] [blame] | 220 | .init = broadwell_rt286_codec_init, |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 221 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | |
| 222 | SND_SOC_DAIFMT_CBS_CFS, |
| 223 | .ignore_suspend = 1, |
| 224 | .ignore_pmdown_time = 1, |
| 225 | .be_hw_params_fixup = broadwell_ssp0_fixup, |
| 226 | .ops = &broadwell_rt286_ops, |
| 227 | .dpcm_playback = 1, |
| 228 | .dpcm_capture = 1, |
Pan Xiuli | 64df6af | 2020-01-10 17:57:46 -0600 | [diff] [blame] | 229 | SND_SOC_DAILINK_REG(ssp0_port, codec, platform), |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 230 | }, |
| 231 | }; |
| 232 | |
Jie Yang | 1a5ab21c | 2015-02-27 12:54:29 +0800 | [diff] [blame] | 233 | static int broadwell_suspend(struct snd_soc_card *card){ |
Kuninori Morimoto | d9fc406 | 2016-11-30 06:22:36 +0000 | [diff] [blame] | 234 | struct snd_soc_component *component; |
Jie Yang | 1a5ab21c | 2015-02-27 12:54:29 +0800 | [diff] [blame] | 235 | |
Kuninori Morimoto | f70f18f7 | 2018-09-18 01:29:55 +0000 | [diff] [blame] | 236 | for_each_card_components(card, component) { |
Kuninori Morimoto | d9fc406 | 2016-11-30 06:22:36 +0000 | [diff] [blame] | 237 | if (!strcmp(component->name, "i2c-INT343A:00")) { |
Kuninori Morimoto | d9fc406 | 2016-11-30 06:22:36 +0000 | [diff] [blame] | 238 | |
Kuninori Morimoto | 4510112 | 2018-01-29 04:36:54 +0000 | [diff] [blame] | 239 | dev_dbg(component->dev, "disabling jack detect before going to suspend.\n"); |
| 240 | rt286_mic_detect(component, NULL); |
Jie Yang | 1a5ab21c | 2015-02-27 12:54:29 +0800 | [diff] [blame] | 241 | break; |
| 242 | } |
| 243 | } |
| 244 | return 0; |
| 245 | } |
| 246 | |
| 247 | static int broadwell_resume(struct snd_soc_card *card){ |
Kuninori Morimoto | d9fc406 | 2016-11-30 06:22:36 +0000 | [diff] [blame] | 248 | struct snd_soc_component *component; |
Jie Yang | 1a5ab21c | 2015-02-27 12:54:29 +0800 | [diff] [blame] | 249 | |
Kuninori Morimoto | f70f18f7 | 2018-09-18 01:29:55 +0000 | [diff] [blame] | 250 | for_each_card_components(card, component) { |
Kuninori Morimoto | d9fc406 | 2016-11-30 06:22:36 +0000 | [diff] [blame] | 251 | if (!strcmp(component->name, "i2c-INT343A:00")) { |
Kuninori Morimoto | d9fc406 | 2016-11-30 06:22:36 +0000 | [diff] [blame] | 252 | |
Kuninori Morimoto | 4510112 | 2018-01-29 04:36:54 +0000 | [diff] [blame] | 253 | dev_dbg(component->dev, "enabling jack detect for resume.\n"); |
| 254 | rt286_mic_detect(component, &broadwell_headset); |
Jie Yang | 1a5ab21c | 2015-02-27 12:54:29 +0800 | [diff] [blame] | 255 | break; |
| 256 | } |
| 257 | } |
| 258 | return 0; |
| 259 | } |
| 260 | |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 261 | /* broadwell audio machine driver for WPT + RT286S */ |
| 262 | static struct snd_soc_card broadwell_rt286 = { |
| 263 | .name = "broadwell-rt286", |
| 264 | .owner = THIS_MODULE, |
| 265 | .dai_link = broadwell_rt286_dais, |
| 266 | .num_links = ARRAY_SIZE(broadwell_rt286_dais), |
Jie Yang | c1e99c9 | 2014-10-30 21:16:23 +0800 | [diff] [blame] | 267 | .controls = broadwell_controls, |
| 268 | .num_controls = ARRAY_SIZE(broadwell_controls), |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 269 | .dapm_widgets = broadwell_widgets, |
| 270 | .num_dapm_widgets = ARRAY_SIZE(broadwell_widgets), |
| 271 | .dapm_routes = broadwell_rt286_map, |
| 272 | .num_dapm_routes = ARRAY_SIZE(broadwell_rt286_map), |
| 273 | .fully_routed = true, |
Jie Yang | 1a5ab21c | 2015-02-27 12:54:29 +0800 | [diff] [blame] | 274 | .suspend_pre = broadwell_suspend, |
| 275 | .resume_post = broadwell_resume, |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 276 | }; |
| 277 | |
| 278 | static int broadwell_audio_probe(struct platform_device *pdev) |
| 279 | { |
Pierre-Louis Bossart | 2d067b2 | 2019-01-25 14:34:57 -0600 | [diff] [blame] | 280 | struct snd_soc_acpi_mach *mach; |
Pierre-Louis Bossart | 2d067b2 | 2019-01-25 14:34:57 -0600 | [diff] [blame] | 281 | int ret; |
| 282 | |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 283 | broadwell_rt286.dev = &pdev->dev; |
Pierre-Louis Bossart | 2d067b2 | 2019-01-25 14:34:57 -0600 | [diff] [blame] | 284 | |
| 285 | /* override plaform name, if required */ |
| 286 | mach = (&pdev->dev)->platform_data; |
Pierre-Louis Bossart | 2d067b2 | 2019-01-25 14:34:57 -0600 | [diff] [blame] | 287 | ret = snd_soc_fixup_dai_links_platform_name(&broadwell_rt286, |
Cezary Rojewski | 54d037d | 2019-08-22 13:36:16 +0200 | [diff] [blame] | 288 | mach->mach_params.platform); |
Pierre-Louis Bossart | 2d067b2 | 2019-01-25 14:34:57 -0600 | [diff] [blame] | 289 | if (ret) |
| 290 | return ret; |
| 291 | |
Axel Lin | 9ed7476 | 2015-09-02 12:01:27 +0800 | [diff] [blame] | 292 | return devm_snd_soc_register_card(&pdev->dev, &broadwell_rt286); |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | static struct platform_driver broadwell_audio = { |
| 296 | .probe = broadwell_audio_probe, |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 297 | .driver = { |
| 298 | .name = "broadwell-audio", |
Liam Girdwood | afdb74f | 2014-07-14 10:35:40 +0800 | [diff] [blame] | 299 | }, |
| 300 | }; |
| 301 | |
| 302 | module_platform_driver(broadwell_audio) |
| 303 | |
| 304 | /* Module information */ |
| 305 | MODULE_AUTHOR("Liam Girdwood, Xingchao Wang"); |
| 306 | MODULE_DESCRIPTION("Intel SST Audio for WPT/Broadwell"); |
| 307 | MODULE_LICENSE("GPL v2"); |
| 308 | MODULE_ALIAS("platform:broadwell-audio"); |