Deleted Added
full compact
es137x.c (170521) es137x.c (170721)
1/*-
2 * Support the ENSONIQ AudioPCI board and Creative Labs SoundBlaster PCI
3 * boards based on the ES1370, ES1371 and ES1373 chips.
4 *
5 * Copyright (c) 1999 Russell Cattelan <cattelan@thebarn.com>
6 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
7 * Copyright (c) 1998 by Joachim Kuebart. All rights reserved.
8 *

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

54
55#include <dev/pci/pcireg.h>
56#include <dev/pci/pcivar.h>
57
58#include <sys/sysctl.h>
59
60#include "mixer_if.h"
61
1/*-
2 * Support the ENSONIQ AudioPCI board and Creative Labs SoundBlaster PCI
3 * boards based on the ES1370, ES1371 and ES1373 chips.
4 *
5 * Copyright (c) 1999 Russell Cattelan <cattelan@thebarn.com>
6 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
7 * Copyright (c) 1998 by Joachim Kuebart. All rights reserved.
8 *

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

54
55#include <dev/pci/pcireg.h>
56#include <dev/pci/pcivar.h>
57
58#include <sys/sysctl.h>
59
60#include "mixer_if.h"
61
62SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/es137x.c 170521 2007-06-11 00:49:46Z ariff $");
62SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/es137x.c 170721 2007-06-14 11:13:38Z ariff $");
63
64#define MEM_MAP_REG 0x14
65
66/* PCI IDs of supported chips */
67#define ES1370_PCI_ID 0x50001274
68#define ES1371_PCI_ID 0x13711274
69#define ES1371_PCI_ID2 0x13713274
70#define CT5880_PCI_ID 0x58801274

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

1880 int r;
1881 struct es_info *es;
1882
1883 r = pcm_unregister(dev);
1884 if (r)
1885 return (r);
1886
1887 es = pcm_getdevinfo(dev);
63
64#define MEM_MAP_REG 0x14
65
66/* PCI IDs of supported chips */
67#define ES1370_PCI_ID 0x50001274
68#define ES1371_PCI_ID 0x13711274
69#define ES1371_PCI_ID2 0x13713274
70#define CT5880_PCI_ID 0x58801274

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

1880 int r;
1881 struct es_info *es;
1882
1883 r = pcm_unregister(dev);
1884 if (r)
1885 return (r);
1886
1887 es = pcm_getdevinfo(dev);
1888
1889 if (es != NULL && es->num != 0) {
1890 ES_LOCK(es);
1891 es->polling = 0;
1892 callout_stop(&es->poll_timer);
1893 ES_UNLOCK(es);
1894 callout_drain(&es->poll_timer);
1895 }
1896
1888 bus_teardown_intr(dev, es->irq, es->ih);
1889 bus_release_resource(dev, SYS_RES_IRQ, es->irqid, es->irq);
1890 bus_release_resource(dev, es->regtype, es->regid, es->reg);
1891 bus_dma_tag_destroy(es->parent_dmat);
1892 snd_mtxfree(es->lock);
1893 free(es, M_DEVBUF);
1894
1895 return (0);

--- 20 unchanged lines hidden ---
1897 bus_teardown_intr(dev, es->irq, es->ih);
1898 bus_release_resource(dev, SYS_RES_IRQ, es->irqid, es->irq);
1899 bus_release_resource(dev, es->regtype, es->regid, es->reg);
1900 bus_dma_tag_destroy(es->parent_dmat);
1901 snd_mtxfree(es->lock);
1902 free(es, M_DEVBUF);
1903
1904 return (0);

--- 20 unchanged lines hidden ---