Patch "Revert "ALSA: pcm: Use SG-buffer only when direct DMA is available"" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Revert "ALSA: pcm: Use SG-buffer only when direct DMA is available"

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-alsa-pcm-use-sg-buffer-only-when-direct-dma-is-available.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 7d50b295c4af16f814ee82369c4a234df5228801 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@xxxxxxx>
Date: Fri, 17 Jul 2020 08:41:30 +0200
Subject: Revert "ALSA: pcm: Use SG-buffer only when direct DMA is available"

From: Takashi Iwai <tiwai@xxxxxxx>

commit 7d50b295c4af16f814ee82369c4a234df5228801 upstream.

This reverts commit 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when
direct DMA is available") also the modification commit 467fd0e82b62
("ALSA: pcm: Fix build error on m68k and others").

Poking the DMA internal helper is a layer violation, so we should
avoid that.  Meanwhile the actual bug has been addressed by the
Kconfig fix in commit dbed452a078d ("dma-pool: decouple DMA_REMAP from
DMA_COHERENT_POOL"), so we can live without this hack.

Link: https://lore.kernel.org/r/20200717064130.22957-1-tiwai@xxxxxxx
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 sound/core/pcm_memory.c |   14 --------------
 1 file changed, 14 deletions(-)

--- a/sound/core/pcm_memory.c
+++ b/sound/core/pcm_memory.c
@@ -11,7 +11,6 @@
 #include <linux/moduleparam.h>
 #include <linux/vmalloc.h>
 #include <linux/export.h>
-#include <linux/dma-mapping.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/info.h>
@@ -66,19 +65,6 @@ static int do_alloc_pages(struct snd_car
 	__update_allocated_size(card, size);
 	mutex_unlock(&card->memory_mutex);
 
-
-#ifdef CONFIG_SND_DMA_SGBUF
-	if ((type == SNDRV_DMA_TYPE_DEV_SG || type == SNDRV_DMA_TYPE_DEV_UC_SG) &&
-	    !dma_is_direct(get_dma_ops(dev))) {
-		/* mutate to continuous page allocation */
-		dev_dbg(dev, "Use continuous page allocator\n");
-		if (type == SNDRV_DMA_TYPE_DEV_SG)
-			type = SNDRV_DMA_TYPE_DEV;
-		else
-			type = SNDRV_DMA_TYPE_DEV_UC;
-	}
-#endif /* CONFIG_SND_DMA_SGBUF */
-
 	err = snd_dma_alloc_pages(type, dev, size, dmab);
 	if (!err) {
 		/* the actual allocation size might be bigger than requested,


Patches currently in stable-queue which might be from tiwai@xxxxxxx are

queue-5.4/alsa-pcm-use-sg-buffer-only-when-direct-dma-is-avail.patch
queue-5.4/alsa-pcm-fix-potential-data-race-at-pcm-memory-alloc.patch
queue-5.4/revert-alsa-pcm-use-sg-buffer-only-when-direct-dma-is-available.patch
queue-5.4/alsa-usb-audio-add-support-for-mythware-xa001au-capture-and-playback-interfaces.patch
queue-5.4/alsa-emu10k1-roll-up-loops-in-dsp-setup-code-for-aud.patch
queue-5.4/alsa-pcm-check-for-null-pointer-of-pointer-substream-before-dereferencing-it.patch
queue-5.4/alsa-hda-fix-a-possible-null-pointer-dereference-due.patch
queue-5.4/alsa-pcm-fix-build-error-on-m68k-and-others.patch
queue-5.4/alsa-pcm-set-per-card-upper-limit-of-pcm-buffer-allo.patch
queue-5.4/alsa-hda-fix-unhandled-register-update-during-auto-s.patch
queue-5.4/alsa-hda-realtek-add-quirks-for-unis-h3c-desktop-b76.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux