Merge tag 'sound-fix-6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull additional sound fix from Takashi Iwai: "A regression fix for the latest memalloc helper change" * tag 'sound-fix-6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: memalloc: Try dma_alloc_noncontiguous() at first
This commit is contained in:
@@ -542,8 +542,10 @@ static void *snd_dma_noncontig_alloc(struct snd_dma_buffer *dmab, size_t size)
|
||||
struct sg_table *sgt;
|
||||
void *p;
|
||||
|
||||
sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir,
|
||||
DEFAULT_GFP, 0);
|
||||
#ifdef CONFIG_SND_DMA_SGBUF
|
||||
if (!get_dma_ops(dmab->dev.dev)) {
|
||||
if (!sgt && !get_dma_ops(dmab->dev.dev)) {
|
||||
if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG)
|
||||
dmab->dev.type = SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK;
|
||||
else
|
||||
@@ -551,9 +553,6 @@ static void *snd_dma_noncontig_alloc(struct snd_dma_buffer *dmab, size_t size)
|
||||
return snd_dma_sg_fallback_alloc(dmab, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir,
|
||||
DEFAULT_GFP, 0);
|
||||
if (!sgt)
|
||||
return NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user