Lines Matching +full:mic2 +full:- +full:src

1 // SPDX-License-Identifier: GPL-2.0-only
5 * sof_sdw_rt711 - Helpers to handle RT711 from generic machine driver
15 #include <sound/soc-acpi.h>
16 #include <sound/soc-dapm.h>
32 props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_RT711_JDSRC(sof_sdw_quirk)); in rt711_add_codec_device_props()
53 { "rt711 MIC2", NULL, "Headset Mic" },
74 struct snd_soc_card *card = rtd->card; in rt711_rtd_init()
77 struct snd_soc_component *component = codec_dai->component; in rt711_rtd_init()
81 card->components = devm_kasprintf(card->dev, GFP_KERNEL, in rt711_rtd_init()
83 card->components); in rt711_rtd_init()
84 if (!card->components) in rt711_rtd_init()
85 return -ENOMEM; in rt711_rtd_init()
90 dev_err(card->dev, "rt711 controls addition failed: %d\n", ret); in rt711_rtd_init()
94 ret = snd_soc_dapm_new_controls(&card->dapm, rt711_widgets, in rt711_rtd_init()
97 dev_err(card->dev, "rt711 widgets addition failed: %d\n", ret); in rt711_rtd_init()
101 ret = snd_soc_dapm_add_routes(&card->dapm, rt711_map, in rt711_rtd_init()
105 dev_err(card->dev, "rt711 map addition failed: %d\n", ret); in rt711_rtd_init()
109 ret = snd_soc_card_jack_new_pins(rtd->card, "Headset Jack", in rt711_rtd_init()
113 &ctx->sdw_headset, in rt711_rtd_init()
117 dev_err(rtd->card->dev, "Headset Jack creation failed: %d\n", in rt711_rtd_init()
122 jack = &ctx->sdw_headset; in rt711_rtd_init()
124 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in rt711_rtd_init()
125 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in rt711_rtd_init()
126 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in rt711_rtd_init()
127 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in rt711_rtd_init()
132 dev_err(rtd->card->dev, "Headset Jack call-back failed: %d\n", in rt711_rtd_init()
142 if (!ctx->headset_codec_dev) in sof_sdw_rt711_exit()
145 device_remove_software_node(ctx->headset_codec_dev); in sof_sdw_rt711_exit()
146 put_device(ctx->headset_codec_dev); in sof_sdw_rt711_exit()
168 sdw_dev = bus_find_device_by_name(&sdw_bus_type, NULL, dai_links->codecs[0].name); in sof_sdw_rt711_init()
170 return -EPROBE_DEFER; in sof_sdw_rt711_init()
177 ctx->headset_codec_dev = sdw_dev; in sof_sdw_rt711_init()
179 dai_links->init = rt711_rtd_init; in sof_sdw_rt711_init()