diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-04-29 12:38:21 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-04-29 12:41:22 -0400 |
commit | 6ba736dd02e7b3658c344efeb2f4a096a6785d83 (patch) | |
tree | cc8a5303afd3964ce51abbb1b311806a4fa8e36c | |
parent | e32dfbed8cc06aac72528e2bb53067ce02262413 (diff) |
ALSA: hda - Suppress CORBRP clear on Nvidia controller chips
The recent commit (ca460f86521) changed the CORB RP reset procedure to
follow the specification with a couple of sanity checks.
Unfortunately, Nvidia controller chips seem not following this way,
and spew the warning messages like:
snd_hda_intel 0000:00:10.1: CORB reset timeout#1, CORBRP = 0
This patch adds the workaround for such chips. It just skips the new
reset procedure for the known broken chips.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/hda_controller.c | 34 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/hda_priv.h | 1 |
3 files changed, 21 insertions, 17 deletions
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c index 248b90abb882..480bbddbd801 100644 --- a/sound/pci/hda/hda_controller.c +++ b/sound/pci/hda/hda_controller.c | |||
@@ -1059,24 +1059,26 @@ static void azx_init_cmd_io(struct azx *chip) | |||
1059 | 1059 | ||
1060 | /* reset the corb hw read pointer */ | 1060 | /* reset the corb hw read pointer */ |
1061 | azx_writew(chip, CORBRP, ICH6_CORBRP_RST); | 1061 | azx_writew(chip, CORBRP, ICH6_CORBRP_RST); |
1062 | for (timeout = 1000; timeout > 0; timeout--) { | 1062 | if (!(chip->driver_caps & AZX_DCAPS_CORBRP_SELF_CLEAR)) { |
1063 | if ((azx_readw(chip, CORBRP) & ICH6_CORBRP_RST) == ICH6_CORBRP_RST) | 1063 | for (timeout = 1000; timeout > 0; timeout--) { |
1064 | break; | 1064 | if ((azx_readw(chip, CORBRP) & ICH6_CORBRP_RST) == ICH6_CORBRP_RST) |
1065 | udelay(1); | 1065 | break; |
1066 | } | 1066 | udelay(1); |
1067 | if (timeout <= 0) | 1067 | } |
1068 | dev_err(chip->card->dev, "CORB reset timeout#1, CORBRP = %d\n", | 1068 | if (timeout <= 0) |
1069 | azx_readw(chip, CORBRP)); | 1069 | dev_err(chip->card->dev, "CORB reset timeout#1, CORBRP = %d\n", |
1070 | azx_readw(chip, CORBRP)); | ||
1070 | 1071 | ||
1071 | azx_writew(chip, CORBRP, 0); | 1072 | azx_writew(chip, CORBRP, 0); |
1072 | for (timeout = 1000; timeout > 0; timeout--) { | 1073 | for (timeout = 1000; timeout > 0; timeout--) { |
1073 | if (azx_readw(chip, CORBRP) == 0) | 1074 | if (azx_readw(chip, CORBRP) == 0) |
1074 | break; | 1075 | break; |
1075 | udelay(1); | 1076 | udelay(1); |
1077 | } | ||
1078 | if (timeout <= 0) | ||
1079 | dev_err(chip->card->dev, "CORB reset timeout#2, CORBRP = %d\n", | ||
1080 | azx_readw(chip, CORBRP)); | ||
1076 | } | 1081 | } |
1077 | if (timeout <= 0) | ||
1078 | dev_err(chip->card->dev, "CORB reset timeout#2, CORBRP = %d\n", | ||
1079 | azx_readw(chip, CORBRP)); | ||
1080 | 1082 | ||
1081 | /* enable corb dma */ | 1083 | /* enable corb dma */ |
1082 | azx_writeb(chip, CORBCTL, ICH6_CORBCTL_RUN); | 1084 | azx_writeb(chip, CORBCTL, ICH6_CORBCTL_RUN); |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index d6bca62ef387..b540ad71eb0d 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -249,7 +249,8 @@ enum { | |||
249 | /* quirks for Nvidia */ | 249 | /* quirks for Nvidia */ |
250 | #define AZX_DCAPS_PRESET_NVIDIA \ | 250 | #define AZX_DCAPS_PRESET_NVIDIA \ |
251 | (AZX_DCAPS_NVIDIA_SNOOP | AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI |\ | 251 | (AZX_DCAPS_NVIDIA_SNOOP | AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI |\ |
252 | AZX_DCAPS_ALIGN_BUFSIZE | AZX_DCAPS_NO_64BIT) | 252 | AZX_DCAPS_ALIGN_BUFSIZE | AZX_DCAPS_NO_64BIT |\ |
253 | AZX_DCAPS_CORBRP_SELF_CLEAR) | ||
253 | 254 | ||
254 | #define AZX_DCAPS_PRESET_CTHDA \ | 255 | #define AZX_DCAPS_PRESET_CTHDA \ |
255 | (AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_4K_BDLE_BOUNDARY) | 256 | (AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_4K_BDLE_BOUNDARY) |
diff --git a/sound/pci/hda/hda_priv.h b/sound/pci/hda/hda_priv.h index ba38b819f984..4a7cb01fa912 100644 --- a/sound/pci/hda/hda_priv.h +++ b/sound/pci/hda/hda_priv.h | |||
@@ -189,6 +189,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; | |||
189 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ | 189 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ |
190 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ | 190 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ |
191 | #define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */ | 191 | #define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */ |
192 | #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */ | ||
192 | 193 | ||
193 | /* position fix mode */ | 194 | /* position fix mode */ |
194 | enum { | 195 | enum { |