Skip to content

Commit 28fbfaf

Browse files
committed
ALSA: hda: Use non-SG allocation for the communication buffers
The azx_bus->dma_type is referred only for allocating the communication buffers like CORB/RIRB, and the allocation size is small. Hence it doesn't have to be S/G buffer allocation, which is an obvious overkill. Use the standard SNDRV_DMA_TYPE_DEV_WC instead. This was changed to SNDRV_DMA_TYPE_DEV_WC_SG in the commit 37137ec ("ALSA: hda: Once again fix regression of page allocations with IOMMU") as a workaround for IOMMU-backed allocations. But this is no longer needed since the allocation with SNDRV_DMA_TYPE_DEV_WC itself was fixed in the commit 9c27301 ("ALSA: memalloc: Use DMA API for x86 WC page allocations, too"). So this patch reverts the previous workaround in this piece of code. Link: https://patch.msgid.link/20240909134744.25426-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 0a131eb commit 28fbfaf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/pci/hda/hda_intel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
18211821

18221822
/* use the non-cached pages in non-snoop mode */
18231823
if (!azx_snoop(chip))
1824-
azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_WC_SG;
1824+
azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_WC;
18251825

18261826
if (chip->driver_type == AZX_DRIVER_NVIDIA) {
18271827
dev_dbg(chip->card->dev, "Enable delay in RIRB handling\n");

0 commit comments

Comments
 (0)