Deleted Added
full compact
emu10k1.c (124405) emu10k1.c (126695)
1/*
2 * Copyright (c) 2004 David O'Brien <obrien@FreeBSD.org>
3 * Copyright (c) 2003 Orlando Bassotto <orlando.bassotto@ieo-research.it>
4 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

30#include <dev/sound/pcm/ac97.h>
31#include <gnu/dev/sound/pci/emu10k1.h>
32#include "emu10k1-alsa%diked.h"
33
34#include <dev/pci/pcireg.h>
35#include <dev/pci/pcivar.h>
36#include <sys/queue.h>
37
1/*
2 * Copyright (c) 2004 David O'Brien <obrien@FreeBSD.org>
3 * Copyright (c) 2003 Orlando Bassotto <orlando.bassotto@ieo-research.it>
4 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

30#include <dev/sound/pcm/ac97.h>
31#include <gnu/dev/sound/pci/emu10k1.h>
32#include "emu10k1-alsa%diked.h"
33
34#include <dev/pci/pcireg.h>
35#include <dev/pci/pcivar.h>
36#include <sys/queue.h>
37
38SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/emu10k1.c 124405 2004-01-12 00:06:30Z obrien $");
38SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/emu10k1.c 126695 2004-03-06 15:52:42Z matk $");
39
40/* -------------------------------------------------------------------- */
41
42#define NUM_G 64 /* use all channels */
43#define WAVEOUT_MAXBUFSIZE 32768
44#define EMUPAGESIZE 4096 /* don't change */
45#define EMUMAXPAGES (WAVEOUT_MAXBUFSIZE * NUM_G / EMUPAGESIZE)
46#define EMU10K1_PCI_ID 0x00021102 /* 1102 => Creative Labs Vendor ID */

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

1945 sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &i, 0, ~0, 1,
1946 RF_ACTIVE | RF_SHAREABLE);
1947 if (!sc->irq ||
1948 snd_setup_intr(dev, sc->irq, INTR_MPSAFE, emu_intr, sc, &sc->ih)) {
1949 device_printf(dev, "unable to map interrupt\n");
1950 goto bad;
1951 }
1952
39
40/* -------------------------------------------------------------------- */
41
42#define NUM_G 64 /* use all channels */
43#define WAVEOUT_MAXBUFSIZE 32768
44#define EMUPAGESIZE 4096 /* don't change */
45#define EMUMAXPAGES (WAVEOUT_MAXBUFSIZE * NUM_G / EMUPAGESIZE)
46#define EMU10K1_PCI_ID 0x00021102 /* 1102 => Creative Labs Vendor ID */

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

1945 sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &i, 0, ~0, 1,
1946 RF_ACTIVE | RF_SHAREABLE);
1947 if (!sc->irq ||
1948 snd_setup_intr(dev, sc->irq, INTR_MPSAFE, emu_intr, sc, &sc->ih)) {
1949 device_printf(dev, "unable to map interrupt\n");
1950 goto bad;
1951 }
1952
1953 snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld",
1954 rman_get_start(sc->reg), rman_get_start(sc->irq));
1953 snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
1954 rman_get_start(sc->reg), rman_get_start(sc->irq),
1955 PCM_KLDSTRING(snd_emu10k1));
1955
1956 if (pcm_register(dev, sc, sc->nchans, gotmic ? 3 : 2)) goto bad;
1957 for (i = 0; i < sc->nchans; i++)
1958 pcm_addchan(dev, PCMDIR_PLAY, &emupchan_class, sc);
1959 for (i = 0; i < (gotmic ? 3 : 2); i++)
1960 pcm_addchan(dev, PCMDIR_REC, &emurchan_class, sc);
1961
1962 pcm_setstatus(dev, status);

--- 109 unchanged lines hidden ---
1956
1957 if (pcm_register(dev, sc, sc->nchans, gotmic ? 3 : 2)) goto bad;
1958 for (i = 0; i < sc->nchans; i++)
1959 pcm_addchan(dev, PCMDIR_PLAY, &emupchan_class, sc);
1960 for (i = 0; i < (gotmic ? 3 : 2); i++)
1961 pcm_addchan(dev, PCMDIR_REC, &emurchan_class, sc);
1962
1963 pcm_setstatus(dev, status);

--- 109 unchanged lines hidden ---