[linux] 01/01: [x86] Add Skylake audio support

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Tue Jun 7 11:54:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

carnil pushed a commit to branch jessie
in repository linux.

commit 16c4bfaacacb5849693f011a472ec0fba8bf5948
Author: Salvatore Bonaccorso <carnil at debian.org>
Date:   Tue Jun 7 13:27:27 2016 +0200

    [x86] Add Skylake audio support
    
    ALSA: hda_controller: Separate stream_tag for input and output
    ALSA: hda_intel: apply the Seperate stream_tag for Skylake
    ALSA: hda_intel: apply the Seperate stream_tag for Sunrise Point
    
    Thanks: Yann Soubeyrand and Florian Gillot
    
    Closes: #810219
---
 debian/changelog                                   |  7 ++
 ...ntroller-Separate-stream_tag-for-input-an.patch | 81 ++++++++++++++++++++++
 ...tel-apply-the-Seperate-stream_tag-for-Sky.patch | 42 +++++++++++
 ...tel-apply-the-Seperate-stream_tag-for-Sun.patch | 35 ++++++++++
 debian/patches/series                              |  5 ++
 5 files changed, 170 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 94c898f..7d9cc52 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -328,6 +328,13 @@ linux (3.16.35-1) UNRELEASED; urgency=medium
   [ Aurelien Jarno ]
   * [mips*] Emulate unaligned LDXC1 and SDXC1 instructions.
 
