Lines Matching +full:jd +full:- +full:src
1 // SPDX-License-Identifier: GPL-2.0-only
7 * soc_sdw_rt711 - Helpers to handle RT711 from generic machine driver
17 #include <sound/soc-acpi.h>
18 #include <sound/soc-dapm.h>
34 props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOC_SDW_JACK_JDSRC(quirk)); in rt711_add_codec_device_props()
66 struct snd_soc_card *card = rtd->card; in asoc_sdw_rt711_rtd_init()
72 component = dai->component; in asoc_sdw_rt711_rtd_init()
73 card->components = devm_kasprintf(card->dev, GFP_KERNEL, in asoc_sdw_rt711_rtd_init()
75 card->components); in asoc_sdw_rt711_rtd_init()
76 if (!card->components) in asoc_sdw_rt711_rtd_init()
77 return -ENOMEM; in asoc_sdw_rt711_rtd_init()
79 ret = snd_soc_dapm_add_routes(&card->dapm, rt711_map, in asoc_sdw_rt711_rtd_init()
83 dev_err(card->dev, "rt711 map addition failed: %d\n", ret); in asoc_sdw_rt711_rtd_init()
87 ret = snd_soc_card_jack_new_pins(rtd->card, "Headset Jack", in asoc_sdw_rt711_rtd_init()
91 &ctx->sdw_headset, in asoc_sdw_rt711_rtd_init()
95 dev_err(rtd->card->dev, "Headset Jack creation failed: %d\n", in asoc_sdw_rt711_rtd_init()
100 jack = &ctx->sdw_headset; in asoc_sdw_rt711_rtd_init()
102 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in asoc_sdw_rt711_rtd_init()
103 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in asoc_sdw_rt711_rtd_init()
104 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in asoc_sdw_rt711_rtd_init()
105 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in asoc_sdw_rt711_rtd_init()
110 dev_err(rtd->card->dev, "Headset Jack call-back failed: %d\n", in asoc_sdw_rt711_rtd_init()
121 if (!ctx->headset_codec_dev) in asoc_sdw_rt711_exit()
124 device_remove_software_node(ctx->headset_codec_dev); in asoc_sdw_rt711_exit()
125 put_device(ctx->headset_codec_dev); in asoc_sdw_rt711_exit()
147 sdw_dev = bus_find_device_by_name(&sdw_bus_type, NULL, dai_links->codecs[0].name); in asoc_sdw_rt711_init()
149 return -EPROBE_DEFER; in asoc_sdw_rt711_init()
151 ret = rt711_add_codec_device_props(sdw_dev, ctx->mc_quirk); in asoc_sdw_rt711_init()
156 ctx->headset_codec_dev = sdw_dev; in asoc_sdw_rt711_init()