Lines Matching defs:jack

157     pa_alsa_jack *jack;
161 jack = pa_xnew0(pa_alsa_jack, 1);
162 jack->path = path;
163 jack->mixer_device_name = pa_xstrdup(mixer_device_name);
164 jack->name = pa_xstrdup(name);
165 jack->alsa_id.name = pa_sprintf_malloc("%s Jack", name);
166 jack->alsa_id.index = index;
167 jack->state_unplugged = PA_AVAILABLE_NO;
168 jack->state_plugged = PA_AVAILABLE_YES;
169 jack->ucm_devices = pa_dynarray_new(NULL);
170 jack->ucm_hw_mute_devices = pa_dynarray_new(NULL);
172 return jack;
175 void pa_alsa_jack_free(pa_alsa_jack *jack) {
176 pa_assert(jack);
178 pa_dynarray_free(jack->ucm_hw_mute_devices);
179 pa_dynarray_free(jack->ucm_devices);
181 pa_xfree(jack->alsa_id.name);
182 pa_xfree(jack->name);
183 pa_xfree(jack->mixer_device_name);
184 pa_xfree(jack);
187 void pa_alsa_jack_set_has_control(pa_alsa_jack *jack, bool has_control) {
191 pa_assert(jack);
193 if (has_control == jack->has_control)
196 jack->has_control = has_control;
198 PA_DYNARRAY_FOREACH(device, jack->ucm_hw_mute_devices, idx)
201 PA_DYNARRAY_FOREACH(device, jack->ucm_devices, idx)
205 void pa_alsa_jack_set_plugged_in(pa_alsa_jack *jack, bool plugged_in) {
209 pa_assert(jack);
211 if (plugged_in == jack->plugged_in)
214 jack->plugged_in = plugged_in;
216 /* XXX: If this is a headphone jack that mutes speakers when plugged in,
251 PA_DYNARRAY_FOREACH(device, jack->ucm_hw_mute_devices, idx)
254 PA_DYNARRAY_FOREACH(device, jack->ucm_devices, idx)
258 void pa_alsa_jack_add_ucm_device(pa_alsa_jack *jack, pa_alsa_ucm_device *device) {
262 pa_assert(jack);
266 * could guarantee when the jack state is changed, the device with highest
270 PA_DYNARRAY_FOREACH(idevice, jack->ucm_devices, idx) {
275 pa_dynarray_insert_by_index(jack->ucm_devices, device, idx);
278 void pa_alsa_jack_add_ucm_hw_mute_device(pa_alsa_jack *jack, pa_alsa_ucm_device *device) {
279 pa_assert(jack);
282 pa_dynarray_append(jack->ucm_hw_mute_devices, device);
1980 pa_log("Jack %s: append_pcm_to_name is set, but mapping is NULL. Can't use this jack.", j->name);
2631 pa_alsa_jack *jack;
2637 if (!(jack = jack_get(path, state->section))) {
2649 jack->append_pcm_to_name = b;
3191 pa_log_debug("Probe of jack %s failed.", buf);
3194 pa_log_debug("Probe of jack %s succeeded (%s)", buf, j->has_control ? "found!" : "not found");
3783 /* If a has a jack that b does not have, a is not a subset */
4446 /* the logic is simple: if we see the jack in multiple paths */