Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1517910

[PATCH 4.4 11/69] ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top drivers

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.4 11/69] ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top drivers
Date 2016-11-09 11:50 +0100
Message-ID <sByC6-69v-57@gated-at.bofh.it> (permalink)
References <sByC5-69v-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@suse.de>

commit 7d9a180895ee8c301df7f9447429009795c56c21 upstream.

AZX_DCAPS_RIRB_DELAY is dedicated only for Nvidia and its purpose is
just to set a flag in bus.  So it's better to be set in the toplevel
driver, either hda_intel.c or hda_tegra.c, instead of the common
hda_controller.c.  This also allows us to strip this flag from dcaps,
so save one more bit there.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/hda_controller.c |    5 -----
 sound/pci/hda/hda_controller.h |    2 +-
 sound/pci/hda/hda_intel.c      |    7 ++++++-
 sound/pci/hda/hda_tegra.c      |    5 +++--
 4 files changed, 10 insertions(+), 9 deletions(-)

--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -1055,11 +1055,6 @@ int azx_bus_init(struct azx *chip, const
 	if (chip->driver_caps & AZX_DCAPS_CORBRP_SELF_CLEAR)
 		bus->core.corbrp_self_clear = true;
 
-	if (chip->driver_caps & AZX_DCAPS_RIRB_DELAY) {
-		dev_dbg(chip->card->dev, "Enable delay in RIRB handling\n");
-		bus->needs_damn_long_delay = 1;
-	}
-
 	if (chip->driver_caps & AZX_DCAPS_4K_BDLE_BOUNDARY)
 		bus->core.align_bdle_4k = true;
 
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -32,7 +32,7 @@
 #define AZX_DCAPS_NO_MSI	(1 << 9)	/* No MSI support */
 #define AZX_DCAPS_SNOOP_MASK	(3 << 10)	/* snoop type mask */
 #define AZX_DCAPS_SNOOP_OFF	(1 << 12)	/* snoop default off */
-#define AZX_DCAPS_RIRB_DELAY	(1 << 13)	/* Long delay in read loop */
+/* 13 unused */
 /* 14 unused */
 #define AZX_DCAPS_CTX_WORKAROUND (1 << 15)	/* X-Fi workaround */
 #define AZX_DCAPS_POSFIX_LPIB	(1 << 16)	/* Use LPIB as default */
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -334,7 +334,7 @@ enum {
 
 /* quirks for Nvidia */
 #define AZX_DCAPS_PRESET_NVIDIA \
-	(AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI | /*AZX_DCAPS_ALIGN_BUFSIZE |*/ \
+	(AZX_DCAPS_NO_MSI | /*AZX_DCAPS_ALIGN_BUFSIZE |*/ \
 	 AZX_DCAPS_NO_64BIT | AZX_DCAPS_CORBRP_SELF_CLEAR |\
 	 AZX_DCAPS_SNOOP_TYPE(NVIDIA))
 
@@ -1637,6 +1637,11 @@ static int azx_create(struct snd_card *c
 		return err;
 	}
 
+	if (chip->driver_type == AZX_DRIVER_NVIDIA) {
+		dev_dbg(chip->card->dev, "Enable delay in RIRB handling\n");
+		chip->bus.needs_damn_long_delay = 1;
+	}
+
 	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
 	if (err < 0) {
 		dev_err(card->dev, "Error creating device [card]!\n");
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -464,6 +464,8 @@ static int hda_tegra_create(struct snd_c
 	if (err < 0)
 		return err;
 
+	chip->bus.needs_damn_long_delay = 1;
+
 	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
 	if (err < 0) {
 		dev_err(card->dev, "Error creating device\n");
@@ -481,8 +483,7 @@ MODULE_DEVICE_TABLE(of, hda_tegra_match)
 
 static int hda_tegra_probe(struct platform_device *pdev)
 {
-	const unsigned int driver_flags = AZX_DCAPS_RIRB_DELAY |
-					  AZX_DCAPS_CORBRP_SELF_CLEAR;
+	const unsigned int driver_flags = AZX_DCAPS_CORBRP_SELF_CLEAR;
 	struct snd_card *card;
 	struct azx *chip;
 	struct hda_tegra *hda;

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.4 00/69] 4.4.31-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 23/69] USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 27/69] Fix potential infoleak in older kernels Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 32/69] USB: serial: cp210x: fix tiocmget error handling Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 04/69] h8300: fix syscall restarting Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 01/69] i2c: xgene: Avoid dma_buffer overrun Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 19/69] ubifs: Fix regression in ubifs_readdir() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 29/69] hv: do not lose pending heartbeat vmbus packets Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 31/69] tty: limit terminal size to 4M chars Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 11/69] ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top drivers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 06/69] mm/list_lru.c: avoid error-path NULL pointer deref Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 20/69] mei: txe: dont clean an unprocessed interrupt cause. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 22/69] USB: serial: fix potential NULL-dereference at probe Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 18/69] ubifs: Abort readdir upon error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 26/69] GenWQE: Fix bad page access during abort of resource allocation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
  [PATCH 4.4 08/69] KEYS: Fix short sprintf buffer in /proc/keys show function Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:00 +0100
  [PATCH 4.4 02/69] i2c: core: fix NULL pointer dereference under race condition Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:00 +0100
  [PATCH 4.4 07/69] mm: memcontrol: do not recurse in direct reclaim Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:00 +0100
  [PATCH 4.4 67/69] kvm: x86: Check memopp before dereference (CVE-2016-8630) Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 60/69] cgroup: avoid false positive gcc-6 warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 37/69] parisc: Ensure consistent state when switching to kernel stack at syscall entry Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 46/69] scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 39/69] virtio: console: Unlock vqs while freeing buffers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 47/69] scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 65/69] usb: dwc3: Fix size used in dma_free_coherent() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 54/69] perf build: Fix traceevent plugins build race Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 38/69] virtio_ring: Make interrupt suppression spec compliant Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 57/69] ARM: 8584/1: floppy: avoid gcc-6 warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 51/69] drm/radeon/si_dpm: workaround for SI kickers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 64/69] pwm: Unexport children before chip removal Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 36/69] ovl: fsync after copy-up Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 42/69] firewire: net: guard against rx buffer overflows Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
  [PATCH 4.4 68/69] ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:40 +0100
  [PATCH 4.4 44/69] mac80211: discard multicast and 4-addr A-MSDUs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:40 +0100
  [PATCH 4.4 43/69] firewire: net: fix fragmented datagram_size off-by-one Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:40 +0100
  [PATCH 4.4 45/69] scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:40 +0100
  [PATCH 4.4 69/69] HID: usbhid: add ATEN CS962 to list of quirky devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:40 +0100
  [PATCH 4.4 50/69] drm/radeon/si_dpm: Limit clocks on HD86xx part Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
  [PATCH 4.4 58/69] mm/cma: silence warnings due to max() usage Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
  [PATCH 4.4 59/69] drm/exynos: fix error handling in exynos_drm_subdrv_open Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
  [PATCH 4.4 41/69] Input: i8042 - add XMG C504 to keyboard reset table Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
  [PATCH 4.4 48/69] mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
  [PATCH 4.4 63/69] UBI: fastmap: scrub PEB when bitflips are detected in a free PEB EC header Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
  [PATCH 4.4 55/69] x86/xen: fix upper bound of pmd loop in xen_cleanhighmap() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
  [PATCH 4.4 56/69] powerpc/ptrace: Fix out of bounds array access warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
  [PATCH 4.4 40/69] dm mirror: fix read error on recovery after default leg failure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
  [PATCH 4.4 61/69] smc91x: avoid self-comparison warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
  Re: [PATCH 4.4 00/69] 4.4.31-stable review Shuah Khan <shuah.kh@samsung.com> - 2016-11-09 19:30 +0100
  Re: [PATCH 4.4 00/69] 4.4.31-stable review Guenter Roeck <linux@roeck-us.net> - 2016-11-09 20:40 +0100

csiph-web