emu10k1.c (167285) | emu10k1.c (167608) |
---|---|
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 --- 23 unchanged lines hidden (view full) --- 32 33#include <dev/pci/pcireg.h> 34#include <dev/pci/pcivar.h> 35#include <sys/queue.h> 36 37#include <dev/sound/midi/mpu401.h> 38#include "mpufoi_if.h" 39 | 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 --- 23 unchanged lines hidden (view full) --- 32 33#include <dev/pci/pcireg.h> 34#include <dev/pci/pcivar.h> 35#include <sys/queue.h> 36 37#include <dev/sound/midi/mpu401.h> 38#include "mpufoi_if.h" 39 |
40SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/emu10k1.c 167285 2007-03-07 05:28:42Z kevlo $"); | 40SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/emu10k1.c 167608 2007-03-15 16:41:27Z ariff $"); |
41 42/* -------------------------------------------------------------------- */ 43 44#define NUM_G 64 /* use all channels */ 45#define WAVEOUT_MAXBUFSIZE 32768 46#define EMUPAGESIZE 4096 /* don't change */ 47#define EMUMAXPAGES (WAVEOUT_MAXBUFSIZE * NUM_G / EMUPAGESIZE) 48#define EMU10K1_PCI_ID 0x00021102 /* 1102 => Creative Labs Vendor ID */ --- 1932 unchanged lines hidden (view full) --- 1981 int i, gotmic; 1982 char status[SND_STATUSLEN]; 1983 1984 if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) { 1985 device_printf(dev, "cannot allocate softc\n"); 1986 return ENXIO; 1987 } 1988 | 41 42/* -------------------------------------------------------------------- */ 43 44#define NUM_G 64 /* use all channels */ 45#define WAVEOUT_MAXBUFSIZE 32768 46#define EMUPAGESIZE 4096 /* don't change */ 47#define EMUMAXPAGES (WAVEOUT_MAXBUFSIZE * NUM_G / EMUPAGESIZE) 48#define EMU10K1_PCI_ID 0x00021102 /* 1102 => Creative Labs Vendor ID */ --- 1932 unchanged lines hidden (view full) --- 1981 int i, gotmic; 1982 char status[SND_STATUSLEN]; 1983 1984 if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) { 1985 device_printf(dev, "cannot allocate softc\n"); 1986 return ENXIO; 1987 } 1988 |
1989 sc->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); | 1989 sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_emu10k1 softc"); |
1990 sc->dev = dev; 1991 sc->type = pci_get_devid(dev); 1992 sc->rev = pci_get_revid(dev); 1993 sc->audigy = sc->type == EMU10K2_PCI_ID || sc->type == EMU10K3_PCI_ID; 1994 sc->audigy2 = (sc->audigy && sc->rev == 0x04); 1995 sc->nchans = sc->audigy ? 8 : 4; 1996 sc->addrmask = sc->audigy ? A_PTR_ADDRESS_MASK : PTR_ADDRESS_MASK; 1997 --- 171 unchanged lines hidden --- | 1990 sc->dev = dev; 1991 sc->type = pci_get_devid(dev); 1992 sc->rev = pci_get_revid(dev); 1993 sc->audigy = sc->type == EMU10K2_PCI_ID || sc->type == EMU10K3_PCI_ID; 1994 sc->audigy2 = (sc->audigy && sc->rev == 0x04); 1995 sc->nchans = sc->audigy ? 8 : 4; 1996 sc->addrmask = sc->audigy ? A_PTR_ADDRESS_MASK : PTR_ADDRESS_MASK; 1997 --- 171 unchanged lines hidden --- |