Change subject: UPSTREAM: ALSA: hda - Cache the jack-detection value
......................................................................
UPSTREAM: ALSA: hda - Cache the jack-detection value
Introduce a table containing the pins and their jack-detection states
for avoiding the unnecessary verbs to check the pin status at each time.
When the unsol event is enabled via snd_hda_jack_detect_enable(), it
automatically adds the given NID to the table. Then the driver supposes
that the codec driver will set the dirty flag appropariately when an
unsolicited event is invoked for that pin.
The behavior for reading other pins that aren't registered in the table
doesn't change. Only the pins assigned to the table are cached, so far.
In near futre, this table can be extended to use the central place for
the unsolicited events of all pins, etc, and eventually include the
jack-detect kcontrols that replace the current input-jack stuff.
BUG=chromium-os:20620
TEST=Manual, run kernel on stumpy and check for JACK controls.
Signed-off-by: Takashi Iwai <ti...@suse.de>
(cherry picked from commit 1835a0f9a2121ce3198dab67507d4d3e960cc09e)
Change-Id: Ia90c8ec8699a4aa7462c58b7d98823136488975b
Signed-off-by: Dylan Reid <dgr...@chromium.org>
---
M sound/pci/hda/Makefile
M sound/pci/hda/hda_codec.c
M sound/pci/hda/hda_codec.h
A sound/pci/hda/hda_jack.c
A sound/pci/hda/hda_jack.h
M sound/pci/hda/hda_local.h
M sound/pci/hda/patch_analog.c
M sound/pci/hda/patch_cirrus.c
M sound/pci/hda/patch_conexant.c
M sound/pci/hda/patch_hdmi.c
M sound/pci/hda/patch_realtek.c
M sound/pci/hda/patch_sigmatel.c
M sound/pci/hda/patch_via.c
13 files changed, 284 insertions(+), 117 deletions(-)
git pull ssh://gerrit.chromium.org:29418/chromiumos/third_party/kernel refs/changes/15/20715/1
--
To view, visit https://gerrit.chromium.org/gerrit/20715
To unsubscribe, visit https://gerrit.chromium.org/gerrit/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia90c8ec8699a4aa7462c58b7d98823136488975b
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/kernel
Gerrit-Branch: chromeos-3.2
Gerrit-Owner: Dylan Reid <dgr...@chromium.org>
Change subject: UPSTREAM: ALSA: hda - Cache the jack-detection value
......................................................................
Patch Set 1: Looks good to me, approved
--
To view, visit https://gerrit.chromium.org/gerrit/20715
To unsubscribe, visit https://gerrit.chromium.org/gerrit/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia90c8ec8699a4aa7462c58b7d98823136488975b
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/kernel
Gerrit-Branch: chromeos-3.2
Gerrit-Owner: Dylan Reid <dgr...@chromium.org>
Gerrit-Reviewer: Taylor Hutt <th...@chromium.org>
Gerrit-Reviewer: Todd Broch <tbr...@chromium.org>