diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-27 16:12:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-27 16:12:00 -0500 |
commit | 29169f823067b07bc2967f64ec4b6c9cd1a714a4 (patch) | |
tree | 97c1b6d069f64b92404b5c7f92ed5f72761f2475 | |
parent | 58628a7831edac5f7a13baa9d9320c758c5204c8 (diff) | |
parent | d6795827bd79b28fef1abdaf7e525fcca506b831 (diff) |
Merge tag 'sound-3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Just a couple of fixes for the new Intel Skylake HD-audio support"
* tag 'sound-3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda_intel: apply the Seperate stream_tag for Skylake
ALSA: hda_controller: Separate stream_tag for input and output streams.
-rw-r--r-- | sound/pci/hda/hda_controller.c | 24 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 5 | ||||
-rw-r--r-- | sound/pci/hda/hda_priv.h | 1 |
3 files changed, 27 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c index 8276a743e22e..0cfc9c8c4b4e 100644 --- a/sound/pci/hda/hda_controller.c +++ b/sound/pci/hda/hda_controller.c | |||
@@ -1922,10 +1922,18 @@ int azx_mixer_create(struct azx *chip) | |||
1922 | EXPORT_SYMBOL_GPL(azx_mixer_create); | 1922 | EXPORT_SYMBOL_GPL(azx_mixer_create); |
1923 | 1923 | ||
1924 | 1924 | ||
1925 | static bool is_input_stream(struct azx *chip, unsigned char index) | ||
1926 | { | ||
1927 | return (index >= chip->capture_index_offset && | ||
1928 | index < chip->capture_index_offset + chip->capture_streams); | ||
1929 | } | ||
1930 | |||
1925 | /* initialize SD streams */ | 1931 | /* initialize SD streams */ |
1926 | int azx_init_stream(struct azx *chip) | 1932 | int azx_init_stream(struct azx *chip) |
1927 | { | 1933 | { |
1928 | int i; | 1934 | int i; |
1935 | int in_stream_tag = 0; | ||
1936 | int out_stream_tag = 0; | ||
1929 | 1937 | ||
1930 | /* initialize each stream (aka device) | 1938 | /* initialize each stream (aka device) |
1931 | * assign the starting bdl address to each stream (device) | 1939 | * assign the starting bdl address to each stream (device) |
@@ -1938,9 +1946,21 @@ int azx_init_stream(struct azx *chip) | |||
1938 | azx_dev->sd_addr = chip->remap_addr + (0x20 * i + 0x80); | 1946 | azx_dev->sd_addr = chip->remap_addr + (0x20 * i + 0x80); |
1939 | /* int mask: SDI0=0x01, SDI1=0x02, ... SDO3=0x80 */ | 1947 | /* int mask: SDI0=0x01, SDI1=0x02, ... SDO3=0x80 */ |
1940 | azx_dev->sd_int_sta_mask = 1 << i; | 1948 | azx_dev->sd_int_sta_mask = 1 << i; |
1941 | /* stream tag: must be non-zero and unique */ | ||
1942 | azx_dev->index = i; | 1949 | azx_dev->index = i; |
1943 | azx_dev->stream_tag = i + 1; | 1950 | |
1951 | /* stream tag must be unique throughout | ||
1952 | * the stream direction group, | ||
1953 | * valid values 1...15 | ||
1954 | * use separate stream tag if the flag | ||
1955 | * AZX_DCAPS_SEPARATE_STREAM_TAG is used | ||
1956 | */ | ||
1957 | if (chip->driver_caps & AZX_DCAPS_SEPARATE_STREAM_TAG) | ||
1958 | azx_dev->stream_tag = | ||
1959 | is_input_stream(chip, i) ? | ||
1960 | ++in_stream_tag : | ||
1961 | ++out_stream_tag; | ||
1962 | else | ||
1963 | azx_dev->stream_tag = i + 1; | ||
1944 | } | 1964 | } |
1945 | 1965 | ||
1946 | return 0; | 1966 | return 0; |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 2bf0b568e3de..d426a0bd6a5f 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -299,6 +299,9 @@ enum { | |||
299 | AZX_DCAPS_PM_RUNTIME | AZX_DCAPS_I915_POWERWELL |\ | 299 | AZX_DCAPS_PM_RUNTIME | AZX_DCAPS_I915_POWERWELL |\ |
300 | AZX_DCAPS_SNOOP_TYPE(SCH)) | 300 | AZX_DCAPS_SNOOP_TYPE(SCH)) |
301 | 301 | ||
302 | #define AZX_DCAPS_INTEL_SKYLAKE \ | ||
303 | (AZX_DCAPS_INTEL_PCH | AZX_DCAPS_SEPARATE_STREAM_TAG) | ||
304 | |||
302 | /* quirks for ATI SB / AMD Hudson */ | 305 | /* quirks for ATI SB / AMD Hudson */ |
303 | #define AZX_DCAPS_PRESET_ATI_SB \ | 306 | #define AZX_DCAPS_PRESET_ATI_SB \ |
304 | (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB |\ | 307 | (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB |\ |
@@ -2027,7 +2030,7 @@ static const struct pci_device_id azx_ids[] = { | |||
2027 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, | 2030 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
2028 | /* Sunrise Point-LP */ | 2031 | /* Sunrise Point-LP */ |
2029 | { PCI_DEVICE(0x8086, 0x9d70), | 2032 | { PCI_DEVICE(0x8086, 0x9d70), |
2030 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, | 2033 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, |
2031 | /* Haswell */ | 2034 | /* Haswell */ |
2032 | { PCI_DEVICE(0x8086, 0x0a0c), | 2035 | { PCI_DEVICE(0x8086, 0x0a0c), |
2033 | .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, | 2036 | .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, |
diff --git a/sound/pci/hda/hda_priv.h b/sound/pci/hda/hda_priv.h index aa484fdf4338..166e3e84b963 100644 --- a/sound/pci/hda/hda_priv.h +++ b/sound/pci/hda/hda_priv.h | |||
@@ -171,6 +171,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; | |||
171 | #define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */ | 171 | #define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */ |
172 | #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */ | 172 | #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */ |
173 | #define AZX_DCAPS_NO_MSI64 (1 << 29) /* Stick to 32-bit MSIs */ | 173 | #define AZX_DCAPS_NO_MSI64 (1 << 29) /* Stick to 32-bit MSIs */ |
174 | #define AZX_DCAPS_SEPARATE_STREAM_TAG (1 << 30) /* capture and playback use separate stream tag */ | ||
174 | 175 | ||
175 | enum { | 176 | enum { |
176 | AZX_SNOOP_TYPE_NONE , | 177 | AZX_SNOOP_TYPE_NONE , |