diff options
author | David Henningsson <david.henningsson@canonical.com> | 2013-11-07 07:38:24 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-11-07 08:03:17 -0500 |
commit | 0f568959de1c90be3f9ec51c271a40d7583f5809 (patch) | |
tree | a610866e7d95e84fdd31d27dace47a64715616f3 /sound/pci/hda | |
parent | efe4710860fa6ed10dd041f13902f0e06c86e8cc (diff) |
ALSA: hda - Add a block_report flag to jacks
If the jack should not be reported to userspace (e g, because it is
in some transitional state), one can set this flag.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_jack.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_jack.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c index 05b3e3e9108f..afe594411a56 100644 --- a/sound/pci/hda/hda_jack.c +++ b/sound/pci/hda/hda_jack.c | |||
@@ -286,7 +286,7 @@ void snd_hda_jack_report_sync(struct hda_codec *codec) | |||
286 | jack = codec->jacktbl.list; | 286 | jack = codec->jacktbl.list; |
287 | for (i = 0; i < codec->jacktbl.used; i++, jack++) | 287 | for (i = 0; i < codec->jacktbl.used; i++, jack++) |
288 | if (jack->nid) { | 288 | if (jack->nid) { |
289 | if (!jack->kctl) | 289 | if (!jack->kctl || jack->block_report) |
290 | continue; | 290 | continue; |
291 | state = get_jack_plug_state(jack->pin_sense); | 291 | state = get_jack_plug_state(jack->pin_sense); |
292 | snd_kctl_jack_report(codec->bus->card, jack->kctl, state); | 292 | snd_kctl_jack_report(codec->bus->card, jack->kctl, state); |
diff --git a/sound/pci/hda/hda_jack.h b/sound/pci/hda/hda_jack.h index 379420c44eef..46e1ea83ce3c 100644 --- a/sound/pci/hda/hda_jack.h +++ b/sound/pci/hda/hda_jack.h | |||
@@ -28,6 +28,7 @@ struct hda_jack_tbl { | |||
28 | unsigned int jack_detect:1; /* capable of jack-detection? */ | 28 | unsigned int jack_detect:1; /* capable of jack-detection? */ |
29 | unsigned int jack_dirty:1; /* needs to update? */ | 29 | unsigned int jack_dirty:1; /* needs to update? */ |
30 | unsigned int phantom_jack:1; /* a fixed, always present port? */ | 30 | unsigned int phantom_jack:1; /* a fixed, always present port? */ |
31 | unsigned int block_report:1; /* in a transitional state - do not report to userspace */ | ||
31 | hda_nid_t gating_jack; /* valid when gating jack plugged */ | 32 | hda_nid_t gating_jack; /* valid when gating jack plugged */ |
32 | hda_nid_t gated_jack; /* gated is dependent on this jack */ | 33 | hda_nid_t gated_jack; /* gated is dependent on this jack */ |
33 | struct snd_kcontrol *kctl; /* assigned kctl for jack-detection */ | 34 | struct snd_kcontrol *kctl; /* assigned kctl for jack-detection */ |