+  [ Salvatore Bonaccorso ]
+  * [x86] Add Skylake audio support. Thanks to Yann Soubeyrand and Florian
+    Gillot (Closes: #810219)
+    - ALSA: hda_controller: Separate stream_tag for input and output
+    - ALSA: hda_intel: apply the Seperate stream_tag for Skylake
+    - ALSA: hda_intel: apply the Seperate stream_tag for Sunrise Point
+
  -- Ben Hutchings <ben at decadent.org.uk>  Sat, 30 Apr 2016 22:07:22 +0200
 
 linux (3.16.7-ckt25-2) jessie; urgency=medium
diff --git a/debian/patches/features/x86/ALSA-hda_controller-Separate-stream_tag-for-input-an.patch b/debian/patches/features/x86/ALSA-hda_controller-Separate-stream_tag-for-input-an.patch
new file mode 100644
index 0000000..5fed86a
--- /dev/null
+++ b/debian/patches/features/x86/ALSA-hda_controller-Separate-stream_tag-for-input-an.patch
@@ -0,0 +1,81 @@
+From: Rafal Redzimski <rafal.f.redzimski at intel.com>
+Date: Fri, 19 Dec 2014 08:44:30 +0800
+Subject: ALSA: hda_controller: Separate stream_tag for input and output
+ streams.
+Origin: https://git.kernel.org/linus/93e3423e6ba4b0ddaf056ecbdf5bc46f18f41deb
+
+Implemented separate stream_tag assignment for input and output streams.
+According to hda specification stream tag must be unique throughout the
+input streams group, however an output stream might use a stream tag
+which is already in use by an input stream. This change is necessary
+to support HW which provides a total of more than 15 stream DMA engines
+which with legacy implementation causes an overflow on SDxCTL.STRM
+field (and the whole SDxCTL register) and as a result usage of
+Reserved value 0 in the SDxCTL.STRM field which confuses HDA controller.
+
+Signed-off-by: Rafal Redzimski <rafal.f.redzimski at intel.com>
+Signed-off-by: Jayachandran B <jayachandran.b at intel.com>
+Signed-off-by: Libin Yang <libin.yang at intel.com>
+Reviewed-by: Vinod Koul <vinod.koul at intel.com>
+Signed-off-by: Takashi Iwai <tiwai at suse.de>
+[carnil: backport to 3.16, adjust context]
+---
+ sound/pci/hda/hda_controller.c | 24 ++++++++++++++++++++++--
+ sound/pci/hda/hda_priv.h       |  1 +
+ 2 files changed, 23 insertions(+), 2 deletions(-)
+
+--- a/sound/pci/hda/hda_controller.c
++++ b/sound/pci/hda/hda_controller.c
+@@ -2001,10 +2001,18 @@ int azx_mixer_create(struct azx *chip)
+ EXPORT_SYMBOL_GPL(azx_mixer_create);
+ 
+ 
++static bool is_input_stream(struct azx *chip, unsigned char index)
++{
++	return (index >= chip->capture_index_offset &&
++		index < chip->capture_index_offset + chip->capture_streams);
++}
++
+ /* initialize SD streams */
+ int azx_init_stream(struct azx *chip)
+ {
+ 	int i;
++	int in_stream_tag = 0;
++	int out_stream_tag = 0;
+ 
+ 	/* initialize each stream (aka device)
+ 	 * assign the starting bdl address to each stream (device)
+@@ -2017,9 +2025,21 @@ int azx_init_stream(struct azx *chip)
+ 		azx_dev->sd_addr = chip->remap_addr + (0x20 * i + 0x80);
+ 		/* int mask: SDI0=0x01, SDI1=0x02, ... SDO3=0x80 */
+ 		azx_dev->sd_int_sta_mask = 1 << i;
+-		/* stream tag: must be non-zero and unique */
+ 		azx_dev->index = i;
+-		azx_dev->stream_tag = i + 1;
++
++		/* stream tag must be unique throughout
++		 * the stream direction group,
++		 * valid values 1...15
++		 * use separate stream tag if the flag
++		 * AZX_DCAPS_SEPARATE_STREAM_TAG is used
++		 */
++		if (chip->driver_caps & AZX_DCAPS_SEPARATE_STREAM_TAG)
++			azx_dev->stream_tag =
++				is_input_stream(chip, i) ?
++				++in_stream_tag :
++				++out_stream_tag;
++		else
++			azx_dev->stream_tag = i + 1;
+ 	}
+ 
+ 	return 0;
+--- a/sound/pci/hda/hda_priv.h
++++ b/sound/pci/hda/hda_priv.h
+@@ -192,6 +192,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO
+ #define AZX_DCAPS_I915_POWERWELL (1 << 27)	/* HSW i915 powerwell support */
+ #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28)	/* CORBRP clears itself after reset */
+ #define AZX_DCAPS_NO_MSI64      (1 << 29)	/* Stick to 32-bit MSIs */
++#define AZX_DCAPS_SEPARATE_STREAM_TAG	(1 << 30) /* capture and playback use separate stream tag */
+ 
+ /* position fix mode */
+ enum {
diff --git a/debian/patches/features/x86/ALSA-hda_intel-apply-the-Seperate-stream_tag-for-Sky.patch b/debian/patches/features/x86/ALSA-hda_intel-apply-the-Seperate-stream_tag-for-Sky.patch
new file mode 100644
index 0000000..059ae79
--- /dev/null
+++ b/debian/patches/features/x86/ALSA-hda_intel-apply-the-Seperate-stream_tag-for-Sky.patch
@@ -0,0 +1,42 @@
+From: Libin Yang <libin.yang at intel.com>
+Date: Fri, 19 Dec 2014 08:44:31 +0800
+Subject: ALSA: hda_intel: apply the Seperate stream_tag for Skylake
+Origin: https://git.kernel.org/linus/d6795827bd79b28fef1abdaf7e525fcca506b831
+
+The total stream number of Skylake's input and output stream
+exceeds 15, which will cause some streams do not work because
+of the overflow on SDxCTL.STRM field if using the legacy
+stream tag allocation method.
+
+This patch uses the new stream tag allocation method by add
+the flag AZX_DCAPS_SEPARATE_STREAM_TAG for Skylake platform.
+
+Signed-off-by: Libin Yang <libin.yang at intel.com>
+Reviewed-by: Vinod Koul <vinod.koul at intel.com>
+Signed-off-by: Takashi Iwai <tiwai at suse.de>
+[carnil: backport to 3.16, adjust context]
+---
+ sound/pci/hda/hda_intel.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -245,6 +245,9 @@ enum {
+ 	 AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_PM_RUNTIME | \
+ 	 AZX_DCAPS_I915_POWERWELL)
+ 
++#define AZX_DCAPS_INTEL_SKYLAKE \
++	(AZX_DCAPS_INTEL_PCH | AZX_DCAPS_SEPARATE_STREAM_TAG)
++
+ /* quirks for ATI SB / AMD Hudson */
+ #define AZX_DCAPS_PRESET_ATI_SB \
+ 	(AZX_DCAPS_ATI_SNOOP | AZX_DCAPS_NO_TCSEL | \
+@@ -1843,7 +1846,7 @@ static const struct pci_device_id azx_id
+ 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
+ 	/* Sunrise Point-LP */
+ 	{ PCI_DEVICE(0x8086, 0x9d70),
+-	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
++	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
+ 	/* Haswell */
+ 	{ PCI_DEVICE(0x8086, 0x0a0c),
+ 	  .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
diff --git a/debian/patches/features/x86/ALSA-hda_intel-apply-the-Seperate-stream_tag-for-Sun.patch b/debian/patches/features/x86/ALSA-hda_intel-apply-the-Seperate-stream_tag-for-Sun.patch
new file mode 100644
index 0000000..bee9899
--- /dev/null
+++ b/debian/patches/features/x86/ALSA-hda_intel-apply-the-Seperate-stream_tag-for-Sun.patch
@@ -0,0 +1,35 @@
+From: Libin Yang <libin.yang at intel.com>
+Date: Thu, 26 Mar 2015 13:28:39 +0800
+Subject: ALSA: hda_intel: apply the Seperate stream_tag for Sunrise Point
+Origin: https://git.kernel.org/linus/db48abf4367cb1f9e118defee0a37238638c2752
+
+The total stream number of Sunrise Point's input and output stream
+exceeds 15, which will cause some streams do not work because
+of the overflow on SDxCTL.STRM field if using the legacy
+stream tag allocation method.
+
+This patch uses the new stream tag allocation method by add
+the flag AZX_DCAPS_SEPARATE_STREAM_TAG for Skylake platform.
+
+Signed-off-by: Libin Yang <libin.yang at intel.com>
+Signed-off-by: Takashi Iwai <tiwai at suse.de>
+---
+ sound/pci/hda/hda_intel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
+index 4ca3d5d..a8a1e14 100644
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -1989,7 +1989,7 @@ static const struct pci_device_id azx_ids[] = {
+ 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
+ 	/* Sunrise Point */
+ 	{ PCI_DEVICE(0x8086, 0xa170),
+-	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
++	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
+ 	/* Sunrise Point-LP */
+ 	{ PCI_DEVICE(0x8086, 0x9d70),
+ 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
+-- 
+2.8.1
+
diff --git a/debian/patches/series b/debian/patches/series
index d2381a8..0f025ac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -623,6 +623,11 @@ features/all/musb/0007-usb-musb-allow-multiple-glue-layers-to-be-built-in.patch
 features/all/musb/0008-usb-musb-use-is_enabled-for-tusb6010.patch
 features/all/musb/0009-usb-musb-fix-order-of-conditions-for-assigning-end-p.patch
 
+# Skylake audio support
+features/x86/ALSA-hda_controller-Separate-stream_tag-for-input-an.patch
+features/x86/ALSA-hda_intel-apply-the-Seperate-stream_tag-for-Sky.patch
+features/x86/ALSA-hda_intel-apply-the-Seperate-stream_tag-for-Sun.patch
+
 # Fix ABI changes
 debian/of-fix-abi-changes.patch
 debian/iovec-fix-abi-change-in-3.16.7-ckt1.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list