aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/trident/trident_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/trident/trident_main.c')
-rw-r--r--sound/pci/trident/trident_main.c61
1 files changed, 33 insertions, 28 deletions
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index c612b435ca2b..6d943f6f6b70 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -68,40 +68,40 @@ static void snd_trident_print_voice_regs(struct snd_trident *trident, int voice)
68{ 68{
69 unsigned int val, tmp; 69 unsigned int val, tmp;
70 70
71 printk("Trident voice %i:\n", voice); 71 printk(KERN_DEBUG "Trident voice %i:\n", voice);
72 outb(voice, TRID_REG(trident, T4D_LFO_GC_CIR)); 72 outb(voice, TRID_REG(trident, T4D_LFO_GC_CIR));
73 val = inl(TRID_REG(trident, CH_LBA)); 73 val = inl(TRID_REG(trident, CH_LBA));
74 printk("LBA: 0x%x\n", val); 74 printk(KERN_DEBUG "LBA: 0x%x\n", val);
75 val = inl(TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC)); 75 val = inl(TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC));
76 printk("GVSel: %i\n", val >> 31); 76 printk(KERN_DEBUG "GVSel: %i\n", val >> 31);
77 printk("Pan: 0x%x\n", (val >> 24) & 0x7f); 77 printk(KERN_DEBUG "Pan: 0x%x\n", (val >> 24) & 0x7f);
78 printk("Vol: 0x%x\n", (val >> 16) & 0xff); 78 printk(KERN_DEBUG "Vol: 0x%x\n", (val >> 16) & 0xff);
79 printk("CTRL: 0x%x\n", (val >> 12) & 0x0f); 79 printk(KERN_DEBUG "CTRL: 0x%x\n", (val >> 12) & 0x0f);
80 printk("EC: 0x%x\n", val & 0x0fff); 80 printk(KERN_DEBUG "EC: 0x%x\n", val & 0x0fff);
81 if (trident->device != TRIDENT_DEVICE_ID_NX) { 81 if (trident->device != TRIDENT_DEVICE_ID_NX) {
82 val = inl(TRID_REG(trident, CH_DX_CSO_ALPHA_FMS)); 82 val = inl(TRID_REG(trident, CH_DX_CSO_ALPHA_FMS));
83 printk("CSO: 0x%x\n", val >> 16); 83 printk(KERN_DEBUG "CSO: 0x%x\n", val >> 16);
84 printk("Alpha: 0x%x\n", (val >> 4) & 0x0fff); 84 printk("Alpha: 0x%x\n", (val >> 4) & 0x0fff);
85 printk("FMS: 0x%x\n", val & 0x0f); 85 printk(KERN_DEBUG "FMS: 0x%x\n", val & 0x0f);
86 val = inl(TRID_REG(trident, CH_DX_ESO_DELTA)); 86 val = inl(TRID_REG(trident, CH_DX_ESO_DELTA));
87 printk("ESO: 0x%x\n", val >> 16); 87 printk(KERN_DEBUG "ESO: 0x%x\n", val >> 16);
88 printk("Delta: 0x%x\n", val & 0xffff); 88 printk(KERN_DEBUG "Delta: 0x%x\n", val & 0xffff);
89 val = inl(TRID_REG(trident, CH_DX_FMC_RVOL_CVOL)); 89 val = inl(TRID_REG(trident, CH_DX_FMC_RVOL_CVOL));
90 } else { // TRIDENT_DEVICE_ID_NX 90 } else { // TRIDENT_DEVICE_ID_NX
91 val = inl(TRID_REG(trident, CH_NX_DELTA_CSO)); 91 val = inl(TRID_REG(trident, CH_NX_DELTA_CSO));
92 tmp = (val >> 24) & 0xff; 92 tmp = (val >> 24) & 0xff;
93 printk("CSO: 0x%x\n", val & 0x00ffffff); 93 printk(KERN_DEBUG "CSO: 0x%x\n", val & 0x00ffffff);
94 val = inl(TRID_REG(trident, CH_NX_DELTA_ESO)); 94 val = inl(TRID_REG(trident, CH_NX_DELTA_ESO));
95 tmp |= (val >> 16) & 0xff00; 95 tmp |= (val >> 16) & 0xff00;
96 printk("Delta: 0x%x\n", tmp); 96 printk(KERN_DEBUG "Delta: 0x%x\n", tmp);
97 printk("ESO: 0x%x\n", val & 0x00ffffff); 97 printk(KERN_DEBUG "ESO: 0x%x\n", val & 0x00ffffff);
98 val = inl(TRID_REG(trident, CH_NX_ALPHA_FMS_FMC_RVOL_CVOL)); 98 val = inl(TRID_REG(trident, CH_NX_ALPHA_FMS_FMC_RVOL_CVOL));
99 printk("Alpha: 0x%x\n", val >> 20); 99 printk(KERN_DEBUG "Alpha: 0x%x\n", val >> 20);
100 printk("FMS: 0x%x\n", (val >> 16) & 0x0f); 100 printk(KERN_DEBUG "FMS: 0x%x\n", (val >> 16) & 0x0f);
101 } 101 }
102 printk("FMC: 0x%x\n", (val >> 14) & 3); 102 printk(KERN_DEBUG "FMC: 0x%x\n", (val >> 14) & 3);
103 printk("RVol: 0x%x\n", (val >> 7) & 0x7f); 103 printk(KERN_DEBUG "RVol: 0x%x\n", (val >> 7) & 0x7f);
104 printk("CVol: 0x%x\n", val & 0x7f); 104 printk(KERN_DEBUG "CVol: 0x%x\n", val & 0x7f);
105} 105}
106#endif 106#endif
107 107
@@ -496,12 +496,17 @@ void snd_trident_write_voice_regs(struct snd_trident * trident,
496 outl(regs[4], TRID_REG(trident, CH_START + 16)); 496 outl(regs[4], TRID_REG(trident, CH_START + 16));
497 497
498#if 0 498#if 0
499 printk("written %i channel:\n", voice->number); 499 printk(KERN_DEBUG "written %i channel:\n", voice->number);
500 printk(" regs[0] = 0x%x/0x%x\n", regs[0], inl(TRID_REG(trident, CH_START + 0))); 500 printk(KERN_DEBUG " regs[0] = 0x%x/0x%x\n",
501 printk(" regs[1] = 0x%x/0x%x\n", regs[1], inl(TRID_REG(trident, CH_START + 4))); 501 regs[0], inl(TRID_REG(trident, CH_START + 0)));
502 printk(" regs[2] = 0x%x/0x%x\n", regs[2], inl(TRID_REG(trident, CH_START + 8))); 502 printk(KERN_DEBUG " regs[1] = 0x%x/0x%x\n",
503 printk(" regs[3] = 0x%x/0x%x\n", regs[3], inl(TRID_REG(trident, CH_START + 12))); 503 regs[1], inl(TRID_REG(trident, CH_START + 4)));
504 printk(" regs[4] = 0x%x/0x%x\n", regs[4], inl(TRID_REG(trident, CH_START + 16))); 504 printk(KERN_DEBUG " regs[2] = 0x%x/0x%x\n",
505 regs[2], inl(TRID_REG(trident, CH_START + 8)));
506 printk(KERN_DEBUG " regs[3] = 0x%x/0x%x\n",
507 regs[3], inl(TRID_REG(trident, CH_START + 12)));
508 printk(KERN_DEBUG " regs[4] = 0x%x/0x%x\n",
509 regs[4], inl(TRID_REG(trident, CH_START + 16)));
505#endif 510#endif
506} 511}
507 512
@@ -583,7 +588,7 @@ static void snd_trident_write_vol_reg(struct snd_trident * trident,
583 outb(voice->Vol >> 2, TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC + 2)); 588 outb(voice->Vol >> 2, TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC + 2));
584 break; 589 break;
585 case TRIDENT_DEVICE_ID_SI7018: 590 case TRIDENT_DEVICE_ID_SI7018:
586 // printk("voice->Vol = 0x%x\n", voice->Vol); 591 /* printk(KERN_DEBUG "voice->Vol = 0x%x\n", voice->Vol); */
587 outw((voice->CTRL << 12) | voice->Vol, 592 outw((voice->CTRL << 12) | voice->Vol,
588 TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC)); 593 TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC));
589 break; 594 break;
@@ -3554,8 +3559,8 @@ int __devinit snd_trident_create(struct snd_card *card,
3554 if ((err = pci_enable_device(pci)) < 0) 3559 if ((err = pci_enable_device(pci)) < 0)
3555 return err; 3560 return err;
3556 /* check, if we can restrict PCI DMA transfers to 30 bits */ 3561 /* check, if we can restrict PCI DMA transfers to 30 bits */
3557 if (pci_set_dma_mask(pci, DMA_30BIT_MASK) < 0 || 3562 if (pci_set_dma_mask(pci, DMA_BIT_MASK(30)) < 0 ||
3558 pci_set_consistent_dma_mask(pci, DMA_30BIT_MASK) < 0) { 3563 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(30)) < 0) {
3559 snd_printk(KERN_ERR "architecture does not support 30bit PCI busmaster DMA\n"); 3564 snd_printk(KERN_ERR "architecture does not support 30bit PCI busmaster DMA\n");
3560 pci_disable_device(pci); 3565 pci_disable_device(pci);
3561 return -ENXIO; 3566 return -ENXIO;