Loading sound/pci/au88x0/au88x0.c +16 −17 Original line number Diff line number Diff line Loading @@ -48,11 +48,10 @@ static void vortex_fix_latency(struct pci_dev *vortex) { int rc; if (!(rc = pci_write_config_byte(vortex, 0x40, 0xff))) { pr_info( CARD_NAME ": vortex latency is 0xff\n"); dev_info(&vortex->dev, "vortex latency is 0xff\n"); } else { pr_warn( CARD_NAME ": could not set vortex latency: pci error 0x%x\n", rc); dev_warn(&vortex->dev, "could not set vortex latency: pci error 0x%x\n", rc); } } Loading @@ -70,11 +69,10 @@ static void vortex_fix_agp_bridge(struct pci_dev *via) if (!(rc = pci_read_config_byte(via, 0x42, &value)) && ((value & 0x10) || !(rc = pci_write_config_byte(via, 0x42, value | 0x10)))) { pr_info( CARD_NAME ": bridge config is 0x%x\n", value | 0x10); dev_info(&via->dev, "bridge config is 0x%x\n", value | 0x10); } else { pr_warn( CARD_NAME ": could not set vortex latency: pci error 0x%x\n", rc); dev_warn(&via->dev, "could not set vortex latency: pci error 0x%x\n", rc); } } Loading @@ -97,7 +95,8 @@ static void snd_vortex_workaround(struct pci_dev *vortex, int fix) PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL); } if (via) { pr_info( CARD_NAME ": Activating latency workaround...\n"); dev_info(&vortex->dev, "Activating latency workaround...\n"); vortex_fix_latency(vortex); vortex_fix_agp_bridge(via); } Loading Loading @@ -153,7 +152,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) return err; if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 || pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { pr_err( "error to set DMA mask\n"); dev_err(card->dev, "error to set DMA mask\n"); pci_disable_device(pci); return -ENXIO; } Loading Loading @@ -182,7 +181,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) chip->mmio = pci_ioremap_bar(pci, 0); if (!chip->mmio) { pr_err( "MMIO area remap failed.\n"); dev_err(card->dev, "MMIO area remap failed.\n"); err = -ENOMEM; goto ioremap_out; } Loading @@ -191,14 +190,14 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) * This must be done before we do request_irq otherwise we can get spurious * interrupts that we do not handle properly and make a mess of things */ if ((err = vortex_core_init(chip)) != 0) { pr_err( "hw core init failed\n"); dev_err(card->dev, "hw core init failed\n"); goto core_out; } if ((err = request_irq(pci->irq, vortex_interrupt, IRQF_SHARED, KBUILD_MODNAME, chip)) != 0) { pr_err( "cannot grab irq\n"); dev_err(card->dev, "cannot grab irq\n"); goto irq_out; } chip->irq = pci->irq; Loading Loading @@ -342,11 +341,11 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) chip->rev = pci->revision; #ifdef CHIP_AU8830 if ((chip->rev) != 0xfe && (chip->rev) != 0xfa) { pr_alert( "vortex: The revision (%x) of your card has not been seen before.\n", dev_alert(card->dev, "The revision (%x) of your card has not been seen before.\n", chip->rev); pr_alert( "vortex: Please email the results of 'lspci -vv' to openvortex-dev@nongnu.org.\n"); dev_alert(card->dev, "Please email the results of 'lspci -vv' to openvortex-dev@nongnu.org.\n"); snd_card_free(card); err = -ENODEV; return err; Loading sound/pci/au88x0/au88x0.h +2 −2 Original line number Diff line number Diff line Loading @@ -243,7 +243,7 @@ static int vortex_core_init(vortex_t * card); static int vortex_core_shutdown(vortex_t * card); static void vortex_enable_int(vortex_t * card); static irqreturn_t vortex_interrupt(int irq, void *dev_id); static int vortex_alsafmt_aspfmt(int alsafmt); static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v); /* Connection stuff. */ static void vortex_connect_default(vortex_t * vortex, int en); Loading Loading @@ -278,7 +278,7 @@ static void vortex_mix_setvolumebyte(vortex_t * vortex, unsigned char mix, static void vortex_Vort3D_enable(vortex_t * v); static void vortex_Vort3D_disable(vortex_t * v); static void vortex_Vort3D_connect(vortex_t * vortex, int en); static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en); static void vortex_Vort3D_InitializeSource(a3dsrc_t *a, int en, vortex_t *v); #endif /* Driver stuff. */ Loading sound/pci/au88x0/au88x0_a3d.c +11 −10 Original line number Diff line number Diff line Loading @@ -484,12 +484,13 @@ static void a3dsrc_ZeroState(a3dsrc_t * a) } /* Reset entire A3D engine */ static void a3dsrc_ZeroStateA3D(a3dsrc_t * a) static void a3dsrc_ZeroStateA3D(a3dsrc_t *a, vortex_t *v) { int i, var, var2; if ((a->vortex) == NULL) { pr_err( "vortex: ZeroStateA3D: ERROR: a->vortex is NULL\n"); dev_err(v->card->dev, "ZeroStateA3D: ERROR: a->vortex is NULL\n"); return; } Loading Loading @@ -601,7 +602,7 @@ static void vortex_Vort3D_enable(vortex_t *v) Vort3DRend_Initialize(v, XT_HEADPHONE); for (i = 0; i < NR_A3D; i++) { vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2); a3dsrc_ZeroStateA3D(&(v->a3d[0])); a3dsrc_ZeroStateA3D(&v->a3d[0], v); } /* Register ALSA controls */ vortex_a3d_register_controls(v); Loading @@ -628,15 +629,15 @@ static void vortex_Vort3D_connect(vortex_t * v, int en) v->mixxtlk[0] = vortex_adb_checkinout(v, v->fixed_res, en, VORTEX_RESOURCE_MIXIN); if (v->mixxtlk[0] < 0) { pr_warn ("vortex: vortex_Vort3D: ERROR: not enough free mixer resources.\n"); dev_warn(v->card->dev, "vortex_Vort3D: ERROR: not enough free mixer resources.\n"); return; } v->mixxtlk[1] = vortex_adb_checkinout(v, v->fixed_res, en, VORTEX_RESOURCE_MIXIN); if (v->mixxtlk[1] < 0) { pr_warn ("vortex: vortex_Vort3D: ERROR: not enough free mixer resources.\n"); dev_warn(v->card->dev, "vortex_Vort3D: ERROR: not enough free mixer resources.\n"); return; } #endif Loading Loading @@ -676,11 +677,11 @@ static void vortex_Vort3D_connect(vortex_t * v, int en) } /* Initialize one single A3D source. */ static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en) static void vortex_Vort3D_InitializeSource(a3dsrc_t *a, int en, vortex_t *v) { if (a->vortex == NULL) { pr_warn ("vortex: Vort3D_InitializeSource: A3D source not initialized\n"); dev_warn(v->card->dev, "Vort3D_InitializeSource: A3D source not initialized\n"); return; } if (en) { Loading sound/pci/au88x0/au88x0_core.c +55 −47 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ vortex_mixer_addWTD(vortex_t * vortex, unsigned char mix, unsigned char ch) temp = hwread(vortex->mmio, prev); //printk(KERN_INFO "vortex: mixAddWTD: while addr=%x, val=%x\n", prev, temp); if ((++lifeboat) > 0xf) { pr_err( dev_err(vortex->card->dev, "vortex_mixer_addWTD: lifeboat overflow\n"); return 0; } Loading @@ -303,7 +303,7 @@ vortex_mixer_delWTD(vortex_t * vortex, unsigned char mix, unsigned char ch) eax = hwread(vortex->mmio, VORTEX_MIXER_SR); if (((1 << ch) & eax) == 0) { pr_err( "mix ALARM %x\n", eax); dev_err(vortex->card->dev, "mix ALARM %x\n", eax); return 0; } ebp = VORTEX_MIXER_CHNBASE + (ch << 2); Loading @@ -324,8 +324,8 @@ vortex_mixer_delWTD(vortex_t * vortex, unsigned char mix, unsigned char ch) //printk(KERN_INFO "vortex: mixdelWTD: 1 addr=%x, val=%x, src=%x\n", ebx, edx, src); while ((edx & 0xf) != mix) { if ((esi) > 0xf) { pr_err( "vortex: mixdelWTD: error lifeboat overflow\n"); dev_err(vortex->card->dev, "mixdelWTD: error lifeboat overflow\n"); return 0; } esp14 = ebx; Loading Loading @@ -492,7 +492,7 @@ vortex_src_persist_convratio(vortex_t * vortex, unsigned char src, int ratio) hwwrite(vortex->mmio, VORTEX_SRC_CONVRATIO + (src << 2), ratio); temp = hwread(vortex->mmio, VORTEX_SRC_CONVRATIO + (src << 2)); if ((++lifeboat) > 0x9) { pr_err( "Vortex: Src cvr fail\n"); dev_err(vortex->card->dev, "Src cvr fail\n"); break; } } Loading Loading @@ -684,7 +684,7 @@ vortex_src_addWTD(vortex_t * vortex, unsigned char src, unsigned char ch) temp = hwread(vortex->mmio, prev); //printk(KERN_INFO "vortex: srcAddWTD: while addr=%x, val=%x\n", prev, temp); if ((++lifeboat) > 0xf) { pr_err( dev_err(vortex->card->dev, "vortex_src_addWTD: lifeboat overflow\n"); return 0; } Loading @@ -703,7 +703,7 @@ vortex_src_delWTD(vortex_t * vortex, unsigned char src, unsigned char ch) eax = hwread(vortex->mmio, VORTEX_SRCBLOCK_SR); if (((1 << ch) & eax) == 0) { pr_err( "src alarm\n"); dev_err(vortex->card->dev, "src alarm\n"); return 0; } ebp = VORTEX_SRC_CHNBASE + (ch << 2); Loading @@ -724,8 +724,8 @@ vortex_src_delWTD(vortex_t * vortex, unsigned char src, unsigned char ch) //printk(KERN_INFO "vortex: srcdelWTD: 1 addr=%x, val=%x, src=%x\n", ebx, edx, src); while ((edx & 0xf) != src) { if ((esi) > 0xf) { pr_warn ("vortex: srcdelWTD: error, lifeboat overflow\n"); dev_warn(vortex->card->dev, "srcdelWTD: error, lifeboat overflow\n"); return 0; } esp14 = ebx; Loading Loading @@ -819,8 +819,8 @@ vortex_fifo_setadbctrl(vortex_t * vortex, int fifo, int stereo, int priority, do { temp = hwread(vortex->mmio, VORTEX_FIFO_ADBCTRL + (fifo << 2)); if (lifeboat++ > 0xbb8) { pr_err( "Vortex: vortex_fifo_setadbctrl fail\n"); dev_err(vortex->card->dev, "vortex_fifo_setadbctrl fail\n"); break; } } Loading Loading @@ -915,7 +915,8 @@ vortex_fifo_setwtctrl(vortex_t * vortex, int fifo, int ctrl, int priority, do { temp = hwread(vortex->mmio, VORTEX_FIFO_WTCTRL + (fifo << 2)); if (lifeboat++ > 0xbb8) { pr_err( "Vortex: vortex_fifo_setwtctrl fail\n"); dev_err(vortex->card->dev, "vortex_fifo_setwtctrl fail\n"); break; } } Loading Loading @@ -1042,7 +1043,7 @@ static void vortex_fifo_init(vortex_t * vortex) for (x = NR_ADB - 1; x >= 0; x--) { hwwrite(vortex->mmio, addr, (FIFO_U0 | FIFO_U1)); if (hwread(vortex->mmio, addr) != (FIFO_U0 | FIFO_U1)) pr_err( "bad adb fifo reset!"); dev_err(vortex->card->dev, "bad adb fifo reset!"); vortex_fifo_clearadbdata(vortex, x, FIFO_SIZE); addr -= 4; } Loading @@ -1053,7 +1054,7 @@ static void vortex_fifo_init(vortex_t * vortex) for (x = NR_WT - 1; x >= 0; x--) { hwwrite(vortex->mmio, addr, FIFO_U0); if (hwread(vortex->mmio, addr) != FIFO_U0) pr_err( dev_err(vortex->card->dev, "bad wt fifo reset (0x%08x, 0x%08x)!\n", addr, hwread(vortex->mmio, addr)); vortex_fifo_clearwtdata(vortex, x, FIFO_SIZE); Loading Loading @@ -1213,7 +1214,8 @@ static int vortex_adbdma_bufshift(vortex_t * vortex, int adbdma) if (dma->period_virt >= dma->nr_periods) dma->period_virt -= dma->nr_periods; if (delta != 1) pr_info( "vortex: %d virt=%d, real=%d, delta=%d\n", dev_info(vortex->card->dev, "%d virt=%d, real=%d, delta=%d\n", adbdma, dma->period_virt, dma->period_real, delta); return delta; Loading Loading @@ -1482,7 +1484,7 @@ static int vortex_wtdma_bufshift(vortex_t * vortex, int wtdma) dma->period_real = page; if (delta != 1) pr_warn( "vortex: wt virt = %d, delta = %d\n", dev_warn(vortex->card->dev, "wt virt = %d, delta = %d\n", dma->period_virt, delta); return delta; Loading Loading @@ -1667,7 +1669,7 @@ vortex_adb_addroutes(vortex_t * vortex, unsigned char channel, hwread(vortex->mmio, VORTEX_ADB_RTBASE + (temp << 2)) & ADB_MASK; if ((lifeboat++) > ADB_MASK) { pr_err( dev_err(vortex->card->dev, "vortex_adb_addroutes: unending route! 0x%x\n", *route); return; Loading Loading @@ -1703,7 +1705,7 @@ vortex_adb_delroutes(vortex_t * vortex, unsigned char channel, hwread(vortex->mmio, VORTEX_ADB_RTBASE + (prev << 2)) & ADB_MASK; if (((lifeboat++) > ADB_MASK) || (temp == ADB_MASK)) { pr_err( dev_err(vortex->card->dev, "vortex_adb_delroutes: route not found! 0x%x\n", route0); return; Loading Loading @@ -2045,7 +2047,9 @@ vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out, int restype) } } } pr_err( "vortex: FATAL: ResManager: resource type %d exhausted.\n", restype); dev_err(vortex->card->dev, "FATAL: ResManager: resource type %d exhausted.\n", restype); return -ENOMEM; } Loading Loading @@ -2173,11 +2177,13 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir, memset(stream->resources, 0, sizeof(unsigned char) * VORTEX_RESOURCE_LAST); pr_err( "vortex: out of A3D sources. Sorry\n"); dev_err(vortex->card->dev, "out of A3D sources. Sorry\n"); return -EBUSY; } /* (De)Initialize A3D hardware source. */ vortex_Vort3D_InitializeSource(&(vortex->a3d[a3d]), en); vortex_Vort3D_InitializeSource(&vortex->a3d[a3d], en, vortex); } /* Make SPDIF out exclusive to "spdif" device when in use. */ if ((stream->type == VORTEX_PCM_SPDIF) && (en)) { Loading Loading @@ -2421,7 +2427,7 @@ static irqreturn_t vortex_interrupt(int irq, void *dev_id) hwread(vortex->mmio, VORTEX_IRQ_SOURCE); // Is at least one IRQ flag set? if (source == 0) { pr_err( "vortex: missing irq source\n"); dev_err(vortex->card->dev, "missing irq source\n"); return IRQ_NONE; } Loading @@ -2429,19 +2435,19 @@ static irqreturn_t vortex_interrupt(int irq, void *dev_id) // Attend every interrupt source. if (unlikely(source & IRQ_ERR_MASK)) { if (source & IRQ_FATAL) { pr_err( "vortex: IRQ fatal error\n"); dev_err(vortex->card->dev, "IRQ fatal error\n"); } if (source & IRQ_PARITY) { pr_err( "vortex: IRQ parity error\n"); dev_err(vortex->card->dev, "IRQ parity error\n"); } if (source & IRQ_REG) { pr_err( "vortex: IRQ reg error\n"); dev_err(vortex->card->dev, "IRQ reg error\n"); } if (source & IRQ_FIFO) { pr_err( "vortex: IRQ fifo error\n"); dev_err(vortex->card->dev, "IRQ fifo error\n"); } if (source & IRQ_DMA) { pr_err( "vortex: IRQ dma error\n"); dev_err(vortex->card->dev, "IRQ dma error\n"); } handled = 1; } Loading Loading @@ -2489,7 +2495,7 @@ static irqreturn_t vortex_interrupt(int irq, void *dev_id) } if (!handled) { pr_err( "vortex: unknown irq source %x\n", source); dev_err(vortex->card->dev, "unknown irq source %x\n", source); } return IRQ_RETVAL(handled); } Loading Loading @@ -2546,7 +2552,7 @@ vortex_codec_write(struct snd_ac97 * codec, unsigned short addr, unsigned short while (!(hwread(card->mmio, VORTEX_CODEC_CTRL) & 0x100)) { udelay(100); if (lifeboat++ > POLL_COUNT) { pr_err( "vortex: ac97 codec stuck busy\n"); dev_err(card->card->dev, "ac97 codec stuck busy\n"); return; } } Loading @@ -2572,7 +2578,7 @@ static unsigned short vortex_codec_read(struct snd_ac97 * codec, unsigned short while (!(hwread(card->mmio, VORTEX_CODEC_CTRL) & 0x100)) { udelay(100); if (lifeboat++ > POLL_COUNT) { pr_err( "vortex: ac97 codec stuck busy\n"); dev_err(card->card->dev, "ac97 codec stuck busy\n"); return 0xffff; } } Loading @@ -2586,7 +2592,8 @@ static unsigned short vortex_codec_read(struct snd_ac97 * codec, unsigned short udelay(100); data = hwread(card->mmio, VORTEX_CODEC_IO); if (lifeboat++ > POLL_COUNT) { pr_err( "vortex: ac97 address never arrived\n"); dev_err(card->card->dev, "ac97 address never arrived\n"); return 0xffff; } } while ((data & VORTEX_CODEC_ADDMASK) != Loading Loading @@ -2683,7 +2690,7 @@ static void vortex_spdif_init(vortex_t * vortex, int spdif_sr, int spdif_mode) static int vortex_core_init(vortex_t *vortex) { pr_info( "Vortex: init.... "); dev_info(vortex->card->dev, "init started\n"); /* Hardware Init. */ hwwrite(vortex->mmio, VORTEX_CTRL, 0xffffffff); msleep(5); Loading Loading @@ -2728,7 +2735,7 @@ static int vortex_core_init(vortex_t *vortex) //vortex_enable_timer_int(vortex); //vortex_disable_timer_int(vortex); pr_info( "done.\n"); dev_info(vortex->card->dev, "init.... done.\n"); spin_lock_init(&vortex->lock); return 0; Loading @@ -2737,7 +2744,7 @@ static int vortex_core_init(vortex_t *vortex) static int vortex_core_shutdown(vortex_t * vortex) { pr_info( "Vortex: shutdown..."); dev_info(vortex->card->dev, "shutdown started\n"); #ifndef CHIP_AU8820 vortex_eq_free(vortex); vortex_Vort3D_disable(vortex); Loading @@ -2759,13 +2766,13 @@ static int vortex_core_shutdown(vortex_t * vortex) msleep(5); hwwrite(vortex->mmio, VORTEX_IRQ_SOURCE, 0xffff); pr_info( "done.\n"); dev_info(vortex->card->dev, "shutdown.... done.\n"); return 0; } /* Alsa support. */ static int vortex_alsafmt_aspfmt(int alsafmt) static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v) { int fmt; Loading Loading @@ -2793,7 +2800,8 @@ static int vortex_alsafmt_aspfmt(int alsafmt) break; default: fmt = 0x8; pr_err( "vortex: format unsupported %d\n", alsafmt); dev_err(v->card->dev, "format unsupported %d\n", alsafmt); break; } return fmt; Loading sound/pci/au88x0/au88x0_eq.c +2 −1 Original line number Diff line number Diff line Loading @@ -845,7 +845,8 @@ snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *u vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count); if (count != 20) { pr_err( "vortex: peak count error 20 != %d \n", count); dev_err(vortex->card->dev, "peak count error 20 != %d\n", count); return -1; } for (i = 0; i < 20; i++) Loading Loading
sound/pci/au88x0/au88x0.c +16 −17 Original line number Diff line number Diff line Loading @@ -48,11 +48,10 @@ static void vortex_fix_latency(struct pci_dev *vortex) { int rc; if (!(rc = pci_write_config_byte(vortex, 0x40, 0xff))) { pr_info( CARD_NAME ": vortex latency is 0xff\n"); dev_info(&vortex->dev, "vortex latency is 0xff\n"); } else { pr_warn( CARD_NAME ": could not set vortex latency: pci error 0x%x\n", rc); dev_warn(&vortex->dev, "could not set vortex latency: pci error 0x%x\n", rc); } } Loading @@ -70,11 +69,10 @@ static void vortex_fix_agp_bridge(struct pci_dev *via) if (!(rc = pci_read_config_byte(via, 0x42, &value)) && ((value & 0x10) || !(rc = pci_write_config_byte(via, 0x42, value | 0x10)))) { pr_info( CARD_NAME ": bridge config is 0x%x\n", value | 0x10); dev_info(&via->dev, "bridge config is 0x%x\n", value | 0x10); } else { pr_warn( CARD_NAME ": could not set vortex latency: pci error 0x%x\n", rc); dev_warn(&via->dev, "could not set vortex latency: pci error 0x%x\n", rc); } } Loading @@ -97,7 +95,8 @@ static void snd_vortex_workaround(struct pci_dev *vortex, int fix) PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL); } if (via) { pr_info( CARD_NAME ": Activating latency workaround...\n"); dev_info(&vortex->dev, "Activating latency workaround...\n"); vortex_fix_latency(vortex); vortex_fix_agp_bridge(via); } Loading Loading @@ -153,7 +152,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) return err; if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 || pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { pr_err( "error to set DMA mask\n"); dev_err(card->dev, "error to set DMA mask\n"); pci_disable_device(pci); return -ENXIO; } Loading Loading @@ -182,7 +181,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) chip->mmio = pci_ioremap_bar(pci, 0); if (!chip->mmio) { pr_err( "MMIO area remap failed.\n"); dev_err(card->dev, "MMIO area remap failed.\n"); err = -ENOMEM; goto ioremap_out; } Loading @@ -191,14 +190,14 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) * This must be done before we do request_irq otherwise we can get spurious * interrupts that we do not handle properly and make a mess of things */ if ((err = vortex_core_init(chip)) != 0) { pr_err( "hw core init failed\n"); dev_err(card->dev, "hw core init failed\n"); goto core_out; } if ((err = request_irq(pci->irq, vortex_interrupt, IRQF_SHARED, KBUILD_MODNAME, chip)) != 0) { pr_err( "cannot grab irq\n"); dev_err(card->dev, "cannot grab irq\n"); goto irq_out; } chip->irq = pci->irq; Loading Loading @@ -342,11 +341,11 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) chip->rev = pci->revision; #ifdef CHIP_AU8830 if ((chip->rev) != 0xfe && (chip->rev) != 0xfa) { pr_alert( "vortex: The revision (%x) of your card has not been seen before.\n", dev_alert(card->dev, "The revision (%x) of your card has not been seen before.\n", chip->rev); pr_alert( "vortex: Please email the results of 'lspci -vv' to openvortex-dev@nongnu.org.\n"); dev_alert(card->dev, "Please email the results of 'lspci -vv' to openvortex-dev@nongnu.org.\n"); snd_card_free(card); err = -ENODEV; return err; Loading
sound/pci/au88x0/au88x0.h +2 −2 Original line number Diff line number Diff line Loading @@ -243,7 +243,7 @@ static int vortex_core_init(vortex_t * card); static int vortex_core_shutdown(vortex_t * card); static void vortex_enable_int(vortex_t * card); static irqreturn_t vortex_interrupt(int irq, void *dev_id); static int vortex_alsafmt_aspfmt(int alsafmt); static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v); /* Connection stuff. */ static void vortex_connect_default(vortex_t * vortex, int en); Loading Loading @@ -278,7 +278,7 @@ static void vortex_mix_setvolumebyte(vortex_t * vortex, unsigned char mix, static void vortex_Vort3D_enable(vortex_t * v); static void vortex_Vort3D_disable(vortex_t * v); static void vortex_Vort3D_connect(vortex_t * vortex, int en); static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en); static void vortex_Vort3D_InitializeSource(a3dsrc_t *a, int en, vortex_t *v); #endif /* Driver stuff. */ Loading
sound/pci/au88x0/au88x0_a3d.c +11 −10 Original line number Diff line number Diff line Loading @@ -484,12 +484,13 @@ static void a3dsrc_ZeroState(a3dsrc_t * a) } /* Reset entire A3D engine */ static void a3dsrc_ZeroStateA3D(a3dsrc_t * a) static void a3dsrc_ZeroStateA3D(a3dsrc_t *a, vortex_t *v) { int i, var, var2; if ((a->vortex) == NULL) { pr_err( "vortex: ZeroStateA3D: ERROR: a->vortex is NULL\n"); dev_err(v->card->dev, "ZeroStateA3D: ERROR: a->vortex is NULL\n"); return; } Loading Loading @@ -601,7 +602,7 @@ static void vortex_Vort3D_enable(vortex_t *v) Vort3DRend_Initialize(v, XT_HEADPHONE); for (i = 0; i < NR_A3D; i++) { vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2); a3dsrc_ZeroStateA3D(&(v->a3d[0])); a3dsrc_ZeroStateA3D(&v->a3d[0], v); } /* Register ALSA controls */ vortex_a3d_register_controls(v); Loading @@ -628,15 +629,15 @@ static void vortex_Vort3D_connect(vortex_t * v, int en) v->mixxtlk[0] = vortex_adb_checkinout(v, v->fixed_res, en, VORTEX_RESOURCE_MIXIN); if (v->mixxtlk[0] < 0) { pr_warn ("vortex: vortex_Vort3D: ERROR: not enough free mixer resources.\n"); dev_warn(v->card->dev, "vortex_Vort3D: ERROR: not enough free mixer resources.\n"); return; } v->mixxtlk[1] = vortex_adb_checkinout(v, v->fixed_res, en, VORTEX_RESOURCE_MIXIN); if (v->mixxtlk[1] < 0) { pr_warn ("vortex: vortex_Vort3D: ERROR: not enough free mixer resources.\n"); dev_warn(v->card->dev, "vortex_Vort3D: ERROR: not enough free mixer resources.\n"); return; } #endif Loading Loading @@ -676,11 +677,11 @@ static void vortex_Vort3D_connect(vortex_t * v, int en) } /* Initialize one single A3D source. */ static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en) static void vortex_Vort3D_InitializeSource(a3dsrc_t *a, int en, vortex_t *v) { if (a->vortex == NULL) { pr_warn ("vortex: Vort3D_InitializeSource: A3D source not initialized\n"); dev_warn(v->card->dev, "Vort3D_InitializeSource: A3D source not initialized\n"); return; } if (en) { Loading
sound/pci/au88x0/au88x0_core.c +55 −47 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ vortex_mixer_addWTD(vortex_t * vortex, unsigned char mix, unsigned char ch) temp = hwread(vortex->mmio, prev); //printk(KERN_INFO "vortex: mixAddWTD: while addr=%x, val=%x\n", prev, temp); if ((++lifeboat) > 0xf) { pr_err( dev_err(vortex->card->dev, "vortex_mixer_addWTD: lifeboat overflow\n"); return 0; } Loading @@ -303,7 +303,7 @@ vortex_mixer_delWTD(vortex_t * vortex, unsigned char mix, unsigned char ch) eax = hwread(vortex->mmio, VORTEX_MIXER_SR); if (((1 << ch) & eax) == 0) { pr_err( "mix ALARM %x\n", eax); dev_err(vortex->card->dev, "mix ALARM %x\n", eax); return 0; } ebp = VORTEX_MIXER_CHNBASE + (ch << 2); Loading @@ -324,8 +324,8 @@ vortex_mixer_delWTD(vortex_t * vortex, unsigned char mix, unsigned char ch) //printk(KERN_INFO "vortex: mixdelWTD: 1 addr=%x, val=%x, src=%x\n", ebx, edx, src); while ((edx & 0xf) != mix) { if ((esi) > 0xf) { pr_err( "vortex: mixdelWTD: error lifeboat overflow\n"); dev_err(vortex->card->dev, "mixdelWTD: error lifeboat overflow\n"); return 0; } esp14 = ebx; Loading Loading @@ -492,7 +492,7 @@ vortex_src_persist_convratio(vortex_t * vortex, unsigned char src, int ratio) hwwrite(vortex->mmio, VORTEX_SRC_CONVRATIO + (src << 2), ratio); temp = hwread(vortex->mmio, VORTEX_SRC_CONVRATIO + (src << 2)); if ((++lifeboat) > 0x9) { pr_err( "Vortex: Src cvr fail\n"); dev_err(vortex->card->dev, "Src cvr fail\n"); break; } } Loading Loading @@ -684,7 +684,7 @@ vortex_src_addWTD(vortex_t * vortex, unsigned char src, unsigned char ch) temp = hwread(vortex->mmio, prev); //printk(KERN_INFO "vortex: srcAddWTD: while addr=%x, val=%x\n", prev, temp); if ((++lifeboat) > 0xf) { pr_err( dev_err(vortex->card->dev, "vortex_src_addWTD: lifeboat overflow\n"); return 0; } Loading @@ -703,7 +703,7 @@ vortex_src_delWTD(vortex_t * vortex, unsigned char src, unsigned char ch) eax = hwread(vortex->mmio, VORTEX_SRCBLOCK_SR); if (((1 << ch) & eax) == 0) { pr_err( "src alarm\n"); dev_err(vortex->card->dev, "src alarm\n"); return 0; } ebp = VORTEX_SRC_CHNBASE + (ch << 2); Loading @@ -724,8 +724,8 @@ vortex_src_delWTD(vortex_t * vortex, unsigned char src, unsigned char ch) //printk(KERN_INFO "vortex: srcdelWTD: 1 addr=%x, val=%x, src=%x\n", ebx, edx, src); while ((edx & 0xf) != src) { if ((esi) > 0xf) { pr_warn ("vortex: srcdelWTD: error, lifeboat overflow\n"); dev_warn(vortex->card->dev, "srcdelWTD: error, lifeboat overflow\n"); return 0; } esp14 = ebx; Loading Loading @@ -819,8 +819,8 @@ vortex_fifo_setadbctrl(vortex_t * vortex, int fifo, int stereo, int priority, do { temp = hwread(vortex->mmio, VORTEX_FIFO_ADBCTRL + (fifo << 2)); if (lifeboat++ > 0xbb8) { pr_err( "Vortex: vortex_fifo_setadbctrl fail\n"); dev_err(vortex->card->dev, "vortex_fifo_setadbctrl fail\n"); break; } } Loading Loading @@ -915,7 +915,8 @@ vortex_fifo_setwtctrl(vortex_t * vortex, int fifo, int ctrl, int priority, do { temp = hwread(vortex->mmio, VORTEX_FIFO_WTCTRL + (fifo << 2)); if (lifeboat++ > 0xbb8) { pr_err( "Vortex: vortex_fifo_setwtctrl fail\n"); dev_err(vortex->card->dev, "vortex_fifo_setwtctrl fail\n"); break; } } Loading Loading @@ -1042,7 +1043,7 @@ static void vortex_fifo_init(vortex_t * vortex) for (x = NR_ADB - 1; x >= 0; x--) { hwwrite(vortex->mmio, addr, (FIFO_U0 | FIFO_U1)); if (hwread(vortex->mmio, addr) != (FIFO_U0 | FIFO_U1)) pr_err( "bad adb fifo reset!"); dev_err(vortex->card->dev, "bad adb fifo reset!"); vortex_fifo_clearadbdata(vortex, x, FIFO_SIZE); addr -= 4; } Loading @@ -1053,7 +1054,7 @@ static void vortex_fifo_init(vortex_t * vortex) for (x = NR_WT - 1; x >= 0; x--) { hwwrite(vortex->mmio, addr, FIFO_U0); if (hwread(vortex->mmio, addr) != FIFO_U0) pr_err( dev_err(vortex->card->dev, "bad wt fifo reset (0x%08x, 0x%08x)!\n", addr, hwread(vortex->mmio, addr)); vortex_fifo_clearwtdata(vortex, x, FIFO_SIZE); Loading Loading @@ -1213,7 +1214,8 @@ static int vortex_adbdma_bufshift(vortex_t * vortex, int adbdma) if (dma->period_virt >= dma->nr_periods) dma->period_virt -= dma->nr_periods; if (delta != 1) pr_info( "vortex: %d virt=%d, real=%d, delta=%d\n", dev_info(vortex->card->dev, "%d virt=%d, real=%d, delta=%d\n", adbdma, dma->period_virt, dma->period_real, delta); return delta; Loading Loading @@ -1482,7 +1484,7 @@ static int vortex_wtdma_bufshift(vortex_t * vortex, int wtdma) dma->period_real = page; if (delta != 1) pr_warn( "vortex: wt virt = %d, delta = %d\n", dev_warn(vortex->card->dev, "wt virt = %d, delta = %d\n", dma->period_virt, delta); return delta; Loading Loading @@ -1667,7 +1669,7 @@ vortex_adb_addroutes(vortex_t * vortex, unsigned char channel, hwread(vortex->mmio, VORTEX_ADB_RTBASE + (temp << 2)) & ADB_MASK; if ((lifeboat++) > ADB_MASK) { pr_err( dev_err(vortex->card->dev, "vortex_adb_addroutes: unending route! 0x%x\n", *route); return; Loading Loading @@ -1703,7 +1705,7 @@ vortex_adb_delroutes(vortex_t * vortex, unsigned char channel, hwread(vortex->mmio, VORTEX_ADB_RTBASE + (prev << 2)) & ADB_MASK; if (((lifeboat++) > ADB_MASK) || (temp == ADB_MASK)) { pr_err( dev_err(vortex->card->dev, "vortex_adb_delroutes: route not found! 0x%x\n", route0); return; Loading Loading @@ -2045,7 +2047,9 @@ vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out, int restype) } } } pr_err( "vortex: FATAL: ResManager: resource type %d exhausted.\n", restype); dev_err(vortex->card->dev, "FATAL: ResManager: resource type %d exhausted.\n", restype); return -ENOMEM; } Loading Loading @@ -2173,11 +2177,13 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir, memset(stream->resources, 0, sizeof(unsigned char) * VORTEX_RESOURCE_LAST); pr_err( "vortex: out of A3D sources. Sorry\n"); dev_err(vortex->card->dev, "out of A3D sources. Sorry\n"); return -EBUSY; } /* (De)Initialize A3D hardware source. */ vortex_Vort3D_InitializeSource(&(vortex->a3d[a3d]), en); vortex_Vort3D_InitializeSource(&vortex->a3d[a3d], en, vortex); } /* Make SPDIF out exclusive to "spdif" device when in use. */ if ((stream->type == VORTEX_PCM_SPDIF) && (en)) { Loading Loading @@ -2421,7 +2427,7 @@ static irqreturn_t vortex_interrupt(int irq, void *dev_id) hwread(vortex->mmio, VORTEX_IRQ_SOURCE); // Is at least one IRQ flag set? if (source == 0) { pr_err( "vortex: missing irq source\n"); dev_err(vortex->card->dev, "missing irq source\n"); return IRQ_NONE; } Loading @@ -2429,19 +2435,19 @@ static irqreturn_t vortex_interrupt(int irq, void *dev_id) // Attend every interrupt source. if (unlikely(source & IRQ_ERR_MASK)) { if (source & IRQ_FATAL) { pr_err( "vortex: IRQ fatal error\n"); dev_err(vortex->card->dev, "IRQ fatal error\n"); } if (source & IRQ_PARITY) { pr_err( "vortex: IRQ parity error\n"); dev_err(vortex->card->dev, "IRQ parity error\n"); } if (source & IRQ_REG) { pr_err( "vortex: IRQ reg error\n"); dev_err(vortex->card->dev, "IRQ reg error\n"); } if (source & IRQ_FIFO) { pr_err( "vortex: IRQ fifo error\n"); dev_err(vortex->card->dev, "IRQ fifo error\n"); } if (source & IRQ_DMA) { pr_err( "vortex: IRQ dma error\n"); dev_err(vortex->card->dev, "IRQ dma error\n"); } handled = 1; } Loading Loading @@ -2489,7 +2495,7 @@ static irqreturn_t vortex_interrupt(int irq, void *dev_id) } if (!handled) { pr_err( "vortex: unknown irq source %x\n", source); dev_err(vortex->card->dev, "unknown irq source %x\n", source); } return IRQ_RETVAL(handled); } Loading Loading @@ -2546,7 +2552,7 @@ vortex_codec_write(struct snd_ac97 * codec, unsigned short addr, unsigned short while (!(hwread(card->mmio, VORTEX_CODEC_CTRL) & 0x100)) { udelay(100); if (lifeboat++ > POLL_COUNT) { pr_err( "vortex: ac97 codec stuck busy\n"); dev_err(card->card->dev, "ac97 codec stuck busy\n"); return; } } Loading @@ -2572,7 +2578,7 @@ static unsigned short vortex_codec_read(struct snd_ac97 * codec, unsigned short while (!(hwread(card->mmio, VORTEX_CODEC_CTRL) & 0x100)) { udelay(100); if (lifeboat++ > POLL_COUNT) { pr_err( "vortex: ac97 codec stuck busy\n"); dev_err(card->card->dev, "ac97 codec stuck busy\n"); return 0xffff; } } Loading @@ -2586,7 +2592,8 @@ static unsigned short vortex_codec_read(struct snd_ac97 * codec, unsigned short udelay(100); data = hwread(card->mmio, VORTEX_CODEC_IO); if (lifeboat++ > POLL_COUNT) { pr_err( "vortex: ac97 address never arrived\n"); dev_err(card->card->dev, "ac97 address never arrived\n"); return 0xffff; } } while ((data & VORTEX_CODEC_ADDMASK) != Loading Loading @@ -2683,7 +2690,7 @@ static void vortex_spdif_init(vortex_t * vortex, int spdif_sr, int spdif_mode) static int vortex_core_init(vortex_t *vortex) { pr_info( "Vortex: init.... "); dev_info(vortex->card->dev, "init started\n"); /* Hardware Init. */ hwwrite(vortex->mmio, VORTEX_CTRL, 0xffffffff); msleep(5); Loading Loading @@ -2728,7 +2735,7 @@ static int vortex_core_init(vortex_t *vortex) //vortex_enable_timer_int(vortex); //vortex_disable_timer_int(vortex); pr_info( "done.\n"); dev_info(vortex->card->dev, "init.... done.\n"); spin_lock_init(&vortex->lock); return 0; Loading @@ -2737,7 +2744,7 @@ static int vortex_core_init(vortex_t *vortex) static int vortex_core_shutdown(vortex_t * vortex) { pr_info( "Vortex: shutdown..."); dev_info(vortex->card->dev, "shutdown started\n"); #ifndef CHIP_AU8820 vortex_eq_free(vortex); vortex_Vort3D_disable(vortex); Loading @@ -2759,13 +2766,13 @@ static int vortex_core_shutdown(vortex_t * vortex) msleep(5); hwwrite(vortex->mmio, VORTEX_IRQ_SOURCE, 0xffff); pr_info( "done.\n"); dev_info(vortex->card->dev, "shutdown.... done.\n"); return 0; } /* Alsa support. */ static int vortex_alsafmt_aspfmt(int alsafmt) static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v) { int fmt; Loading Loading @@ -2793,7 +2800,8 @@ static int vortex_alsafmt_aspfmt(int alsafmt) break; default: fmt = 0x8; pr_err( "vortex: format unsupported %d\n", alsafmt); dev_err(v->card->dev, "format unsupported %d\n", alsafmt); break; } return fmt; Loading
sound/pci/au88x0/au88x0_eq.c +2 −1 Original line number Diff line number Diff line Loading @@ -845,7 +845,8 @@ snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *u vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count); if (count != 20) { pr_err( "vortex: peak count error 20 != %d \n", count); dev_err(vortex->card->dev, "peak count error 20 != %d\n", count); return -1; } for (i = 0; i < 20; i++) Loading