summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_priv.h
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2014-02-28 15:41:20 -0800
committerTakashi Iwai <tiwai@suse.de>2014-03-01 11:21:51 +0100
commitb419b35be45f858830e9e0e44741d8de91b3df07 (patch)
treefdfd1a9ff1008c8dd3c9e0180fd0dd5aa36f404c /sound/pci/hda/hda_priv.h
parente62a42aebd7c97977d8ae0bca8de40d26254a1cd (diff)
downloadlinux-b419b35be45f858830e9e0e44741d8de91b3df07.tar.bz2
ALSA: hda - Move snd page allocation to ops
Break out the allocation of pages for DMA and PCM buffers to ops in the chip structure. This is done to allow for architecture specific work-arounds to be added. Currently mark_pages_wc is used by hda_intel. This avoids needing to move that x86-specific code to a common area shared with hda platform drivers. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_priv.h')
-rw-r--r--sound/pci/hda/hda_priv.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_priv.h b/sound/pci/hda/hda_priv.h
index 0a56e8e18a5a..10bcec127319 100644
--- a/sound/pci/hda/hda_priv.h
+++ b/sound/pci/hda/hda_priv.h
@@ -298,6 +298,17 @@ struct hda_controller_ops {
u8 (*readb)(u8 *addr);
/* Disable msi if supported, PCI only */
int (*disable_msi_reset_irq)(struct azx *);
+ /* Allocation ops */
+ int (*dma_alloc_pages)(struct azx *chip,
+ int type,
+ size_t size,
+ struct snd_dma_buffer *buf);
+ void (*dma_free_pages)(struct azx *chip, struct snd_dma_buffer *buf);
+ int (*substream_alloc_pages)(struct azx *chip,
+ struct snd_pcm_substream *substream,
+ size_t size);
+ int (*substream_free_pages)(struct azx *chip,
+ struct snd_pcm_substream *substream);
};
struct azx_pcm {