Home
last modified time | relevance | path

Searched refs:jack (Results 1 – 25 of 218) sorted by relevance

123456789

/Linux-v6.6/sound/pci/hda/
Dhda_jack.c73 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.6/sound/core/
Djack.c22 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.6/sound/soc/
Dsoc-jack.c34 void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) in snd_soc_jack_report() argument
40 if (!jack || !jack->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 …]
Dsoc-card.c46 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.6/include/sound/
Dsoc-jack.h72 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 …]
Djack.h79 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.6/Documentation/sound/soc/
Djack.rst2 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.6/Documentation/sound/designs/
Djack-controls.rst13 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 …]
Djack-injection.rst8 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.6/sound/soc/intel/boards/
Dsof_sdw_rt5682.c54 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()
Dsof_sdw_cs42l42.c55 struct snd_soc_jack *jack; in cs42l42_rtd_init() local
99 jack = &ctx->sdw_headset; in cs42l42_rtd_init()
101 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in cs42l42_rtd_init()
102 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP); in cs42l42_rtd_init()
103 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN); in cs42l42_rtd_init()
104 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND); in cs42l42_rtd_init()
106 ret = snd_soc_component_set_jack(component, jack, NULL); in cs42l42_rtd_init()
Dsof_sdw_rt700.c54 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()
Dsof_sdw_rt711.c78 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()
Dsof_sdw_rt_sdca_jack_common.c83 struct snd_soc_jack *jack; in rt_sdca_jack_rtd_init() local
135 jack = &ctx->sdw_headset; in rt_sdca_jack_rtd_init()
137 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in rt_sdca_jack_rtd_init()
138 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in rt_sdca_jack_rtd_init()
139 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in rt_sdca_jack_rtd_init()
140 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in rt_sdca_jack_rtd_init()
142 ret = snd_soc_component_set_jack(component, jack, NULL); in rt_sdca_jack_rtd_init()
Dcht_bsw_nau8824.c27 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.6/sound/soc/intel/avs/boards/
Dda7219.c97 struct snd_soc_jack *jack; in avs_da7219_codec_init() local
102 jack = snd_soc_card_get_drvdata(card); in avs_da7219_codec_init()
127 jack, pins, num_pins); in avs_da7219_codec_init()
133 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in avs_da7219_codec_init()
134 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP); in avs_da7219_codec_init()
135 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN); in avs_da7219_codec_init()
136 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND); in avs_da7219_codec_init()
138 return snd_soc_component_set_jack(component, jack, NULL); in avs_da7219_codec_init()
220 struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card); in avs_card_resume_post() local
222 return snd_soc_component_set_jack(codec_dai->component, jack, NULL); in avs_card_resume_post()
[all …]
Dnau8825.c84 struct snd_soc_jack *jack; in avs_nau8825_codec_init() local
87 jack = snd_soc_card_get_drvdata(card); in avs_nau8825_codec_init()
100 jack, pins, num_pins); in avs_nau8825_codec_init()
104 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in avs_nau8825_codec_init()
105 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in avs_nau8825_codec_init()
106 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in avs_nau8825_codec_init()
107 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in avs_nau8825_codec_init()
109 return snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, jack, NULL); in avs_nau8825_codec_init()
228 struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card); in avs_card_resume_post() local
240 return snd_soc_component_set_jack(codec_dai->component, jack, NULL); in avs_card_resume_post()
[all …]
Drt5682.c98 struct snd_soc_jack *jack; in avs_rt5682_codec_init() local
101 jack = snd_soc_card_get_drvdata(card); in avs_rt5682_codec_init()
117 SND_JACK_BTN_1 | SND_JACK_BTN_2 | SND_JACK_BTN_3, jack, in avs_rt5682_codec_init()
124 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in avs_rt5682_codec_init()
125 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in avs_rt5682_codec_init()
126 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in avs_rt5682_codec_init()
127 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in avs_rt5682_codec_init()
129 ret = snd_soc_component_set_jack(component, jack, NULL); in avs_rt5682_codec_init()
260 struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card); in avs_card_resume_post() local
262 return snd_soc_component_set_jack(codec_dai->component, jack, NULL); in avs_card_resume_post()
[all …]
Drt5663.c22 struct snd_soc_jack jack; member
61 struct snd_soc_jack *jack; in avs_rt5663_codec_init() local
64 jack = &priv->jack; in avs_rt5663_codec_init()
72 SND_JACK_BTN_1 | SND_JACK_BTN_2 | SND_JACK_BTN_3, jack, in avs_rt5663_codec_init()
77 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in avs_rt5663_codec_init()
78 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in avs_rt5663_codec_init()
79 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in avs_rt5663_codec_init()
80 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in avs_rt5663_codec_init()
82 snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, jack, NULL); in avs_rt5663_codec_init()
190 struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card); in avs_card_resume_post() local
[all …]
/Linux-v6.6/sound/soc/codecs/
Dts3a227e.c26 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()
262 struct snd_soc_jack *jack, void *data) in ts3a227e_set_jack() argument
[all …]
/Linux-v6.6/Documentation/devicetree/bindings/sound/
Drt5640.txt38 - realtek,jack-detect-source
40 0: jack-detect is not used
41 1: Use GPIO1 for jack-detect
42 2: Use JD1_IN4P for jack-detect
43 3: Use JD2_IN4N for jack-detect
44 4: Use GPIO2 for jack-detect
45 5: Use GPIO3 for jack-detect
46 6: Use GPIO4 for jack-detect
48 - realtek,jack-detect-not-inverted
49 bool. Normal jack-detect switches give an inverted signal, set this bool
[all …]
/Linux-v6.6/include/trace/events/
Dasoc.h230 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.6/sound/soc/qcom/
Dsc7180.c38 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()
62 struct snd_jack *jack; in sc7180_headset_init() local
79 jack = pdata->hs_jack.jack; in sc7180_headset_init()
81 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in sc7180_headset_init()
82 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in sc7180_headset_init()
83 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in sc7180_headset_init()
84 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in sc7180_headset_init()
86 jack->private_data = component; in sc7180_headset_init()
87 jack->private_free = sc7180_jack_free; in sc7180_headset_init()
[all …]
Dcommon.c190 struct snd_soc_jack *jack, bool *jack_setup) in qcom_snd_wcd_jack_setup() argument
204 jack, qcom_headset_jack_pins, in qcom_snd_wcd_jack_setup()
212 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA); in qcom_snd_wcd_jack_setup()
213 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in qcom_snd_wcd_jack_setup()
214 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in qcom_snd_wcd_jack_setup()
215 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in qcom_snd_wcd_jack_setup()
226 jack, NULL); in qcom_snd_wcd_jack_setup()
Dsc7280.c39 static void sc7280_jack_free(struct snd_jack *jack) in sc7280_jack_free() argument
41 struct snd_soc_component *component = jack->private_data; in sc7280_jack_free()
64 struct snd_jack *jack; in sc7280_headset_init() local
83 jack = pdata->hs_jack.jack; in sc7280_headset_init()
85 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in sc7280_headset_init()
86 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in sc7280_headset_init()
87 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in sc7280_headset_init()
88 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in sc7280_headset_init()
90 jack->private_data = component; in sc7280_headset_init()
91 jack->private_free = sc7280_jack_free; in sc7280_headset_init()
[all …]

123456789