aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/pci/hda/hda_tegra.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-08-07 20:02:31 +0200
committerTakashi Iwai <tiwai@suse.de>2019-08-08 16:34:49 +0200
commit619a1f195f93276dc8c6e33fe057e007adc9c288 (patch)
treec85080b44c4b7296f841f4d1424f4943b7806eaf /sound/pci/hda/hda_tegra.c
parentLinus 5.3-rc1 (diff)
downloadwireguard-linux-619a1f195f93276dc8c6e33fe057e007adc9c288.tar.xz
wireguard-linux-619a1f195f93276dc8c6e33fe057e007adc9c288.zip
ALSA: hda: Remove page allocation redirection
The HD-audio core allocates and releases pages via driver's specific dma_alloc_pages and dma_free_pages ops defined in bus->io_ops. This was because some platforms require the uncached pages and the handling of page flags had to be done locally in the driver code. Since the recent change in ALSA core memory allocator, we can simply pass SNDRV_DMA_TYPE_DEV_UC for the uncached pages, and the only difference became about this type to be passed to the core allocator. That is, it's good time for cleaning up the mess. This patch changes the allocation code in HD-audio core to call the core allocator directly so that we get rid of dma_alloc_pages and dma_free_pages io_ops. If a driver needs the uncached pages, it has to set bus->dma_type right after the bus initialization. This is merely a code refactoring and shouldn't bring any behavior changes. Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_tegra.c')
-rw-r--r--sound/pci/hda/hda_tegra.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 7dbe9f39fc79..ba414cc639f1 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -76,20 +76,6 @@ MODULE_PARM_DESC(power_save,
#endif
/*
- * DMA page allocation ops.
- */
-static int dma_alloc_pages(struct hdac_bus *bus, int type, size_t size,
- struct snd_dma_buffer *buf)
-{
- return snd_dma_alloc_pages(type, bus->dev, size, buf);
-}
-
-static void dma_free_pages(struct hdac_bus *bus, struct snd_dma_buffer *buf)
-{
- snd_dma_free_pages(buf);
-}
-
-/*
* Register access ops. Tegra HDA register access is DWORD only.
*/
static void hda_tegra_writel(u32 value, u32 __iomem *addr)
@@ -153,8 +139,6 @@ static const struct hdac_io_ops hda_tegra_io_ops = {
.reg_readw = hda_tegra_readw,
.reg_writeb = hda_tegra_writeb,
.reg_readb = hda_tegra_readb,
- .dma_alloc_pages = dma_alloc_pages,
- .dma_free_pages = dma_free_pages,
};
static const struct hda_controller_ops hda_tegra_ops; /* nothing special */