--- /dev/null
+From 13c12dbe3a2ce17227f7ddef652b6a53c78fa51f Mon Sep 17 00:00:00 2001
+From: Hsin-Yu Chao <hychao@chromium.org>
+Date: Wed, 19 Feb 2014 14:30:35 +0800
+Subject: ALSA: hda/ca0132 - Fix recording from mode id 0x8
+
+From: Hsin-Yu Chao <hychao@chromium.org>
+
+commit 13c12dbe3a2ce17227f7ddef652b6a53c78fa51f upstream.
+
+Incorrect ADC is picked in ca0132_capture_pcm_prepare(),
+where it assumes multiple streams while there is one stream
+per ADC. Note that ca0132_capture_pcm_cleanup() already does
+the right thing.
+
+The Chromebook Pixel has a microphone under the keyboard that
+is attached to node id 0x8. Before this fix, recording would
+always go to the main internal mic (node id 0x7).
+
+Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
+Reviewed-by: Dylan Reid <dgreid@chromium.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_ca0132.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/sound/pci/hda/patch_ca0132.c
++++ b/sound/pci/hda/patch_ca0132.c
+@@ -2768,9 +2768,7 @@ static int ca0132_capture_pcm_prepare(st
+ unsigned int format,
+ struct snd_pcm_substream *substream)
+ {
+- struct ca0132_spec *spec = codec->spec;
+-
+- snd_hda_codec_setup_stream(codec, spec->adcs[substream->number],
++ snd_hda_codec_setup_stream(codec, hinfo->nid,
+ stream_tag, 0, format);
+
+ return 0;
--- /dev/null
+From 28fba95087a7f3d107a3a6728aef7dbfaf3fd782 Mon Sep 17 00:00:00 2001
+From: Hsin-Yu Chao <hychao@chromium.org>
+Date: Wed, 19 Feb 2014 14:27:07 +0800
+Subject: ALSA: hda/ca0132 - setup/cleanup streams
+
+From: Hsin-Yu Chao <hychao@chromium.org>
+
+commit 28fba95087a7f3d107a3a6728aef7dbfaf3fd782 upstream.
+
+When a HDMI stream is opened with the same stream tag
+as a following opened stream to ca0132, audio will be
+heard from two ports simultaneously.
+Fix this issue by change to use snd_hda_codec_setup_stream
+and snd_hda_codec_cleanup_stream instead, so that an
+inactive stream can be marked as 'dirty' when found
+with a conflict stream tag, and then get purified.
+
+Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
+Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_ca0132.c | 66 ++++---------------------------------------
+ 1 file changed, 7 insertions(+), 59 deletions(-)
+
+--- a/sound/pci/hda/patch_ca0132.c
++++ b/sound/pci/hda/patch_ca0132.c
+@@ -2662,60 +2662,6 @@ static bool dspload_wait_loaded(struct h
+ }
+
+ /*
+- * PCM stuffs
+- */
+-static void ca0132_setup_stream(struct hda_codec *codec, hda_nid_t nid,
+- u32 stream_tag,
+- int channel_id, int format)
+-{
+- unsigned int oldval, newval;
+-
+- if (!nid)
+- return;
+-
+- snd_printdd(
+- "ca0132_setup_stream: NID=0x%x, stream=0x%x, "
+- "channel=%d, format=0x%x\n",
+- nid, stream_tag, channel_id, format);
+-
+- /* update the format-id if changed */
+- oldval = snd_hda_codec_read(codec, nid, 0,
+- AC_VERB_GET_STREAM_FORMAT,
+- 0);
+- if (oldval != format) {
+- msleep(20);
+- snd_hda_codec_write(codec, nid, 0,
+- AC_VERB_SET_STREAM_FORMAT,
+- format);
+- }
+-
+- oldval = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0);
+- newval = (stream_tag << 4) | channel_id;
+- if (oldval != newval) {
+- snd_hda_codec_write(codec, nid, 0,
+- AC_VERB_SET_CHANNEL_STREAMID,
+- newval);
+- }
+-}
+-
+-static void ca0132_cleanup_stream(struct hda_codec *codec, hda_nid_t nid)
+-{
+- unsigned int val;
+-
+- if (!nid)
+- return;
+-
+- snd_printdd(KERN_INFO "ca0132_cleanup_stream: NID=0x%x\n", nid);
+-
+- val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0);
+- if (!val)
+- return;
+-
+- snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_STREAM_FORMAT, 0);
+- snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CHANNEL_STREAMID, 0);
+-}
+-
+-/*
+ * PCM callbacks
+ */
+ static int ca0132_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
+@@ -2726,7 +2672,7 @@ static int ca0132_playback_pcm_prepare(s
+ {
+ struct ca0132_spec *spec = codec->spec;
+
+- ca0132_setup_stream(codec, spec->dacs[0], stream_tag, 0, format);
++ snd_hda_codec_setup_stream(codec, spec->dacs[0], stream_tag, 0, format);
+
+ return 0;
+ }
+@@ -2745,7 +2691,7 @@ static int ca0132_playback_pcm_cleanup(s
+ if (spec->effects_switch[PLAY_ENHANCEMENT - EFFECT_START_NID])
+ msleep(50);
+
+- ca0132_cleanup_stream(codec, spec->dacs[0]);
++ snd_hda_codec_cleanup_stream(codec, spec->dacs[0]);
+
+ return 0;
+ }
+@@ -2824,8 +2770,8 @@ static int ca0132_capture_pcm_prepare(st
+ {
+ struct ca0132_spec *spec = codec->spec;
+
+- ca0132_setup_stream(codec, spec->adcs[substream->number],
+- stream_tag, 0, format);
++ snd_hda_codec_setup_stream(codec, spec->adcs[substream->number],
++ stream_tag, 0, format);
+
+ return 0;
+ }
+@@ -2839,7 +2785,7 @@ static int ca0132_capture_pcm_cleanup(st
+ if (spec->dsp_state == DSP_DOWNLOADING)
+ return 0;
+
+- ca0132_cleanup_stream(codec, hinfo->nid);
++ snd_hda_codec_cleanup_stream(codec, hinfo->nid);
+ return 0;
+ }
+
+@@ -4742,6 +4688,8 @@ static int patch_ca0132(struct hda_codec
+ return err;
+
+ codec->patch_ops = ca0132_patch_ops;
++ codec->pcm_format_first = 1;
++ codec->no_sticky_stream = 1;
+
+ return 0;
+ }
--- /dev/null
+From 1de7ca5e844866f56bebb2fc47fa18e090677e88 Mon Sep 17 00:00:00 2001
+From: Hui Wang <hui.wang@canonical.com>
+Date: Thu, 20 Feb 2014 11:47:21 +0800
+Subject: ALSA: hda - Enable front audio jacks on one HP desktop model
+
+From: Hui Wang <hui.wang@canonical.com>
+
+commit 1de7ca5e844866f56bebb2fc47fa18e090677e88 upstream.
+
+The front headphone and mic jackes on a HP desktop model (Vendor Id:
+0x111d76c7 Subsystem Id: 0x103c2b17) can not work, the codec on this
+machine has 8 physical ports, 6 of them are routed to rear jackes
+and all of them work very well, while the remaining 2 ports are
+routed to front headphone and mic jackes, but the corresponding
+pin complex node are not defined correctly.
+
+After apply this fix, the front audio jackes can work very well.
+
+[trivial fix of enum definition by tiwai]
+
+BugLink: https://bugs.launchpad.net/bugs/1282369
+Cc: David Henningsson <david.henningsson@canonical.com>
+Tested-by: Gerald Yang <gerald.yang@canonical.com>
+Signed-off-by: Hui Wang <hui.wang@canonical.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_sigmatel.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
+@@ -83,6 +83,7 @@ enum {
+ STAC_DELL_M6_BOTH,
+ STAC_DELL_EQ,
+ STAC_ALIENWARE_M17X,
++ STAC_92HD89XX_HP_FRONT_JACK,
+ STAC_92HD73XX_MODELS
+ };
+
+@@ -1775,6 +1776,12 @@ static const struct hda_pintbl intel_dg4
+ {}
+ };
+
++static const struct hda_pintbl stac92hd89xx_hp_front_jack_pin_configs[] = {
++ { 0x0a, 0x02214030 },
++ { 0x0b, 0x02A19010 },
++ {}
++};
++
+ static void stac92hd73xx_fixup_ref(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+ {
+@@ -1893,6 +1900,10 @@ static const struct hda_fixup stac92hd73
+ [STAC_92HD73XX_NO_JD] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = stac92hd73xx_fixup_no_jd,
++ },
++ [STAC_92HD89XX_HP_FRONT_JACK] = {
++ .type = HDA_FIXUP_PINS,
++ .v.pins = stac92hd89xx_hp_front_jack_pin_configs,
+ }
+ };
+
+@@ -1953,6 +1964,8 @@ static const struct snd_pci_quirk stac92
+ "Alienware M17x", STAC_ALIENWARE_M17X),
+ SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490,
+ "Alienware M17x R3", STAC_DELL_EQ),
++ SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17,
++ "unknown HP", STAC_92HD89XX_HP_FRONT_JACK),
+ {} /* terminator */
+ };
+
--- /dev/null
+From 624aef494f86ed0c58056361c06347ad62b26806 Mon Sep 17 00:00:00 2001
+From: Clemens Ladisch <clemens@ladisch.de>
+Date: Sun, 16 Feb 2014 17:11:10 +0100
+Subject: ALSA: usb-audio: work around KEF X300A firmware bug
+
+From: Clemens Ladisch <clemens@ladisch.de>
+
+commit 624aef494f86ed0c58056361c06347ad62b26806 upstream.
+
+When the driver tries to access Function Unit 10, the KEF X300A
+speakers' firmware apparently locks up, making even PCM streaming
+impossible. Work around this by ignoring this FU.
+
+Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/mixer_maps.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/sound/usb/mixer_maps.c
++++ b/sound/usb/mixer_maps.c
+@@ -322,6 +322,11 @@ static struct usbmix_name_map hercules_u
+ { 0 } /* terminator */
+ };
+
++static const struct usbmix_name_map kef_x300a_map[] = {
++ { 10, NULL }, /* firmware locks up (?) when we try to access this FU */
++ { 0 }
++};
++
+ /*
+ * Control map entries
+ */
+@@ -409,6 +414,10 @@ static struct usbmix_ctl_map usbmix_ctl_
+ .id = USB_ID(0x200c, 0x1018),
+ .map = ebox44_map,
+ },
++ {
++ .id = USB_ID(0x27ac, 0x1000),
++ .map = kef_x300a_map,
++ },
+ { 0 } /* terminator */
+ };
+
net-use-__gfp_noretry-for-high-order-allocations.patch
memcg-fix-endless-loop-caused-by-mem_cgroup_iter.patch
fs-fix-iversion-handling.patch
+alsa-usb-audio-work-around-kef-x300a-firmware-bug.patch
+alsa-hda-ca0132-setup-cleanup-streams.patch
+alsa-hda-ca0132-fix-recording-from-mode-id-0x8.patch
+alsa-hda-enable-front-audio-jacks-on-one-hp-desktop-model.patch