/kernel/linux/linux-5.10/sound/core/ |
D | jack.c | 35 struct snd_jack *jack = device->device_data; in snd_jack_dev_disconnect() local 37 mutex_lock(&jack->input_dev_lock); in snd_jack_dev_disconnect() 38 if (!jack->input_dev) { in snd_jack_dev_disconnect() 39 mutex_unlock(&jack->input_dev_lock); in snd_jack_dev_disconnect() 45 if (jack->registered) in snd_jack_dev_disconnect() 46 input_unregister_device(jack->input_dev); in snd_jack_dev_disconnect() 48 input_free_device(jack->input_dev); in snd_jack_dev_disconnect() 49 jack->input_dev = NULL; in snd_jack_dev_disconnect() 50 mutex_unlock(&jack->input_dev_lock); in snd_jack_dev_disconnect() 57 struct snd_jack *jack = device->device_data; in snd_jack_dev_free() local [all …]
|
/kernel/linux/linux-5.10/sound/pci/hda/ |
D | hda_jack.c | 73 struct hda_jack_tbl *jack = codec->jacktbl.list; in snd_hda_jack_tbl_get_mst() local 76 if (!nid || !jack) in snd_hda_jack_tbl_get_mst() 78 for (i = 0; i < codec->jacktbl.used; i++, jack++) in snd_hda_jack_tbl_get_mst() 79 if (jack->nid == nid && jack->dev_id == dev_id) in snd_hda_jack_tbl_get_mst() 80 return jack; in snd_hda_jack_tbl_get_mst() 95 struct hda_jack_tbl *jack = codec->jacktbl.list; in snd_hda_jack_tbl_get_from_tag() local 98 if (!tag || !jack) in snd_hda_jack_tbl_get_from_tag() 100 for (i = 0; i < codec->jacktbl.used; i++, jack++) in snd_hda_jack_tbl_get_from_tag() 101 if (jack->tag == tag && jack->dev_id == dev_id) in snd_hda_jack_tbl_get_from_tag() 102 return jack; in snd_hda_jack_tbl_get_from_tag() [all …]
|
/kernel/linux/linux-5.10/sound/soc/ |
D | soc-jack.c | 22 struct snd_soc_jack *jack; member 40 void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) in snd_soc_jack_report() argument 47 if (!jack) in snd_soc_jack_report() 49 trace_snd_soc_jack_report(jack, mask, status); in snd_soc_jack_report() 51 dapm = &jack->card->dapm; in snd_soc_jack_report() 53 mutex_lock(&jack->mutex); in snd_soc_jack_report() 55 jack->status &= ~mask; in snd_soc_jack_report() 56 jack->status |= status & mask; in snd_soc_jack_report() 58 trace_snd_soc_jack_notify(jack, status); in snd_soc_jack_report() 60 list_for_each_entry(pin, &jack->pins, list) { in snd_soc_jack_report() [all …]
|
D | soc-card.c | 61 struct snd_soc_jack *jack, in snd_soc_card_jack_new() argument 66 mutex_init(&jack->mutex); in snd_soc_card_jack_new() 67 jack->card = card; in snd_soc_card_jack_new() 68 INIT_LIST_HEAD(&jack->pins); in snd_soc_card_jack_new() 69 INIT_LIST_HEAD(&jack->jack_zones); in snd_soc_card_jack_new() 70 BLOCKING_INIT_NOTIFIER_HEAD(&jack->notifier); in snd_soc_card_jack_new() 72 ret = snd_jack_new(card->snd_card, id, type, &jack->jack, false, false); in snd_soc_card_jack_new() 77 ret = snd_soc_jack_add_pins(jack, num_pins, pins); in snd_soc_card_jack_new()
|
/kernel/linux/linux-5.10/Documentation/sound/soc/ |
D | jack.rst | 2 ASoC jack detection 6 the kernel side of which can be seen in include/sound/jack.h. ASoC 9 - It allows more than one jack detection method to work together on one 10 user visible jack. In embedded systems it is common for multiple 11 to be present on a single jack but handled by separate bits of 15 automatically based on the detected jack status (eg, turning off the 19 together: the jack itself represented by a struct snd_soc_jack, sets of 21 code providing jack reporting mechanisms. 23 For example, a system may have a stereo headset jack with two reporting 27 headphone when the headphone jack status changes. [all …]
|
/kernel/linux/linux-5.10/Documentation/sound/designs/ |
D | jack-controls.rst | 13 The old ALSA jack code only created input devices for each registered 14 jack. These jack input devices are not readable by userspace devices 17 The new jack code creates embedded jack kcontrols for each jack that 21 intelligently based on jack insertion or removal events. 26 Each jack will have a kcontrol list, so that we can create a kcontrol 27 and attach it to the jack, at jack creation stage. We can also add a 28 kcontrol to an existing jack, at anytime when required. 32 How to use jack kcontrols 39 if true, create a kcontrol and add it to the jack list. 44 jack and set initial_kctl to true to create an initial kcontrol with [all …]
|
/kernel/linux/linux-5.10/include/sound/ |
D | jack.h | 78 struct snd_jack **jack, bool initial_kctl, bool phantom_jack); 79 int snd_jack_add_new_kctl(struct snd_jack *jack, const char * name, int mask); 81 void snd_jack_set_parent(struct snd_jack *jack, struct device *parent); 82 int snd_jack_set_key(struct snd_jack *jack, enum snd_jack_types type, 85 void snd_jack_report(struct snd_jack *jack, int status); 89 struct snd_jack **jack, bool initial_kctl, bool phantom_jack) in snd_jack_new() argument 94 static inline int snd_jack_add_new_kctl(struct snd_jack *jack, const char * name, int mask) in snd_jack_add_new_kctl() argument 99 static inline void snd_jack_report(struct snd_jack *jack, int status) in snd_jack_report() argument 106 static inline void snd_jack_set_parent(struct snd_jack *jack, in snd_jack_set_parent() argument 111 static inline int snd_jack_set_key(struct snd_jack *jack, in snd_jack_set_key() argument
|
/kernel/linux/linux-5.10/sound/soc/intel/boards/ |
D | sof_sdw_rt5682.c | 54 struct snd_soc_jack *jack; in rt5682_rtd_init() local 98 jack = &ctx->sdw_headset; in rt5682_rtd_init() 100 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in rt5682_rtd_init() 101 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in rt5682_rtd_init() 102 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in rt5682_rtd_init() 103 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in rt5682_rtd_init() 105 ret = snd_soc_component_set_jack(component, jack, NULL); in rt5682_rtd_init()
|
D | sof_sdw_rt700.c | 54 struct snd_soc_jack *jack; in rt700_rtd_init() local 98 jack = &ctx->sdw_headset; in rt700_rtd_init() 100 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in rt700_rtd_init() 101 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in rt700_rtd_init() 102 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in rt700_rtd_init() 103 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in rt700_rtd_init() 105 ret = snd_soc_component_set_jack(component, jack, NULL); in rt700_rtd_init()
|
D | sof_sdw_rt711_sdca.c | 78 struct snd_soc_jack *jack; in rt711_sdca_rtd_init() local 122 jack = &ctx->sdw_headset; in rt711_sdca_rtd_init() 124 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in rt711_sdca_rtd_init() 125 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in rt711_sdca_rtd_init() 126 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in rt711_sdca_rtd_init() 127 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in rt711_sdca_rtd_init() 129 ret = snd_soc_component_set_jack(component, jack, NULL); in rt711_sdca_rtd_init()
|
D | sof_sdw_rt711.c | 78 struct snd_soc_jack *jack; in rt711_rtd_init() local 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() 129 ret = snd_soc_component_set_jack(component, jack, NULL); in rt711_rtd_init()
|
D | cht_bsw_nau8824.c | 27 struct snd_soc_jack jack; member 98 struct snd_soc_jack *jack = &ctx->jack; in cht_codec_init() local 118 ret = snd_soc_card_jack_new(runtime->card, "Headset", jack_type, jack, in cht_codec_init() 125 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in cht_codec_init() 126 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in cht_codec_init() 127 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in cht_codec_init() 128 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in cht_codec_init() 130 nau8824_enable_jack_detect(component, jack); in cht_codec_init()
|
/kernel/linux/linux-5.10/sound/soc/qcom/ |
D | apq8016_sbc.c | 25 struct snd_soc_jack jack; member 70 struct snd_jack *jack; in apq8016_sbc_dai_init() local 78 &pdata->jack, NULL, 0); in apq8016_sbc_dai_init() 85 jack = pdata->jack.jack; in apq8016_sbc_dai_init() 87 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in apq8016_sbc_dai_init() 88 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in apq8016_sbc_dai_init() 89 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in apq8016_sbc_dai_init() 90 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in apq8016_sbc_dai_init() 104 rval = snd_soc_component_set_jack(component, &pdata->jack, NULL); in apq8016_sbc_dai_init()
|
D | sdm845.c | 34 struct snd_soc_jack jack; member 213 static void sdm845_jack_free(struct snd_jack *jack) in sdm845_jack_free() argument 215 struct snd_soc_component *component = jack->private_data; in sdm845_jack_free() 227 struct snd_jack *jack; in sdm845_dai_init() local 248 &pdata->jack, NULL, 0); in sdm845_dai_init() 255 jack = pdata->jack.jack; in sdm845_dai_init() 257 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in sdm845_dai_init() 258 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in sdm845_dai_init() 259 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in sdm845_dai_init() 260 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in sdm845_dai_init() [all …]
|
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/sound/ |
D | rt5640.txt | 35 - realtek,jack-detect-source 37 0: jack-detect is not used 38 1: Use GPIO1 for jack-detect 39 2: Use JD1_IN4P for jack-detect 40 3: Use JD2_IN4N for jack-detect 41 4: Use GPIO2 for jack-detect 42 5: Use GPIO3 for jack-detect 43 6: Use GPIO4 for jack-detect 45 - realtek,jack-detect-not-inverted 46 bool. Normal jack-detect switches give an inverted signal, set this bool [all …]
|
D | rt5651.txt | 19 - realtek,jack-detect-source 21 1: Use JD1_1 pin for jack-detect 22 2: Use JD1_2 pin for jack-detect 23 3: Use JD2 pin for jack-detect 25 - realtek,jack-detect-not-inverted 26 bool. Normal jack-detect switches give an inverted (active-low) signal, 27 set this bool in the rare case you've a jack-detect switch which is not
|
D | da7218.txt | 56 - dlg,jack-rate-us : Time between jack detect measurements (us) 58 - dlg,jack-debounce : Number of debounce measurements taken for jack detect 60 - dlg,jack-threshold-pct : Threshold level for jack detection (% of VDD) 64 - dlg,discharge : Boolean flag, auto discharge of Mic Bias on jack removal 97 dlg,jack-rate-us = <40>; 98 dlg,jack-debounce = <2>; 99 dlg,jack-threshold-pct = <84>;
|
D | da7219.txt | 49 - dlg,btn-cfg : Periodic button press measurements for 4-pole jack (ms) 53 - dlg,jack-ins-deb : Debounce time for jack insertion (ms) 55 - dlg,jack-det-rate: Jack type detection latency (3/4 pole) 57 - dlg,jack-rem-deb : Debounce time for jack removal (ms) 100 dlg,jack-ins-deb = <20>; 101 dlg,jack-det-rate = "32ms_64ms"; 102 dlg,jack-rem-deb = <1>;
|
/kernel/linux/linux-5.10/sound/soc/codecs/ |
D | ts3a227e.c | 26 struct snd_soc_jack *jack; member 152 if (!ts3a227e->jack) in ts3a227e_jack_report() 163 snd_soc_jack_report(ts3a227e->jack, report, TS3A227E_JACK_MASK); in ts3a227e_jack_report() 237 struct snd_soc_jack *jack) in ts3a227e_enable_jack_detect() argument 241 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in ts3a227e_enable_jack_detect() 242 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in ts3a227e_enable_jack_detect() 243 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in ts3a227e_enable_jack_detect() 244 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in ts3a227e_enable_jack_detect() 246 ts3a227e->jack = jack; in ts3a227e_enable_jack_detect()
|
D | es8316.c | 40 struct snd_soc_jack *jack; member 585 if (!es8316->jack) in es8316_irq() 594 if (es8316->jack->status & SND_JACK_MICROPHONE) in es8316_irq() 597 if (es8316->jack->status & SND_JACK_HEADPHONE) { in es8316_irq() 598 snd_soc_jack_report(es8316->jack, 0, in es8316_irq() 602 } else if (!(es8316->jack->status & SND_JACK_HEADPHONE)) { in es8316_irq() 614 snd_soc_jack_report(es8316->jack, in es8316_irq() 620 snd_soc_jack_report(es8316->jack, in es8316_irq() 626 } else if (es8316->jack->status & SND_JACK_MICROPHONE) { in es8316_irq() 630 snd_soc_jack_report(es8316->jack, 0, SND_JACK_BTN_0); in es8316_irq() [all …]
|
/kernel/linux/linux-5.10/include/trace/events/ |
D | asoc.h | 229 TP_PROTO(struct snd_soc_jack *jack, int mask, int val), 231 TP_ARGS(jack, mask, val), 234 __string( name, jack->jack->id ) 240 __assign_str(name, jack->jack->id); 251 TP_PROTO(struct snd_soc_jack *jack, int val), 253 TP_ARGS(jack, val), 256 __string( name, jack->jack->id ) 261 __assign_str(name, jack->jack->id);
|
/kernel/linux/linux-5.10/drivers/staging/greybus/ |
D | audio_codec.c | 718 struct gbaudio_jack *jack, *n; in gbaudio_init_jack() local 734 &module->headset.jack, headset, 1); in gbaudio_init_jack() 757 module->button_mask, &module->button.jack, in gbaudio_init_jack() 776 ret = snd_jack_set_key(module->button.jack.jack, SND_JACK_BTN_0, in gbaudio_init_jack() 785 ret = snd_jack_set_key(module->button.jack.jack, SND_JACK_BTN_1, in gbaudio_init_jack() 794 ret = snd_jack_set_key(module->button.jack.jack, SND_JACK_BTN_2, in gbaudio_init_jack() 803 ret = snd_jack_set_key(module->button.jack.jack, SND_JACK_BTN_3, in gbaudio_init_jack() 820 list_for_each_entry_safe(jack, n, &module->jack_list, list) { in gbaudio_init_jack() 821 snd_device_free(card->snd_card, jack->jack.jack); in gbaudio_init_jack() 822 list_del(&jack->list); in gbaudio_init_jack() [all …]
|
D | audio_module.c | 24 struct snd_jack *jack = module->headset.jack.jack; in gbaudio_request_jack() local 25 struct snd_jack *btn_jack = module->button.jack.jack; in gbaudio_request_jack() 27 if (!jack) { in gbaudio_request_jack() 41 snd_soc_jack_report(&module->button.jack, 0, in gbaudio_request_jack() 45 snd_soc_jack_report(&module->headset.jack, 0, in gbaudio_request_jack() 64 snd_soc_jack_report(&module->headset.jack, report, module->jack_mask); in gbaudio_request_jack() 73 struct snd_jack *btn_jack = module->button.jack.jack; in gbaudio_request_button() 127 snd_soc_jack_report(&module->button.jack, report, module->button_mask); in gbaudio_request_button()
|
/kernel/linux/linux-5.10/Documentation/sound/hd-audio/ |
D | models.rst | 8 3-jack in back and a headphone out 10 3-jack in back, a HP out and a SPDIF out 12 5-jack in back, 2-jack in front 14 5-jack in back, 2-jack in front, a SPDIF out 16 6-jack in back, 2-jack in front 18 6-jack with a SPDIF out 20 6-jack with headphone jack detection 31 Quirk for FSC S7020 with jack modes and HP mic support 76 Indicates a combined headset (headphone+mic) jack 88 Headset jack, which can also be used as mic-in [all …]
|
D | controls.rst | 16 jack-retasking of multi-I/O jacks. 25 automatically when a jack is plugged. 29 speaker-only is chosen, plugging into a headphone or a line-out jack 31 selected, plugging to a headphone jack mutes both speakers and 56 These enum controls the direction and the bias of the input jack 57 pins. Depending on the jack type, it can set as "Mic In" and "Line 59 when the pin is a multi-I/O jack for surround channels. 87 This control determines whether the dynamic power-control per jack 89 (D0/D3) are changed dynamically depending on the jack plugging 91 doesn't provide a proper jack-detection, this won't work; in such a [all …]
|