Lines Matching +full:fe +full:- +full:dai +full:- +full:link

1 // SPDX-License-Identifier: GPL-2.0-only
3 * bytcht-da7213.c - ASoc Machine driver for Intel Baytrail and
4 * Cherrytrail-based platforms, with Dialog DA7213 codec
7 * Author: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
21 #include <sound/soc-acpi.h>
23 #include "../atom/sst-atom-controls.h"
46 /* Assume Mic1 is linked to Headset and Mic2 to on-board mic */
50 /* SOC-codec link */
69 /* The DSP will convert the FE rate to 48k, stereo, 24bits */ in codec_fixup()
70 rate->min = rate->max = 48000; in codec_fixup()
71 channels->min = channels->max = 2; in codec_fixup()
73 /* set SSP2 to 24-bit */ in codec_fixup()
78 * with explicit setting to I2S 2ch 24-bit. The word length is set with in codec_fixup()
86 dev_err(rtd->dev, "can't set format to I2S, err %d\n", ret); in codec_fixup()
92 dev_err(rtd->dev, "can't set I2S config, err %d\n", ret); in codec_fixup()
101 return snd_pcm_hw_constraint_single(substream->runtime, in aif1_startup()
115 dev_err(codec_dai->dev, "can't set codec sysclk configuration\n"); in aif1_hw_params()
120 dev_err(codec_dai->dev, "failed to start PLL: %d\n", ret); in aif1_hw_params()
121 return -EIO; in aif1_hw_params()
136 dev_err(codec_dai->dev, "failed to stop PLL: %d\n", ret); in aif1_hw_free()
137 return -EIO; in aif1_hw_free()
157 DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai")));
160 DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai")));
163 DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port")));
165 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7213:00",
166 "da7213-hifi")));
169 DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform")));
181 .name = "Deep-Buffer Audio Port",
182 .stream_name = "Deep-Buffer Audio",
189 /* CODEC<->CODEC link */
192 .name = "SSP2-Codec",
204 #define SOF_CARD_NAME "bytcht da7213" /* card name will be 'sof-bytcht da7213' */
207 #define CARD_NAME "bytcht-da7213"
238 mach = pdev->dev.platform_data; in bytcht_da7213_probe()
240 card->dev = &pdev->dev; in bytcht_da7213_probe()
242 /* fix index of codec dai */ in bytcht_da7213_probe()
245 !strcmp(dailink[i].codecs->name, "i2c-DLGS7213:00")) { in bytcht_da7213_probe()
252 adev = acpi_dev_get_first_match_dev(mach->id, NULL, -1); in bytcht_da7213_probe()
255 "i2c-%s", acpi_dev_name(adev)); in bytcht_da7213_probe()
256 dailink[dai_index].codecs->name = codec_name; in bytcht_da7213_probe()
258 dev_err(&pdev->dev, "Error cannot find '%s' dev\n", mach->id); in bytcht_da7213_probe()
259 return -ENOENT; in bytcht_da7213_probe()
265 platform_name = mach->mach_params.platform; in bytcht_da7213_probe()
271 sof_parent = snd_soc_acpi_sof_parent(&pdev->dev); in bytcht_da7213_probe()
284 pdev->dev.driver->pm = &snd_soc_pm_ops; in bytcht_da7213_probe()
286 ret_val = devm_snd_soc_register_card(&pdev->dev, card); in bytcht_da7213_probe()
288 dev_err(&pdev->dev, in bytcht_da7213_probe()
305 MODULE_AUTHOR("Pierre-Louis Bossart");