Lines Matching +full:feedback +full:- +full:pin
1 // SPDX-License-Identifier: GPL-2.0-only
14 #include <sound/soc-acpi.h>
16 #include "../../codecs/da7219-aad.h"
19 #define DIALOG_CODEC_DAI "da7219-hifi"
20 #define MAX98373_CODEC_DAI "max98373-aif1"
21 #define MAXIM_DEV0_NAME "i2c-MX98373:00"
22 #define MAXIM_DEV1_NAME "i2c-MX98373:01"
39 struct snd_soc_dapm_context *dapm = w->dapm; in platform_clock_control()
40 struct snd_soc_card *card = dapm->card; in platform_clock_control()
46 dev_err(card->dev, "Codec dai not found; Unable to set/unset codec pll\n"); in platform_clock_control()
47 return -EIO; in platform_clock_control()
54 dev_err(card->dev, "failed to stop PLL: %d\n", ret); in platform_clock_control()
59 dev_err(card->dev, "failed to start PLL: %d\n", ret); in platform_clock_control()
140 .pin = "Headphone Jack",
144 .pin = "Headset Mic",
154 struct snd_soc_component *component = codec_dai->component; in da7219_codec_init()
162 dev_err(rtd->dev, "can't set codec sysclk configuration\n"); in da7219_codec_init()
170 ret = snd_soc_card_jack_new_pins(rtd->card, "Headset Jack", in da7219_codec_init()
178 dev_err(rtd->dev, "Headset Jack creation failed: %d\n", ret); in da7219_codec_init()
183 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in da7219_codec_init()
184 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP); in da7219_codec_init()
185 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN); in da7219_codec_init()
186 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND); in da7219_codec_init()
198 for (j = 0; j < runtime->dai_link->num_codecs; j++) { in ssp1_hw_params()
201 if (!strcmp(codec_dai->component->name, MAXIM_DEV0_NAME)) { in ssp1_hw_params()
205 dev_err(runtime->dev, "DEV0 TDM slot err:%d\n", ret); in ssp1_hw_params()
209 if (!strcmp(codec_dai->component->name, MAXIM_DEV1_NAME)) { in ssp1_hw_params()
213 dev_err(runtime->dev, "DEV1 TDM slot err:%d\n", ret); in ssp1_hw_params()
239 struct card_private *ctx = snd_soc_card_get_drvdata(rtd->card); in hdmi_init()
243 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in hdmi_init()
245 return -ENOMEM; in hdmi_init()
247 pcm->device = dai->id; in hdmi_init()
248 pcm->codec_dai = dai; in hdmi_init()
250 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in hdmi_init()
258 struct snd_soc_acpi_mach *mach = (card->dev)->platform_data; in card_late_probe()
261 if (mach->mach_params.common_hdmi_codec_drv) { in card_late_probe()
262 pcm = list_first_entry(&ctx->hdmi_pcm_list, struct hdmi_pcm, in card_late_probe()
265 pcm->codec_dai->component); in card_late_probe()
268 return -EINVAL; in card_late_probe()
272 DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin")));
274 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7219:00", DIALOG_CODEC_DAI)));
277 DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin")));
287 DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin")));
289 DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
292 DAILINK_COMP_ARRAY(COMP_CPU("DMIC16k Pin")));
295 DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin")));
297 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1")));
300 DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin")));
302 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2")));
305 DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin")));
307 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3")));
315 .name = "SSP1-Codec",
320 .dpcm_capture = 1, /* IV feedback */
325 .name = "SSP0-Codec",
415 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in audio_probe()
417 return -ENOMEM; in audio_probe()
420 if (!strcmp(pdev->name, "sof_da7219_mx98360a")) { in audio_probe()
422 .name = "SSP1-Codec", in audio_probe()
430 INIT_LIST_HEAD(&ctx->hdmi_pcm_list); in audio_probe()
431 card = (struct snd_soc_card *)pdev->id_entry->driver_data; in audio_probe()
432 card->dev = &pdev->dev; in audio_probe()
434 mach = pdev->dev.platform_data; in audio_probe()
436 mach->mach_params.platform); in audio_probe()
442 return devm_snd_soc_register_card(&pdev->dev, card); in audio_probe()