Lines Matching +full:spk +full:- +full:shutdown

1 // SPDX-License-Identifier: GPL-2.0-only
4 // sof_sdw_max98373 - Helpers to handle 2x MAX98373
11 #include <sound/soc-acpi.h>
12 #include <sound/soc-dapm.h>
17 SND_SOC_DAPM_SPK("Left Spk", NULL),
18 SND_SOC_DAPM_SPK("Right Spk", NULL),
22 SOC_DAPM_PIN_SWITCH("Left Spk"),
23 SOC_DAPM_PIN_SWITCH("Right Spk"),
28 struct snd_soc_card *card = rtd->card; in spk_init()
31 card->components = devm_kasprintf(card->dev, GFP_KERNEL, in spk_init()
32 "%s spk:mx8373", in spk_init()
33 card->components); in spk_init()
34 if (!card->components) in spk_init()
35 return -ENOMEM; in spk_init()
40 dev_err(card->dev, "mx8373 ctrls addition failed: %d\n", ret); in spk_init()
44 ret = snd_soc_dapm_new_controls(&card->dapm, mx8373_widgets, in spk_init()
47 dev_err(card->dev, "mx8373 widgets addition failed: %d\n", ret); in spk_init()
51 ret = snd_soc_dapm_add_routes(&card->dapm, max_98373_dapm_routes, 2); in spk_init()
53 dev_err(rtd->dev, "failed to add first SPK map: %d\n", ret); in spk_init()
66 /* set spk pin by playback only */ in mx8373_enable_spk_pin()
67 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in mx8373_enable_spk_pin()
73 snd_soc_component_get_dapm(cpu_dai->component); in mx8373_enable_spk_pin()
76 snprintf(pin_name, ARRAY_SIZE(pin_name), "%s Spk", in mx8373_enable_spk_pin()
77 codec_dai->component->name_prefix); in mx8373_enable_spk_pin()
120 .shutdown = sdw_shutdown,
129 info->amp_num++; in sof_sdw_mx8373_init()
130 if (info->amp_num == 2) in sof_sdw_mx8373_init()
131 dai_links->init = spk_init; in sof_sdw_mx8373_init()
133 info->late_probe = true; in sof_sdw_mx8373_init()
135 dai_links->ops = &max_98373_sdw_ops; in sof_sdw_mx8373_init()
142 struct snd_soc_dapm_context *dapm = &card->dapm; in sof_sdw_mx8373_late_probe()
144 /* Disable Left and Right Spk pin after boot */ in sof_sdw_mx8373_late_probe()
145 snd_soc_dapm_disable_pin(dapm, "Left Spk"); in sof_sdw_mx8373_late_probe()
146 snd_soc_dapm_disable_pin(dapm, "Right Spk"); in sof_sdw_mx8373_late_probe()