aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_jack.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_jack.c')
-rw-r--r--sound/pci/hda/hda_jack.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
index 5c690cb873d4..07d5288ce8cf 100644
--- a/sound/pci/hda/hda_jack.c
+++ b/sound/pci/hda/hda_jack.c
@@ -439,3 +439,25 @@ void snd_hda_jack_unsol_event(struct hda_codec *codec, unsigned int res)
439} 439}
440EXPORT_SYMBOL_HDA(snd_hda_jack_unsol_event); 440EXPORT_SYMBOL_HDA(snd_hda_jack_unsol_event);
441 441
442void snd_hda_jack_poll_all(struct hda_codec *codec)
443{
444 struct hda_jack_tbl *jack = codec->jacktbl.list;
445 int i, changes = 0;
446
447 for (i = 0; i < codec->jacktbl.used; i++, jack++) {
448 unsigned int old_sense;
449 if (!jack->nid || !jack->jack_dirty || jack->phantom_jack)
450 continue;
451 old_sense = get_jack_plug_state(jack->pin_sense);
452 jack_detect_update(codec, jack);
453 if (old_sense == get_jack_plug_state(jack->pin_sense))
454 continue;
455 changes = 1;
456 if (jack->callback)
457 jack->callback(codec, jack);
458 }
459 if (changes)
460 snd_hda_jack_report_sync(codec);
461}
462EXPORT_SYMBOL_HDA(snd_hda_jack_poll_all);
463