Lines Matching +full:spk +full:- +full:shutdown
1 // SPDX-License-Identifier: GPL-2.0-only
6 // soc_sdw_maxim - Helpers to handle maxim codecs
13 #include <sound/soc-acpi.h>
14 #include <sound/soc-dapm.h>
22 { "Left Spk", NULL, "Left BE_OUT" },
23 { "Right Spk", NULL, "Right BE_OUT" },
28 struct snd_soc_card *card = rtd->card; in asoc_sdw_maxim_spk_rtd_init()
31 card->components = devm_kasprintf(card->dev, GFP_KERNEL, in asoc_sdw_maxim_spk_rtd_init()
32 "%s spk:mx%04x", in asoc_sdw_maxim_spk_rtd_init()
33 card->components, maxim_part_id); in asoc_sdw_maxim_spk_rtd_init()
34 if (!card->components) in asoc_sdw_maxim_spk_rtd_init()
35 return -ENOMEM; in asoc_sdw_maxim_spk_rtd_init()
37 dev_dbg(card->dev, "soundwire maxim card components assigned : %s\n", in asoc_sdw_maxim_spk_rtd_init()
38 card->components); in asoc_sdw_maxim_spk_rtd_init()
40 ret = snd_soc_dapm_add_routes(&card->dapm, max_98373_dapm_routes, 2); in asoc_sdw_maxim_spk_rtd_init()
42 dev_err(rtd->dev, "failed to add first SPK map: %d\n", ret); in asoc_sdw_maxim_spk_rtd_init()
56 /* set spk pin by playback only */ in asoc_sdw_mx8373_enable_spk_pin()
57 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in asoc_sdw_mx8373_enable_spk_pin()
63 snd_soc_component_get_dapm(cpu_dai->component); in asoc_sdw_mx8373_enable_spk_pin()
66 snprintf(pin_name, ARRAY_SIZE(pin_name), "%s Spk", in asoc_sdw_mx8373_enable_spk_pin()
67 codec_dai->component->name_prefix); in asoc_sdw_mx8373_enable_spk_pin()
111 .shutdown = asoc_sdw_shutdown,
116 struct snd_soc_dapm_context *dapm = &card->dapm; in asoc_sdw_mx8373_sdw_late_probe()
118 /* Disable Left and Right Spk pin after boot */ in asoc_sdw_mx8373_sdw_late_probe()
119 snd_soc_dapm_disable_pin(dapm, "Left Spk"); in asoc_sdw_mx8373_sdw_late_probe()
120 snd_soc_dapm_disable_pin(dapm, "Right Spk"); in asoc_sdw_mx8373_sdw_late_probe()
129 info->amp_num++; in asoc_sdw_maxim_init()
131 maxim_part_id = info->part_id; in asoc_sdw_maxim_init()
139 info->codec_card_late_probe = asoc_sdw_mx8373_sdw_late_probe; in asoc_sdw_maxim_init()
140 dai_links->ops = &max_98373_sdw_ops; in asoc_sdw_maxim_init()
143 dev_err(card->dev, "Invalid maxim_part_id %#x\n", maxim_part_id); in asoc_sdw_maxim_init()
144 return -EINVAL; in asoc_sdw_maxim_init()