]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Apr 2014 23:58:35 +0000 (16:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Apr 2014 23:58:35 +0000 (16:58 -0700)
added patches:
alsa-6fire-fix-dma-issues-with-urb-transfer_buffer-usage.patch
alsa-6fire-make-buffers-dma-able-midi.patch
alsa-6fire-make-buffers-dma-able-pcm.patch
alsa-ak4xx-adda-info-leak-in-ak4xxx_capture_source_info.patch
alsa-hda-add-new-gpu-codec-id-to-snd-hda-2.patch
alsa-hda-add-new-gpu-codec-id-to-snd-hda.patch
alsa-hda-hdmi-fallback-to-alsa-allocation-when-selecting-ca.patch
alsa-hda-realtek-add-support-of-alc231-codec.patch
alsa-pcsp-fix-the-order-of-input-device-unregistration.patch
alsa-usb-audio-skip-uac2-effect_unit.patch
alsa-usb-parse-uac2-extension-unit-like-for-uac1.patch

12 files changed:
queue-3.4/alsa-6fire-fix-dma-issues-with-urb-transfer_buffer-usage.patch [new file with mode: 0644]
queue-3.4/alsa-6fire-make-buffers-dma-able-midi.patch [new file with mode: 0644]
queue-3.4/alsa-6fire-make-buffers-dma-able-pcm.patch [new file with mode: 0644]
queue-3.4/alsa-ak4xx-adda-info-leak-in-ak4xxx_capture_source_info.patch [new file with mode: 0644]
queue-3.4/alsa-hda-add-new-gpu-codec-id-to-snd-hda-2.patch [new file with mode: 0644]
queue-3.4/alsa-hda-add-new-gpu-codec-id-to-snd-hda.patch [new file with mode: 0644]
queue-3.4/alsa-hda-hdmi-fallback-to-alsa-allocation-when-selecting-ca.patch [new file with mode: 0644]
queue-3.4/alsa-hda-realtek-add-support-of-alc231-codec.patch [new file with mode: 0644]
queue-3.4/alsa-pcsp-fix-the-order-of-input-device-unregistration.patch [new file with mode: 0644]
queue-3.4/alsa-usb-audio-skip-uac2-effect_unit.patch [new file with mode: 0644]
queue-3.4/alsa-usb-parse-uac2-extension-unit-like-for-uac1.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/alsa-6fire-fix-dma-issues-with-urb-transfer_buffer-usage.patch b/queue-3.4/alsa-6fire-fix-dma-issues-with-urb-transfer_buffer-usage.patch
new file mode 100644 (file)
index 0000000..72164df
--- /dev/null
@@ -0,0 +1,114 @@
+From 4f440a7abb7c4b81192be3e192af8feec8e02ff3 Mon Sep 17 00:00:00 2001
+From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+Date: Tue, 6 Aug 2013 14:53:24 +0300
+Subject: ALSA: 6fire: fix DMA issues with URB transfer_buffer usage
+
+From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+
+commit ddb6b5a964371e8e52e696b2b258bda144c8bd3f upstream.
+
+Patch fixes 6fire not to use stack as URB transfer_buffer. URB buffers need to
+be DMA-able, which stack is not. Furthermore, transfer_buffer should not be
+allocated as part of larger device structure because DMA coherency issues and
+patch fixes this issue too.
+
+Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+Tested-by: Torsten Schenk <torsten.schenk@zoho.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+[bwh: Backported to 3.2: adjust context]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/6fire/comm.c |   38 +++++++++++++++++++++++++++++++++-----
+ sound/usb/6fire/comm.h |    2 +-
+ 2 files changed, 34 insertions(+), 6 deletions(-)
+
+--- a/sound/usb/6fire/comm.c
++++ b/sound/usb/6fire/comm.c
+@@ -110,19 +110,37 @@ static int usb6fire_comm_send_buffer(u8
+ static int usb6fire_comm_write8(struct comm_runtime *rt, u8 request,
+               u8 reg, u8 value)
+ {
+-      u8 buffer[13]; /* 13: maximum length of message */
++      u8 *buffer;
++      int ret;
++
++      /* 13: maximum length of message */
++      buffer = kmalloc(13, GFP_KERNEL);
++      if (!buffer)
++              return -ENOMEM;
+       usb6fire_comm_init_buffer(buffer, 0x00, request, reg, value, 0x00);
+-      return usb6fire_comm_send_buffer(buffer, rt->chip->dev);
++      ret = usb6fire_comm_send_buffer(buffer, rt->chip->dev);
++
++      kfree(buffer);
++      return ret;
+ }
+ static int usb6fire_comm_write16(struct comm_runtime *rt, u8 request,
+               u8 reg, u8 vl, u8 vh)
+ {
+-      u8 buffer[13]; /* 13: maximum length of message */
++      u8 *buffer;
++      int ret;
++
++      /* 13: maximum length of message */
++      buffer = kmalloc(13, GFP_KERNEL);
++      if (!buffer)
++              return -ENOMEM;
+       usb6fire_comm_init_buffer(buffer, 0x00, request, reg, vl, vh);
+-      return usb6fire_comm_send_buffer(buffer, rt->chip->dev);
++      ret = usb6fire_comm_send_buffer(buffer, rt->chip->dev);
++
++      kfree(buffer);
++      return ret;
+ }
+ int __devinit usb6fire_comm_init(struct sfire_chip *chip)
+@@ -135,6 +153,12 @@ int __devinit usb6fire_comm_init(struct
+       if (!rt)
+               return -ENOMEM;
++      rt->receiver_buffer = kzalloc(COMM_RECEIVER_BUFSIZE, GFP_KERNEL);
++      if (!rt->receiver_buffer) {
++              kfree(rt);
++              return -ENOMEM;
++      }
++
+       rt->serial = 1;
+       rt->chip = chip;
+       usb_init_urb(urb);
+@@ -152,6 +176,7 @@ int __devinit usb6fire_comm_init(struct
+       urb->interval = 1;
+       ret = usb_submit_urb(urb, GFP_KERNEL);
+       if (ret < 0) {
++              kfree(rt->receiver_buffer);
+               kfree(rt);
+               snd_printk(KERN_ERR PREFIX "cannot create comm data receiver.");
+               return ret;
+@@ -170,6 +195,9 @@ void usb6fire_comm_abort(struct sfire_ch
+ void usb6fire_comm_destroy(struct sfire_chip *chip)
+ {
+-      kfree(chip->comm);
++      struct comm_runtime *rt = chip->comm;
++
++      kfree(rt->receiver_buffer);
++      kfree(rt);
+       chip->comm = NULL;
+ }
+--- a/sound/usb/6fire/comm.h
++++ b/sound/usb/6fire/comm.h
+@@ -24,7 +24,7 @@ struct comm_runtime {
+       struct sfire_chip *chip;
+       struct urb receiver;
+-      u8 receiver_buffer[COMM_RECEIVER_BUFSIZE];
++      u8 *receiver_buffer;
+       u8 serial; /* urb serial */
diff --git a/queue-3.4/alsa-6fire-make-buffers-dma-able-midi.patch b/queue-3.4/alsa-6fire-make-buffers-dma-able-midi.patch
new file mode 100644 (file)
index 0000000..44be57e
--- /dev/null
@@ -0,0 +1,89 @@
+From 81b043782e78a7cdb4ee869d35e493756237a775 Mon Sep 17 00:00:00 2001
+From: Torsten Schenk <torsten.schenk@zoho.com>
+Date: Sun, 11 Aug 2013 11:11:35 +0200
+Subject: ALSA: 6fire: make buffers DMA-able (midi)
+
+From: Torsten Schenk <torsten.schenk@zoho.com>
+
+commit 4c2aee0032b70083dafebd733ed9c774633b2fa3 upstream.
+
+Patch makes midi output buffer DMA-able by allocating it separately.
+
+Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/6fire/midi.c |   16 +++++++++++++++-
+ sound/usb/6fire/midi.h |    6 +-----
+ 2 files changed, 16 insertions(+), 6 deletions(-)
+
+--- a/sound/usb/6fire/midi.c
++++ b/sound/usb/6fire/midi.c
+@@ -19,6 +19,10 @@
+ #include "chip.h"
+ #include "comm.h"
++enum {
++      MIDI_BUFSIZE = 64
++};
++
+ static void usb6fire_midi_out_handler(struct urb *urb)
+ {
+       struct midi_runtime *rt = urb->context;
+@@ -156,6 +160,12 @@ int __devinit usb6fire_midi_init(struct
+       if (!rt)
+               return -ENOMEM;
++      rt->out_buffer = kzalloc(MIDI_BUFSIZE, GFP_KERNEL);
++      if (!rt->out_buffer) {
++              kfree(rt);
++              return -ENOMEM;
++      }
++
+       rt->chip = chip;
+       rt->in_received = usb6fire_midi_in_received;
+       rt->out_buffer[0] = 0x80; /* 'send midi' command */
+@@ -169,6 +179,7 @@ int __devinit usb6fire_midi_init(struct
+       ret = snd_rawmidi_new(chip->card, "6FireUSB", 0, 1, 1, &rt->instance);
+       if (ret < 0) {
++              kfree(rt->out_buffer);
+               kfree(rt);
+               snd_printk(KERN_ERR PREFIX "unable to create midi.\n");
+               return ret;
+@@ -197,6 +208,9 @@ void usb6fire_midi_abort(struct sfire_ch
+ void usb6fire_midi_destroy(struct sfire_chip *chip)
+ {
+-      kfree(chip->midi);
++      struct midi_runtime *rt = chip->midi;
++
++      kfree(rt->out_buffer);
++      kfree(rt);
+       chip->midi = NULL;
+ }
+--- a/sound/usb/6fire/midi.h
++++ b/sound/usb/6fire/midi.h
+@@ -16,10 +16,6 @@
+ #include "common.h"
+-enum {
+-      MIDI_BUFSIZE = 64
+-};
+-
+ struct midi_runtime {
+       struct sfire_chip *chip;
+       struct snd_rawmidi *instance;
+@@ -32,7 +28,7 @@ struct midi_runtime {
+       struct snd_rawmidi_substream *out;
+       struct urb out_urb;
+       u8 out_serial; /* serial number of out packet */
+-      u8 out_buffer[MIDI_BUFSIZE];
++      u8 *out_buffer;
+       int buffer_offset;
+       void (*in_received)(struct midi_runtime *rt, u8 *data, int length);
diff --git a/queue-3.4/alsa-6fire-make-buffers-dma-able-pcm.patch b/queue-3.4/alsa-6fire-make-buffers-dma-able-pcm.patch
new file mode 100644 (file)
index 0000000..744fa70
--- /dev/null
@@ -0,0 +1,111 @@
+From ea8e224015470abda7cda25600d46515115d4b7d Mon Sep 17 00:00:00 2001
+From: Torsten Schenk <torsten.schenk@zoho.com>
+Date: Sun, 11 Aug 2013 11:11:19 +0200
+Subject: ALSA: 6fire: make buffers DMA-able (pcm)
+
+From: Torsten Schenk <torsten.schenk@zoho.com>
+
+commit 5ece263f1d93fba8d992e67e3ab8a71acf674db9 upstream.
+
+Patch makes pcm buffers DMA-able by allocating each one separately.
+
+Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+[bwh: Backported to 3.2: adjust context]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/6fire/pcm.c |   41 ++++++++++++++++++++++++++++++++++++++++-
+ sound/usb/6fire/pcm.h |    2 +-
+ 2 files changed, 41 insertions(+), 2 deletions(-)
+
+--- a/sound/usb/6fire/pcm.c
++++ b/sound/usb/6fire/pcm.c
+@@ -578,6 +578,33 @@ static void __devinit usb6fire_pcm_init_
+       urb->instance.number_of_packets = PCM_N_PACKETS_PER_URB;
+ }
++static int usb6fire_pcm_buffers_init(struct pcm_runtime *rt)
++{
++      int i;
++
++      for (i = 0; i < PCM_N_URBS; i++) {
++              rt->out_urbs[i].buffer = kzalloc(PCM_N_PACKETS_PER_URB
++                              * PCM_MAX_PACKET_SIZE, GFP_KERNEL);
++              if (!rt->out_urbs[i].buffer)
++                      return -ENOMEM;
++              rt->in_urbs[i].buffer = kzalloc(PCM_N_PACKETS_PER_URB
++                              * PCM_MAX_PACKET_SIZE, GFP_KERNEL);
++              if (!rt->in_urbs[i].buffer)
++                      return -ENOMEM;
++      }
++      return 0;
++}
++
++static void usb6fire_pcm_buffers_destroy(struct pcm_runtime *rt)
++{
++      int i;
++
++      for (i = 0; i < PCM_N_URBS; i++) {
++              kfree(rt->out_urbs[i].buffer);
++              kfree(rt->in_urbs[i].buffer);
++      }
++}
++
+ int __devinit usb6fire_pcm_init(struct sfire_chip *chip)
+ {
+       int i;
+@@ -589,6 +616,13 @@ int __devinit usb6fire_pcm_init(struct s
+       if (!rt)
+               return -ENOMEM;
++      ret = usb6fire_pcm_buffers_init(rt);
++      if (ret) {
++              usb6fire_pcm_buffers_destroy(rt);
++              kfree(rt);
++              return ret;
++      }
++
+       rt->chip = chip;
+       rt->stream_state = STREAM_DISABLED;
+       rt->rate = ARRAY_SIZE(rates);
+@@ -610,6 +644,7 @@ int __devinit usb6fire_pcm_init(struct s
+       ret = snd_pcm_new(chip->card, "DMX6FireUSB", 0, 1, 1, &pcm);
+       if (ret < 0) {
++              usb6fire_pcm_buffers_destroy(rt);
+               kfree(rt);
+               snd_printk(KERN_ERR PREFIX "cannot create pcm instance.\n");
+               return ret;
+@@ -625,6 +660,7 @@ int __devinit usb6fire_pcm_init(struct s
+                       snd_dma_continuous_data(GFP_KERNEL),
+                       MAX_BUFSIZE, MAX_BUFSIZE);
+       if (ret) {
++              usb6fire_pcm_buffers_destroy(rt);
+               kfree(rt);
+               snd_printk(KERN_ERR PREFIX
+                               "error preallocating pcm buffers.\n");
+@@ -669,6 +705,9 @@ void usb6fire_pcm_abort(struct sfire_chi
+ void usb6fire_pcm_destroy(struct sfire_chip *chip)
+ {
+-      kfree(chip->pcm);
++      struct pcm_runtime *rt = chip->pcm;
++
++      usb6fire_pcm_buffers_destroy(rt);
++      kfree(rt);
+       chip->pcm = NULL;
+ }
+--- a/sound/usb/6fire/pcm.h
++++ b/sound/usb/6fire/pcm.h
+@@ -32,7 +32,7 @@ struct pcm_urb {
+       struct urb instance;
+       struct usb_iso_packet_descriptor packets[PCM_N_PACKETS_PER_URB];
+       /* END DO NOT SEPARATE */
+-      u8 buffer[PCM_N_PACKETS_PER_URB * PCM_MAX_PACKET_SIZE];
++      u8 *buffer;
+       struct pcm_urb *peer;
+ };
diff --git a/queue-3.4/alsa-ak4xx-adda-info-leak-in-ak4xxx_capture_source_info.patch b/queue-3.4/alsa-ak4xx-adda-info-leak-in-ak4xxx_capture_source_info.patch
new file mode 100644 (file)
index 0000000..44c7038
--- /dev/null
@@ -0,0 +1,33 @@
+From 0aaf4c42a31301cc59177aa3246fdd7b20b570fa Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Wed, 26 Jun 2013 10:52:20 +0300
+Subject: ALSA: ak4xx-adda: info leak in ak4xxx_capture_source_info()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit bd5fe738e388ceaa32e5171481e0d3ec59f0ccfe upstream.
+
+"idx" is controled by the user and can be a negative offset into the
+input_names[] array.
+
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/i2c/other/ak4xxx-adda.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/i2c/other/ak4xxx-adda.c
++++ b/sound/i2c/other/ak4xxx-adda.c
+@@ -571,7 +571,7 @@ static int ak4xxx_capture_source_info(st
+       struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
+       int mixer_ch = AK_GET_SHIFT(kcontrol->private_value);
+       const char **input_names;
+-      int  num_names, idx;
++      unsigned int num_names, idx;
+       num_names = ak4xxx_capture_num_inputs(ak, mixer_ch);
+       if (!num_names)
diff --git a/queue-3.4/alsa-hda-add-new-gpu-codec-id-to-snd-hda-2.patch b/queue-3.4/alsa-hda-add-new-gpu-codec-id-to-snd-hda-2.patch
new file mode 100644 (file)
index 0000000..2bb2fb2
--- /dev/null
@@ -0,0 +1,40 @@
+From 8dd6177dc6b51ab26f79e5ec8b67bd28d3cbfa76 Mon Sep 17 00:00:00 2001
+From: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri, 12 Jul 2013 11:01:37 -0700
+Subject: ALSA: hda - Add new GPU codec ID to snd-hda
+
+From: Aaron Plattner <aplattner@nvidia.com>
+
+commit d52392b1a80458c0510810789c7db4a39b88022a upstream.
+
+Vendor ID 0x10de0060 is used by a yet-to-be-named GPU chip.
+
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_hdmi.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/pci/hda/patch_hdmi.c
++++ b/sound/pci/hda/patch_hdmi.c
+@@ -1910,6 +1910,7 @@ static const struct hda_codec_preset snd
+ { .id = 0x10de0043, .name = "GPU 43 HDMI/DP", .patch = patch_generic_hdmi },
+ { .id = 0x10de0044, .name = "GPU 44 HDMI/DP", .patch = patch_generic_hdmi },
+ { .id = 0x10de0051, .name = "GPU 51 HDMI/DP", .patch = patch_generic_hdmi },
++{ .id = 0x10de0060, .name = "GPU 60 HDMI/DP", .patch = patch_generic_hdmi },
+ { .id = 0x10de0067, .name = "MCP67 HDMI",     .patch = patch_nvhdmi_2ch },
+ { .id = 0x10de8001, .name = "MCP73 HDMI",     .patch = patch_nvhdmi_2ch },
+ { .id = 0x80860054, .name = "IbexPeak HDMI",  .patch = patch_generic_hdmi },
+@@ -1957,6 +1958,7 @@ MODULE_ALIAS("snd-hda-codec-id:10de0042"
+ MODULE_ALIAS("snd-hda-codec-id:10de0043");
+ MODULE_ALIAS("snd-hda-codec-id:10de0044");
+ MODULE_ALIAS("snd-hda-codec-id:10de0051");
++MODULE_ALIAS("snd-hda-codec-id:10de0060");
+ MODULE_ALIAS("snd-hda-codec-id:10de0067");
+ MODULE_ALIAS("snd-hda-codec-id:10de8001");
+ MODULE_ALIAS("snd-hda-codec-id:17e80047");
diff --git a/queue-3.4/alsa-hda-add-new-gpu-codec-id-to-snd-hda.patch b/queue-3.4/alsa-hda-add-new-gpu-codec-id-to-snd-hda.patch
new file mode 100644 (file)
index 0000000..42ccb5d
--- /dev/null
@@ -0,0 +1,41 @@
+From a35561fe3af2036c1833f5a21a93cfb8d76070b7 Mon Sep 17 00:00:00 2001
+From: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon, 16 Jul 2012 17:10:04 -0700
+Subject: ALSA: hda - Add new GPU codec ID to snd-hda
+
+From: Aaron Plattner <aplattner@nvidia.com>
+
+commit 7ae48b56f8d9c836259bc02f3e2ea4962d6b5d1b upstream.
+
+Vendor ID 0x10de0051 is used by a yet-to-be-named GPU chip.
+
+Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+Acked-by: Andy Ritger <aritger@nvidia.com>
+Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_hdmi.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/pci/hda/patch_hdmi.c
++++ b/sound/pci/hda/patch_hdmi.c
+@@ -1909,6 +1909,7 @@ static const struct hda_codec_preset snd
+ { .id = 0x10de0042, .name = "GPU 42 HDMI/DP", .patch = patch_generic_hdmi },
+ { .id = 0x10de0043, .name = "GPU 43 HDMI/DP", .patch = patch_generic_hdmi },
+ { .id = 0x10de0044, .name = "GPU 44 HDMI/DP", .patch = patch_generic_hdmi },
++{ .id = 0x10de0051, .name = "GPU 51 HDMI/DP", .patch = patch_generic_hdmi },
+ { .id = 0x10de0067, .name = "MCP67 HDMI",     .patch = patch_nvhdmi_2ch },
+ { .id = 0x10de8001, .name = "MCP73 HDMI",     .patch = patch_nvhdmi_2ch },
+ { .id = 0x80860054, .name = "IbexPeak HDMI",  .patch = patch_generic_hdmi },
+@@ -1955,6 +1956,7 @@ MODULE_ALIAS("snd-hda-codec-id:10de0041"
+ MODULE_ALIAS("snd-hda-codec-id:10de0042");
+ MODULE_ALIAS("snd-hda-codec-id:10de0043");
+ MODULE_ALIAS("snd-hda-codec-id:10de0044");
++MODULE_ALIAS("snd-hda-codec-id:10de0051");
+ MODULE_ALIAS("snd-hda-codec-id:10de0067");
+ MODULE_ALIAS("snd-hda-codec-id:10de8001");
+ MODULE_ALIAS("snd-hda-codec-id:17e80047");
diff --git a/queue-3.4/alsa-hda-hdmi-fallback-to-alsa-allocation-when-selecting-ca.patch b/queue-3.4/alsa-hda-hdmi-fallback-to-alsa-allocation-when-selecting-ca.patch
new file mode 100644 (file)
index 0000000..9808c79
--- /dev/null
@@ -0,0 +1,73 @@
+From c68d59cb0bd639b89ebb9531b597d1e0861b22f7 Mon Sep 17 00:00:00 2001
+From: Anssi Hannula <anssi.hannula@iki.fi>
+Date: Sun, 1 Sep 2013 14:36:47 +0300
+Subject: ALSA: hda - hdmi: Fallback to ALSA allocation when selecting CA
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Anssi Hannula <anssi.hannula@iki.fi>
+
+commit 18e391862cceaf43ddb8eb5cca05e1a83abdebaa upstream.
+
+hdmi_channel_allocation() tries to find a HDMI channel allocation that
+matches the number channels in the playback stream and contains only
+speakers that the HDMI sink has reported as available via EDID. If no
+such allocation is found, 0 (stereo audio) is used.
+
+Using CA 0 causes the audio causes the sink to discard everything except
+the first two channels (front left and front right).
+
+However, the sink may be capable of receiving more channels than it has
+speakers (and then perform downmix or discard the extra channels), in
+which case it is preferable to use a CA that contains extra channels
+than to use CA 0 which discards all the non-stereo channels.
+
+Additionally, it seems that HBR (HD) passthrough output does not work on
+Intel HDMI codecs when CA is set to 0 (possibly the codec zeroes
+channels not present in CA). This happens with all receivers that report
+a 5.1 speaker mask since a HBR stream is carried on 8 channels to the
+codec.
+
+Add a fallback in the CA selection so that the CA channel count at least
+matches the stream channel count, even if the stream contains channels
+not present in the sink speaker descriptor.
+
+Thanks to GrimGriefer at OpenELEC forums for discovering that changing
+the sink speaker mask allowed HBR output.
+
+Reported-by: GrimGriefer
+Reported-by: Ashecrow
+Reported-by: Frank Zafka <kafkaesque1978@gmail.com>
+Reported-by: Peter Frühberger <fritsch@xbmc.org>
+Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+[bwh: Backported to 3.2: adjust context]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_hdmi.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/sound/pci/hda/patch_hdmi.c
++++ b/sound/pci/hda/patch_hdmi.c
+@@ -513,6 +513,17 @@ static int hdmi_channel_allocation(struc
+               }
+       }
++      if (!ca) {
++              /* if there was no match, select the regular ALSA channel
++               * allocation with the matching number of channels */
++              for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) {
++                      if (channels == channel_allocations[i].channels) {
++                              ca = channel_allocations[i].ca_index;
++                              break;
++                      }
++              }
++      }
++
+       snd_print_channel_allocation(eld->spk_alloc, buf, sizeof(buf));
+       snd_printdd("HDMI: select CA 0x%x for %d-channel allocation: %s\n",
+                   ca, channels, buf);
diff --git a/queue-3.4/alsa-hda-realtek-add-support-of-alc231-codec.patch b/queue-3.4/alsa-hda-realtek-add-support-of-alc231-codec.patch
new file mode 100644 (file)
index 0000000..5657a07
--- /dev/null
@@ -0,0 +1,32 @@
+From b7536448ffe4212f4300682f240ae381c7074a65 Mon Sep 17 00:00:00 2001
+From: Kailang Yang <kailang@realtek.com>
+Date: Tue, 26 Nov 2013 15:17:50 +0800
+Subject: ALSA: hda/realtek - Add support of ALC231 codec
+
+From: Kailang Yang <kailang@realtek.com>
+
+commit ba4c4d0a9021ab034554d532a98133d668b87599 upstream.
+
+It's compatible with ALC269.
+
+Signed-off-by: Kailang Yang <kailang@realtek.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+[bwh: Backported to 3.2: adjust context]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -7031,6 +7031,7 @@ static int patch_alc680(struct hda_codec
+  */
+ static const struct hda_codec_preset snd_hda_preset_realtek[] = {
+       { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 },
++      { .id = 0x10ec0231, .name = "ALC231", .patch = patch_alc269 },
+       { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 },
+       { .id = 0x10ec0262, .name = "ALC262", .patch = patch_alc262 },
+       { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 },
diff --git a/queue-3.4/alsa-pcsp-fix-the-order-of-input-device-unregistration.patch b/queue-3.4/alsa-pcsp-fix-the-order-of-input-device-unregistration.patch
new file mode 100644 (file)
index 0000000..cc07d89
--- /dev/null
@@ -0,0 +1,35 @@
+From ad308321f9f96de08e776deb8ad16e9ff87276eb Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 14 Nov 2013 15:45:12 +0100
+Subject: ALSA: pcsp: Fix the order of input device unregistration
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 6408eac2665955343cd0e4bcd7d6237ce39611ed upstream.
+
+The current code may access to the already freed object.  The input
+device must be accessed and unregistered before freeing the top level
+sound object.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+[bwh: Backported to 3.2: adjust context]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/drivers/pcsp/pcsp.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/drivers/pcsp/pcsp.c
++++ b/sound/drivers/pcsp/pcsp.c
+@@ -187,8 +187,8 @@ static int __devinit pcsp_probe(struct p
+ static int __devexit pcsp_remove(struct platform_device *dev)
+ {
+       struct snd_pcsp *chip = platform_get_drvdata(dev);
+-      alsa_card_pcsp_exit(chip);
+       pcspkr_input_remove(chip->input_dev);
++      alsa_card_pcsp_exit(chip);
+       platform_set_drvdata(dev, NULL);
+       return 0;
+ }
diff --git a/queue-3.4/alsa-usb-audio-skip-uac2-effect_unit.patch b/queue-3.4/alsa-usb-audio-skip-uac2-effect_unit.patch
new file mode 100644 (file)
index 0000000..1a992e2
--- /dev/null
@@ -0,0 +1,50 @@
+From 2ca3bc2ba143bdaf753b88310455074a3d2ed7e4 Mon Sep 17 00:00:00 2001
+From: Eldad Zack <eldad@fogrefinery.com>
+Date: Wed, 28 Nov 2012 23:55:36 +0100
+Subject: ALSA: usb-audio: skip UAC2 EFFECT_UNIT
+
+From: Eldad Zack <eldad@fogrefinery.com>
+
+commit 5dae5fd24071319bb67d3375217d5b0b6d16cb0b upstream.
+
+Current code mishandles the case where the device is a UAC2
+and the bDescriptorSubtype is a UAC2 Effect Unit (0x07).
+It tries to parse it as a Processing Unit (which is similar to two
+other UAC1 units with overlapping subtypes), but since the structure
+is different (See: 4.7.2.10, 4.7.2.11 in UAC2 standard), the parsing
+is done incorrectly and prevents the device from initializing.
+For now, just ignore the unit.
+
+Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/mixer.c |   13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+--- a/sound/usb/mixer.c
++++ b/sound/usb/mixer.c
+@@ -720,8 +720,19 @@ static int check_input_term(struct mixer
+                       return 0;
+               }
+               case UAC1_PROCESSING_UNIT:
+-              case UAC1_EXTENSION_UNIT: {
++              case UAC1_EXTENSION_UNIT:
++              /* UAC2_PROCESSING_UNIT_V2 */
++              /* UAC2_EFFECT_UNIT */ {
+                       struct uac_processing_unit_descriptor *d = p1;
++
++                      if (state->mixer->protocol == UAC_VERSION_2 &&
++                              hdr[2] == UAC2_EFFECT_UNIT) {
++                              /* UAC2/UAC1 unit IDs overlap here in an
++                               * uncompatible way. Ignore this unit for now.
++                               */
++                              return 0;
++                      }
++
+                       if (d->bNrInPins) {
+                               id = d->baSourceID[0];
+                               break; /* continue to parse */
diff --git a/queue-3.4/alsa-usb-parse-uac2-extension-unit-like-for-uac1.patch b/queue-3.4/alsa-usb-parse-uac2-extension-unit-like-for-uac1.patch
new file mode 100644 (file)
index 0000000..3217864
--- /dev/null
@@ -0,0 +1,47 @@
+From d546eadecc19fa06a326c051640ae7a24d43de2e Mon Sep 17 00:00:00 2001
+From: Torstein Hegge <hegge@resisty.net>
+Date: Tue, 19 Mar 2013 17:12:14 +0100
+Subject: ALSA: usb: Parse UAC2 extension unit like for UAC1
+
+From: Torstein Hegge <hegge@resisty.net>
+
+commit 61ac51301e6c6d4ed977d7674ce2b8e713619a9b upstream.
+
+UAC2_EXTENSION_UNIT_V2 differs from UAC1_EXTENSION_UNIT, but can be handled in
+the same way when parsing the unit. Otherwise parse_audio_unit() fails when it
+sees an extension unit on a UAC2 device.
+
+UAC2_EXTENSION_UNIT_V2 is outside the range allocated by UAC1.
+
+Signed-off-by: Torstein Hegge <hegge@resisty.net>
+Acked-by: Daniel Mack <zonque@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/mixer.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/sound/usb/mixer.c
++++ b/sound/usb/mixer.c
+@@ -722,7 +722,8 @@ static int check_input_term(struct mixer
+               case UAC1_PROCESSING_UNIT:
+               case UAC1_EXTENSION_UNIT:
+               /* UAC2_PROCESSING_UNIT_V2 */
+-              /* UAC2_EFFECT_UNIT */ {
++              /* UAC2_EFFECT_UNIT */
++              case UAC2_EXTENSION_UNIT_V2: {
+                       struct uac_processing_unit_descriptor *d = p1;
+                       if (state->mixer->protocol == UAC_VERSION_2 &&
+@@ -1975,6 +1976,8 @@ static int parse_audio_unit(struct mixer
+                       return parse_audio_extension_unit(state, unitid, p1);
+               else /* UAC_VERSION_2 */
+                       return parse_audio_processing_unit(state, unitid, p1);
++      case UAC2_EXTENSION_UNIT_V2:
++              return parse_audio_extension_unit(state, unitid, p1);
+       default:
+               snd_printk(KERN_ERR "usbaudio: unit %u: unexpected type 0x%02x\n", unitid, p1[2]);
+               return -EINVAL;
index 7eed6cda6e7325c2c623258bbce6e71b63bf0b62..d8ba40ffc01fa436b6ef87381b78386ae8a5f6dc 100644 (file)
@@ -98,3 +98,14 @@ xhci-quirk-for-extra-long-delay-for-s4.patch
 xhci-fix-spurious-wakeups-after-s5-on-haswell.patch
 xhci-limit-the-spurious-wakeup-fix-only-to-hp-machines.patch
 alsa-hda-cache-the-mux-selection-for-generic-hdmi.patch
+alsa-hda-add-new-gpu-codec-id-to-snd-hda.patch
+alsa-hda-add-new-gpu-codec-id-to-snd-hda-2.patch
+alsa-usb-audio-skip-uac2-effect_unit.patch
+alsa-usb-parse-uac2-extension-unit-like-for-uac1.patch
+alsa-ak4xx-adda-info-leak-in-ak4xxx_capture_source_info.patch
+alsa-6fire-fix-dma-issues-with-urb-transfer_buffer-usage.patch
+alsa-6fire-make-buffers-dma-able-pcm.patch
+alsa-6fire-make-buffers-dma-able-midi.patch
+alsa-hda-hdmi-fallback-to-alsa-allocation-when-selecting-ca.patch
+alsa-pcsp-fix-the-order-of-input-device-unregistration.patch
+alsa-hda-realtek-add-support-of-alc231-codec.patch