aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorPeter Zubaj <pzubaj@marticonet.sk>2015-04-28 15:57:29 -0400
committerTakashi Iwai <tiwai@suse.de>2015-04-29 01:27:30 -0400
commit7241ea558c6715501e777396b5fc312c372e11d9 (patch)
treec42534e1c1f313b32c3f28a3bb324aa6be0a2be1 /include/sound
parent1c94e65c668f44d2c69ae7e7fc268ab3268fba3e (diff)
ALSA: emu10k1: Emu10k2 32 bit DMA mode
Looks like audigy emu10k2 (probably emu10k1 - sb live too) support two modes for DMA. Second mode is useful for 64 bit os with more then 2 GB of ram (fixes problems with big soundfont loading) 1) 32MB from 2 GB address space using 8192 pages (used now as default) 2) 16MB from 4 GB address space using 4096 pages Mode is set using HCFG_EXPANDED_MEM flag in HCFG register. Also format of emu10k2 page table is then different. Signed-off-by: Peter Zubaj <pzubaj@marticonet.sk> Tested-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/emu10k1.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 0de95ccb92cf..5bd134651f5e 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -41,7 +41,8 @@
41 41
42#define EMUPAGESIZE 4096 42#define EMUPAGESIZE 4096
43#define MAXREQVOICES 8 43#define MAXREQVOICES 8
44#define MAXPAGES 8192 44#define MAXPAGES0 4096 /* 32 bit mode */
45#define MAXPAGES1 8192 /* 31 bit mode */
45#define RESERVED 0 46#define RESERVED 0
46#define NUM_MIDI 16 47#define NUM_MIDI 16
47#define NUM_G 64 /* use all channels */ 48#define NUM_G 64 /* use all channels */
@@ -50,8 +51,7 @@
50 51
51/* FIXME? - according to the OSS driver the EMU10K1 needs a 29 bit DMA mask */ 52/* FIXME? - according to the OSS driver the EMU10K1 needs a 29 bit DMA mask */
52#define EMU10K1_DMA_MASK 0x7fffffffUL /* 31bit */ 53#define EMU10K1_DMA_MASK 0x7fffffffUL /* 31bit */
53#define AUDIGY_DMA_MASK 0x7fffffffUL /* 31bit FIXME - 32 should work? */ 54#define AUDIGY_DMA_MASK 0xffffffffUL /* 32bit mode */
54 /* See ALSA bug #1276 - rlrevell */
55 55
56#define TMEMSIZE 256*1024 56#define TMEMSIZE 256*1024
57#define TMEMSIZEREG 4 57#define TMEMSIZEREG 4
@@ -466,8 +466,11 @@
466 466
467#define MAPB 0x0d /* Cache map B */ 467#define MAPB 0x0d /* Cache map B */
468 468
469#define MAP_PTE_MASK 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */ 469#define MAP_PTE_MASK0 0xfffff000 /* The 20 MSBs of the PTE indexed by the PTI */
470#define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */ 470#define MAP_PTI_MASK0 0x00000fff /* The 12 bit index to one of the 4096 PTE dwords */
471
472#define MAP_PTE_MASK1 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */
473#define MAP_PTI_MASK1 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */
471 474
472/* 0x0e, 0x0f: Not used */ 475/* 0x0e, 0x0f: Not used */
473 476
@@ -1704,6 +1707,7 @@ struct snd_emu10k1 {
1704 unsigned short model; /* subsystem id */ 1707 unsigned short model; /* subsystem id */
1705 unsigned int card_type; /* EMU10K1_CARD_* */ 1708 unsigned int card_type; /* EMU10K1_CARD_* */
1706 unsigned int ecard_ctrl; /* ecard control bits */ 1709 unsigned int ecard_ctrl; /* ecard control bits */
1710 unsigned int address_mode; /* address mode */
1707 unsigned long dma_mask; /* PCI DMA mask */ 1711 unsigned long dma_mask; /* PCI DMA mask */
1708 unsigned int delay_pcm_irq; /* in samples */ 1712 unsigned int delay_pcm_irq; /* in samples */
1709 int max_cache_pages; /* max memory size / PAGE_SIZE */ 1713 int max_cache_pages; /* max memory size / PAGE_SIZE */