Deleted Added
full compact
neomagic.c (119853) neomagic.c (126695)
1/*
2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
3 * All rights reserved.
4 *
5 * Derived from the public domain Linux driver
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 20 unchanged lines hidden (view full) ---

29#include <dev/sound/pcm/sound.h>
30#include <dev/sound/pcm/ac97.h>
31#include <dev/sound/pci/neomagic.h>
32#include <dev/sound/pci/neomagic-coeff.h>
33
34#include <dev/pci/pcireg.h>
35#include <dev/pci/pcivar.h>
36
1/*
2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
3 * All rights reserved.
4 *
5 * Derived from the public domain Linux driver
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 20 unchanged lines hidden (view full) ---

29#include <dev/sound/pcm/sound.h>
30#include <dev/sound/pcm/ac97.h>
31#include <dev/sound/pci/neomagic.h>
32#include <dev/sound/pci/neomagic-coeff.h>
33
34#include <dev/pci/pcireg.h>
35#include <dev/pci/pcivar.h>
36
37SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/neomagic.c 119853 2003-09-07 16:28:03Z cg $");
37SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/neomagic.c 126695 2004-03-06 15:52:42Z matk $");
38
39/* -------------------------------------------------------------------- */
40
41#define NM_BUFFSIZE 16384
42
43#define NM256AV_PCI_ID 0x800510c8
44#define NM256ZX_PCI_ID 0x800610c8
45

--- 653 unchanged lines hidden (view full) ---

699 sc->irqid = 0;
700 sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
701 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
702 if (!sc->irq || snd_setup_intr(dev, sc->irq, 0, nm_intr, sc, &sc->ih)) {
703 device_printf(dev, "unable to map interrupt\n");
704 goto bad;
705 }
706
38
39/* -------------------------------------------------------------------- */
40
41#define NM_BUFFSIZE 16384
42
43#define NM256AV_PCI_ID 0x800510c8
44#define NM256ZX_PCI_ID 0x800610c8
45

--- 653 unchanged lines hidden (view full) ---

699 sc->irqid = 0;
700 sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
701 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
702 if (!sc->irq || snd_setup_intr(dev, sc->irq, 0, nm_intr, sc, &sc->ih)) {
703 device_printf(dev, "unable to map interrupt\n");
704 goto bad;
705 }
706
707 snprintf(status, SND_STATUSLEN, "at memory 0x%lx, 0x%lx irq %ld",
707 snprintf(status, SND_STATUSLEN, "at memory 0x%lx, 0x%lx irq %ld %s",
708 rman_get_start(sc->buf), rman_get_start(sc->reg),
708 rman_get_start(sc->buf), rman_get_start(sc->reg),
709 rman_get_start(sc->irq));
709 rman_get_start(sc->irq),PCM_KLDSTRING(snd_neomagic));
710
711 if (pcm_register(dev, sc, 1, 1)) goto bad;
712 pcm_addchan(dev, PCMDIR_REC, &nmchan_class, sc);
713 pcm_addchan(dev, PCMDIR_PLAY, &nmchan_class, sc);
714 pcm_setstatus(dev, status);
715
716 return 0;
717

--- 105 unchanged lines hidden ---
710
711 if (pcm_register(dev, sc, 1, 1)) goto bad;
712 pcm_addchan(dev, PCMDIR_REC, &nmchan_class, sc);
713 pcm_addchan(dev, PCMDIR_PLAY, &nmchan_class, sc);
714 pcm_setstatus(dev, status);
715
716 return 0;
717

--- 105 unchanged lines hidden ---