/Linux-v6.1/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 …]
|
/Linux-v6.1/sound/core/ |
D | jack.c | 22 struct snd_jack *jack; /* pointer to struct snd_jack */ member 43 struct snd_jack *jack = device->device_data; in snd_jack_dev_disconnect() local 45 mutex_lock(&jack->input_dev_lock); in snd_jack_dev_disconnect() 46 if (!jack->input_dev) { in snd_jack_dev_disconnect() 47 mutex_unlock(&jack->input_dev_lock); in snd_jack_dev_disconnect() 53 if (jack->registered) in snd_jack_dev_disconnect() 54 input_unregister_device(jack->input_dev); in snd_jack_dev_disconnect() 56 input_free_device(jack->input_dev); in snd_jack_dev_disconnect() 57 jack->input_dev = NULL; in snd_jack_dev_disconnect() 58 mutex_unlock(&jack->input_dev_lock); in snd_jack_dev_disconnect() [all …]
|
/Linux-v6.1/sound/soc/ |
D | soc-jack.c | 34 void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) in snd_soc_jack_report() argument 40 if (!jack) in snd_soc_jack_report() 42 trace_snd_soc_jack_report(jack, mask, status); in snd_soc_jack_report() 44 dapm = &jack->card->dapm; in snd_soc_jack_report() 46 mutex_lock(&jack->mutex); in snd_soc_jack_report() 48 jack->status &= ~mask; in snd_soc_jack_report() 49 jack->status |= status & mask; in snd_soc_jack_report() 51 trace_snd_soc_jack_notify(jack, status); in snd_soc_jack_report() 53 list_for_each_entry(pin, &jack->pins, list) { in snd_soc_jack_report() 54 int enable = pin->mask & jack->status; in snd_soc_jack_report() [all …]
|
D | soc-card.c | 46 struct snd_soc_jack *jack, bool initial_kctl) in jack_new() argument 48 mutex_init(&jack->mutex); in jack_new() 49 jack->card = card; in jack_new() 50 INIT_LIST_HEAD(&jack->pins); in jack_new() 51 INIT_LIST_HEAD(&jack->jack_zones); in jack_new() 52 BLOCKING_INIT_NOTIFIER_HEAD(&jack->notifier); in jack_new() 54 return snd_jack_new(card->snd_card, id, type, &jack->jack, initial_kctl, false); in jack_new() 73 struct snd_soc_jack *jack) in snd_soc_card_jack_new() argument 75 return soc_card_ret(card, jack_new(card, id, type, jack, true)); in snd_soc_card_jack_new() 96 int type, struct snd_soc_jack *jack, in snd_soc_card_jack_new_pins() argument [all …]
|
/Linux-v6.1/include/sound/ |
D | soc-jack.h | 72 struct snd_soc_jack *jack; member 84 struct snd_jack *jack; member 93 void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask); 94 int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count, 96 void snd_soc_jack_notifier_register(struct snd_soc_jack *jack, 98 void snd_soc_jack_notifier_unregister(struct snd_soc_jack *jack, 100 int snd_soc_jack_add_zones(struct snd_soc_jack *jack, int count, 102 int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage); 104 int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, 107 struct snd_soc_jack *jack, [all …]
|
D | jack.h | 79 struct snd_jack **jack, bool initial_kctl, bool phantom_jack); 80 int snd_jack_add_new_kctl(struct snd_jack *jack, const char * name, int mask); 82 void snd_jack_set_parent(struct snd_jack *jack, struct device *parent); 83 int snd_jack_set_key(struct snd_jack *jack, enum snd_jack_types type, 86 void snd_jack_report(struct snd_jack *jack, int status); 90 struct snd_jack **jack, bool initial_kctl, bool phantom_jack) in snd_jack_new() argument 95 static inline int snd_jack_add_new_kctl(struct snd_jack *jack, const char * name, int mask) in snd_jack_add_new_kctl() argument 100 static inline void snd_jack_report(struct snd_jack *jack, int status) in snd_jack_report() argument 107 static inline void snd_jack_set_parent(struct snd_jack *jack, in snd_jack_set_parent() argument 112 static inline int snd_jack_set_key(struct snd_jack *jack, in snd_jack_set_key() argument
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/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 …]
|
D | jack-injection.rst | 8 Here jack injection means users could inject plugin or plugout events 14 jack or to some audio jacks, we don't need to physically access the 15 machine and plug/unplug physical devices to the audio jack. 17 In this design, an audio jack doesn't equal to a physical audio jack. 18 Sometimes a physical audio jack contains multi functions, and the 20 ``snd_jack`` represents a physical audio jack and the ``jack_kctl`` 21 represents a function, for example a physical jack has two functions: 23 for this jack. The jack injection is implemented based on the 26 To inject events to audio jacks, we need to enable the jack injection 27 via ``sw_inject_enable`` first, once it is enabled, this jack will not [all …]
|
/Linux-v6.1/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.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 | sof_sdw_rt711_sdca.c | 79 struct snd_soc_jack *jack; in rt711_sdca_rtd_init() local 123 jack = &ctx->sdw_headset; in rt711_sdca_rtd_init() 125 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in rt711_sdca_rtd_init() 126 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in rt711_sdca_rtd_init() 127 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in rt711_sdca_rtd_init() 128 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in rt711_sdca_rtd_init() 130 ret = snd_soc_component_set_jack(component, jack, NULL); in rt711_sdca_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 112 jack, cht_bsw_jack_pins, ARRAY_SIZE(cht_bsw_jack_pins)); in cht_codec_init() 118 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in cht_codec_init() 119 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in cht_codec_init() 120 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in cht_codec_init() 121 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in cht_codec_init() 123 nau8824_enable_jack_detect(component, jack); in cht_codec_init()
|
/Linux-v6.1/sound/soc/intel/avs/boards/ |
D | da7219.c | 77 struct snd_soc_jack *jack; in avs_da7219_codec_init() local 82 jack = snd_soc_card_get_drvdata(card); in avs_da7219_codec_init() 98 SND_JACK_BTN_3 | SND_JACK_LINEOUT, jack); in avs_da7219_codec_init() 104 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in avs_da7219_codec_init() 105 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP); in avs_da7219_codec_init() 106 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN); in avs_da7219_codec_init() 107 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND); in avs_da7219_codec_init() 109 da7219_aad_jack_det(component, jack); in avs_da7219_codec_init() 188 static int avs_card_set_jack(struct snd_soc_card *card, struct snd_soc_jack *jack) in avs_card_set_jack() argument 193 snd_soc_component_set_jack(component, jack, NULL); in avs_card_set_jack() [all …]
|
D | rt5682.c | 84 struct snd_soc_jack *jack; in avs_rt5682_codec_init() local 88 jack = snd_soc_card_get_drvdata(card); in avs_rt5682_codec_init() 102 SND_JACK_BTN_1 | SND_JACK_BTN_2 | SND_JACK_BTN_3, jack); in avs_rt5682_codec_init() 108 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in avs_rt5682_codec_init() 109 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in avs_rt5682_codec_init() 110 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in avs_rt5682_codec_init() 111 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in avs_rt5682_codec_init() 113 ret = snd_soc_component_set_jack(component, jack, NULL); in avs_rt5682_codec_init() 240 static int avs_card_set_jack(struct snd_soc_card *card, struct snd_soc_jack *jack) in avs_card_set_jack() argument 245 snd_soc_component_set_jack(component, jack, NULL); in avs_card_set_jack() [all …]
|
D | nau8825.c | 85 struct snd_soc_jack *jack; in avs_nau8825_codec_init() local 89 jack = snd_soc_card_get_drvdata(card); in avs_nau8825_codec_init() 102 jack, pins, num_pins); in avs_nau8825_codec_init() 106 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in avs_nau8825_codec_init() 107 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in avs_nau8825_codec_init() 108 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in avs_nau8825_codec_init() 109 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in avs_nau8825_codec_init() 113 nau8825_enable_jack_detect(component, jack); in avs_nau8825_codec_init() 250 static int avs_card_set_jack(struct snd_soc_card *card, struct snd_soc_jack *jack) in avs_card_set_jack() argument 255 snd_soc_component_set_jack(component, jack, NULL); in avs_card_set_jack() [all …]
|
D | rt298.c | 53 struct snd_soc_jack *jack; in avs_rt298_codec_init() local 57 jack = snd_soc_card_get_drvdata(card); in avs_rt298_codec_init() 64 ret = snd_soc_card_jack_new_pins(card, "Headset", SND_JACK_HEADSET | SND_JACK_BTN_0, jack, in avs_rt298_codec_init() 69 snd_soc_component_set_jack(component, jack, NULL); in avs_rt298_codec_init() 188 static int avs_card_set_jack(struct snd_soc_card *card, struct snd_soc_jack *jack) in avs_card_set_jack() argument 193 snd_soc_component_set_jack(component, jack, NULL); in avs_card_set_jack() 209 struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card); in avs_card_resume_post() local 211 return avs_card_set_jack(card, jack); in avs_card_resume_post() 220 struct snd_soc_jack *jack; in avs_rt298_probe() local 241 jack = devm_kzalloc(dev, sizeof(*jack), GFP_KERNEL); in avs_rt298_probe() [all …]
|
D | rt286.c | 53 struct snd_soc_jack *jack; in avs_rt286_codec_init() local 57 jack = snd_soc_card_get_drvdata(card); in avs_rt286_codec_init() 64 ret = snd_soc_card_jack_new_pins(card, "Headset", SND_JACK_HEADSET | SND_JACK_BTN_0, jack, in avs_rt286_codec_init() 69 snd_soc_component_set_jack(component, jack, NULL); in avs_rt286_codec_init() 188 static int avs_card_set_jack(struct snd_soc_card *card, struct snd_soc_jack *jack) in avs_card_set_jack() argument 193 snd_soc_component_set_jack(component, jack, NULL); in avs_card_set_jack() 209 struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card); in avs_card_resume_post() local 211 return avs_card_set_jack(card, jack); in avs_card_resume_post() 220 struct snd_soc_jack *jack; in avs_rt286_probe() local 241 jack = devm_kzalloc(dev, sizeof(*jack), GFP_KERNEL); in avs_rt286_probe() [all …]
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/sound/soc/qcom/ |
D | sc7180.c | 38 static void sc7180_jack_free(struct snd_jack *jack) in sc7180_jack_free() argument 40 struct snd_soc_component *component = jack->private_data; in sc7180_jack_free() 51 struct snd_jack *jack; in sc7180_headset_init() local 67 jack = pdata->hs_jack.jack; in sc7180_headset_init() 69 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in sc7180_headset_init() 70 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in sc7180_headset_init() 71 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in sc7180_headset_init() 72 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in sc7180_headset_init() 74 jack->private_data = component; in sc7180_headset_init() 75 jack->private_free = sc7180_jack_free; in sc7180_headset_init() [all …]
|
D | sc7280.c | 38 static void sc7280_jack_free(struct snd_jack *jack) in sc7280_jack_free() argument 40 struct snd_soc_component *component = jack->private_data; in sc7280_jack_free() 52 struct snd_jack *jack; in sc7280_headset_init() local 69 jack = pdata->hs_jack.jack; in sc7280_headset_init() 71 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in sc7280_headset_init() 72 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in sc7280_headset_init() 73 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in sc7280_headset_init() 74 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in sc7280_headset_init() 76 jack->private_data = component; in sc7280_headset_init() 77 jack->private_free = sc7280_jack_free; in sc7280_headset_init() [all …]
|
D | sdm845.c | 34 struct snd_soc_jack jack; member 214 static void sdm845_jack_free(struct snd_jack *jack) in sdm845_jack_free() argument 216 struct snd_soc_component *component = jack->private_data; in sdm845_jack_free() 229 struct snd_jack *jack; in sdm845_dai_init() local 250 &pdata->jack); in sdm845_dai_init() 257 jack = pdata->jack.jack; in sdm845_dai_init() 259 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in sdm845_dai_init() 260 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in sdm845_dai_init() 261 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in sdm845_dai_init() 262 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in sdm845_dai_init() [all …]
|
/Linux-v6.1/include/trace/events/ |
D | asoc.h | 230 TP_PROTO(struct snd_soc_jack *jack, int mask, int val), 232 TP_ARGS(jack, mask, val), 235 __string( name, jack->jack->id ) 241 __assign_str(name, jack->jack->id); 252 TP_PROTO(struct snd_soc_jack *jack, int val), 254 TP_ARGS(jack, val), 257 __string( name, jack->jack->id ) 262 __assign_str(name, jack->jack->id);
|
/Linux-v6.1/sound/soc/codecs/ |
D | ts3a227e.c | 26 struct snd_soc_jack *jack; member 160 if (!ts3a227e->jack) in ts3a227e_jack_report() 171 snd_soc_jack_report(ts3a227e->jack, report, TS3A227E_JACK_MASK); in ts3a227e_jack_report() 245 struct snd_soc_jack *jack) in ts3a227e_enable_jack_detect() argument 249 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in ts3a227e_enable_jack_detect() 250 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in ts3a227e_enable_jack_detect() 251 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in ts3a227e_enable_jack_detect() 252 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in ts3a227e_enable_jack_detect() 254 ts3a227e->jack = jack; in ts3a227e_enable_jack_detect()
|