diff options
Diffstat (limited to 'sound/pci/hda')
-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 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 4 |
5 files changed, 31 insertions, 5 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 , |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 5f13d2d18079..b422e406a9cb 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -3353,6 +3353,7 @@ static const struct hda_codec_preset snd_hda_preset_hdmi[] = { | |||
3353 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | 3353 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, |
3354 | { .id = 0x10de0070, .name = "GPU 70 HDMI/DP", .patch = patch_nvhdmi }, | 3354 | { .id = 0x10de0070, .name = "GPU 70 HDMI/DP", .patch = patch_nvhdmi }, |
3355 | { .id = 0x10de0071, .name = "GPU 71 HDMI/DP", .patch = patch_nvhdmi }, | 3355 | { .id = 0x10de0071, .name = "GPU 71 HDMI/DP", .patch = patch_nvhdmi }, |
3356 | { .id = 0x10de0072, .name = "GPU 72 HDMI/DP", .patch = patch_nvhdmi }, | ||
3356 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, | 3357 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, |
3357 | { .id = 0x11069f80, .name = "VX900 HDMI/DP", .patch = patch_via_hdmi }, | 3358 | { .id = 0x11069f80, .name = "VX900 HDMI/DP", .patch = patch_via_hdmi }, |
3358 | { .id = 0x11069f81, .name = "VX900 HDMI/DP", .patch = patch_via_hdmi }, | 3359 | { .id = 0x11069f81, .name = "VX900 HDMI/DP", .patch = patch_via_hdmi }, |
@@ -3413,6 +3414,7 @@ MODULE_ALIAS("snd-hda-codec-id:10de0060"); | |||
3413 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | 3414 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); |
3414 | MODULE_ALIAS("snd-hda-codec-id:10de0070"); | 3415 | MODULE_ALIAS("snd-hda-codec-id:10de0070"); |
3415 | MODULE_ALIAS("snd-hda-codec-id:10de0071"); | 3416 | MODULE_ALIAS("snd-hda-codec-id:10de0071"); |
3417 | MODULE_ALIAS("snd-hda-codec-id:10de0072"); | ||
3416 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | 3418 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); |
3417 | MODULE_ALIAS("snd-hda-codec-id:11069f80"); | 3419 | MODULE_ALIAS("snd-hda-codec-id:11069f80"); |
3418 | MODULE_ALIAS("snd-hda-codec-id:11069f81"); | 3420 | MODULE_ALIAS("snd-hda-codec-id:11069f81"); |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 4f6413e01c13..605d14003d25 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -568,9 +568,9 @@ static void stac_store_hints(struct hda_codec *codec) | |||
568 | spec->gpio_mask; | 568 | spec->gpio_mask; |
569 | } | 569 | } |
570 | if (get_int_hint(codec, "gpio_dir", &spec->gpio_dir)) | 570 | if (get_int_hint(codec, "gpio_dir", &spec->gpio_dir)) |
571 | spec->gpio_mask &= spec->gpio_mask; | ||
572 | if (get_int_hint(codec, "gpio_data", &spec->gpio_data)) | ||
573 | spec->gpio_dir &= spec->gpio_mask; | 571 | spec->gpio_dir &= spec->gpio_mask; |
572 | if (get_int_hint(codec, "gpio_data", &spec->gpio_data)) | ||
573 | spec->gpio_data &= spec->gpio_mask; | ||
574 | if (get_int_hint(codec, "eapd_mask", &spec->eapd_mask)) | 574 | if (get_int_hint(codec, "eapd_mask", &spec->eapd_mask)) |
575 | spec->eapd_mask &= spec->gpio_mask; | 575 | spec->eapd_mask &= spec->gpio_mask; |
576 | if (get_int_hint(codec, "gpio_mute", &spec->gpio_mute)) | 576 | if (get_int_hint(codec, "gpio_mute", &spec->gpio_mute)) |