• Home
  • Raw
  • Download

Lines Matching refs:jack

76 	struct hda_jack_tbl *jack = codec->jacktbl.list;  in snd_hda_jack_tbl_get()  local
79 if (!nid || !jack) in snd_hda_jack_tbl_get()
81 for (i = 0; i < codec->jacktbl.used; i++, jack++) in snd_hda_jack_tbl_get()
82 if (jack->nid == nid) in snd_hda_jack_tbl_get()
83 return jack; in snd_hda_jack_tbl_get()
96 struct hda_jack_tbl *jack = codec->jacktbl.list; in snd_hda_jack_tbl_get_from_tag() local
99 if (!tag || !jack) in snd_hda_jack_tbl_get_from_tag()
101 for (i = 0; i < codec->jacktbl.used; i++, jack++) in snd_hda_jack_tbl_get_from_tag()
102 if (jack->tag == tag) in snd_hda_jack_tbl_get_from_tag()
103 return jack; in snd_hda_jack_tbl_get_from_tag()
116 struct hda_jack_tbl *jack = snd_hda_jack_tbl_get(codec, nid); in snd_hda_jack_tbl_new() local
117 if (jack) in snd_hda_jack_tbl_new()
118 return jack; in snd_hda_jack_tbl_new()
119 jack = snd_array_new(&codec->jacktbl); in snd_hda_jack_tbl_new()
120 if (!jack) in snd_hda_jack_tbl_new()
122 jack->nid = nid; in snd_hda_jack_tbl_new()
123 jack->jack_dirty = 1; in snd_hda_jack_tbl_new()
124 jack->tag = codec->jacktbl.used; in snd_hda_jack_tbl_new()
125 return jack; in snd_hda_jack_tbl_new()
130 struct hda_jack_tbl *jack = codec->jacktbl.list; in snd_hda_jack_tbl_clear() local
133 for (i = 0; i < codec->jacktbl.used; i++, jack++) { in snd_hda_jack_tbl_clear()
137 if (!codec->bus->shutdown && jack->jack) in snd_hda_jack_tbl_clear()
138 snd_device_free(codec->card, jack->jack); in snd_hda_jack_tbl_clear()
140 for (cb = jack->callback; cb; cb = next) { in snd_hda_jack_tbl_clear()
152 struct hda_jack_tbl *jack) in jack_detect_update() argument
154 if (!jack->jack_dirty) in jack_detect_update()
157 if (jack->phantom_jack) in jack_detect_update()
158 jack->pin_sense = AC_PINSENSE_PRESENCE; in jack_detect_update()
160 jack->pin_sense = read_pin_sense(codec, jack->nid); in jack_detect_update()
163 if (jack->gating_jack && !snd_hda_jack_detect(codec, jack->gating_jack)) in jack_detect_update()
164 jack->pin_sense &= ~AC_PINSENSE_PRESENCE; in jack_detect_update()
166 jack->jack_dirty = 0; in jack_detect_update()
169 if (jack->gated_jack) { in jack_detect_update()
171 snd_hda_jack_tbl_get(codec, jack->gated_jack); in jack_detect_update()
188 struct hda_jack_tbl *jack = codec->jacktbl.list; in snd_hda_jack_set_dirty_all() local
191 for (i = 0; i < codec->jacktbl.used; i++, jack++) in snd_hda_jack_set_dirty_all()
192 if (jack->nid) in snd_hda_jack_set_dirty_all()
193 jack->jack_dirty = 1; in snd_hda_jack_set_dirty_all()
207 struct hda_jack_tbl *jack = snd_hda_jack_tbl_get(codec, nid); in snd_hda_pin_sense() local
208 if (jack) { in snd_hda_pin_sense()
209 jack_detect_update(codec, jack); in snd_hda_pin_sense()
210 return jack->pin_sense; in snd_hda_pin_sense()
226 struct hda_jack_tbl *jack = snd_hda_jack_tbl_get(codec, nid); in snd_hda_jack_detect_state() local
227 if (jack && jack->phantom_jack) in snd_hda_jack_detect_state()
250 struct hda_jack_tbl *jack; in snd_hda_jack_detect_enable_callback() local
254 jack = snd_hda_jack_tbl_new(codec, nid); in snd_hda_jack_detect_enable_callback()
255 if (!jack) in snd_hda_jack_detect_enable_callback()
262 callback->nid = jack->nid; in snd_hda_jack_detect_enable_callback()
263 callback->next = jack->callback; in snd_hda_jack_detect_enable_callback()
264 jack->callback = callback; in snd_hda_jack_detect_enable_callback()
267 if (jack->jack_detect) in snd_hda_jack_detect_enable_callback()
269 jack->jack_detect = 1; in snd_hda_jack_detect_enable_callback()
274 AC_USRSP_EN | jack->tag); in snd_hda_jack_detect_enable_callback()
325 struct hda_jack_tbl *jack; in snd_hda_jack_report_sync() local
329 jack = codec->jacktbl.list; in snd_hda_jack_report_sync()
330 for (i = 0; i < codec->jacktbl.used; i++, jack++) in snd_hda_jack_report_sync()
331 if (jack->nid) in snd_hda_jack_report_sync()
332 jack_detect_update(codec, jack); in snd_hda_jack_report_sync()
337 jack = codec->jacktbl.list; in snd_hda_jack_report_sync()
338 for (i = 0; i < codec->jacktbl.used; i++, jack++) in snd_hda_jack_report_sync()
339 if (jack->nid) { in snd_hda_jack_report_sync()
340 if (!jack->jack || jack->block_report) in snd_hda_jack_report_sync()
342 state = get_jack_plug_state(jack->pin_sense); in snd_hda_jack_report_sync()
343 snd_jack_report(jack->jack, in snd_hda_jack_report_sync()
344 state ? jack->type : 0); in snd_hda_jack_report_sync()
369 static void hda_free_jack_priv(struct snd_jack *jack) in hda_free_jack_priv() argument
371 struct hda_jack_tbl *jacks = jack->private_data; in hda_free_jack_priv()
373 jacks->jack = NULL; in hda_free_jack_priv()
389 struct hda_jack_tbl *jack; in snd_hda_jack_add_kctl() local
392 jack = snd_hda_jack_tbl_new(codec, nid); in snd_hda_jack_add_kctl()
393 if (!jack) in snd_hda_jack_add_kctl()
395 if (jack->jack) in snd_hda_jack_add_kctl()
400 &jack->jack, true, phantom_jack); in snd_hda_jack_add_kctl()
404 jack->phantom_jack = !!phantom_jack; in snd_hda_jack_add_kctl()
405 jack->type = type; in snd_hda_jack_add_kctl()
406 jack->jack->private_data = jack; in snd_hda_jack_add_kctl()
407 jack->jack->private_free = hda_free_jack_priv; in snd_hda_jack_add_kctl()
409 snd_jack_report(jack->jack, state ? jack->type : 0); in snd_hda_jack_add_kctl()
512 struct hda_jack_tbl *jack) in call_jack_callback() argument
516 for (cb = jack->callback; cb; cb = cb->next) in call_jack_callback()
518 if (jack->gated_jack) { in call_jack_callback()
520 snd_hda_jack_tbl_get(codec, jack->gated_jack); in call_jack_callback()
557 struct hda_jack_tbl *jack = codec->jacktbl.list; in snd_hda_jack_poll_all() local
560 for (i = 0; i < codec->jacktbl.used; i++, jack++) { in snd_hda_jack_poll_all()
562 if (!jack->nid || !jack->jack_dirty || jack->phantom_jack) in snd_hda_jack_poll_all()
564 old_sense = get_jack_plug_state(jack->pin_sense); in snd_hda_jack_poll_all()
565 jack_detect_update(codec, jack); in snd_hda_jack_poll_all()
566 if (old_sense == get_jack_plug_state(jack->pin_sense)) in snd_hda_jack_poll_all()
569 call_jack_callback(codec, jack); in snd_hda_jack_poll_all()