emu10k1.c (107285) | emu10k1.c (109623) |
---|---|
1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27#include <dev/sound/pcm/sound.h> 28#include <dev/sound/pcm/ac97.h> 29#include <gnu/dev/sound/pci/emu10k1.h> 30 31#include <pci/pcireg.h> 32#include <pci/pcivar.h> 33#include <sys/queue.h> 34 | 1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27#include <dev/sound/pcm/sound.h> 28#include <dev/sound/pcm/ac97.h> 29#include <gnu/dev/sound/pci/emu10k1.h> 30 31#include <pci/pcireg.h> 32#include <pci/pcivar.h> 33#include <sys/queue.h> 34 |
35SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/emu10k1.c 107285 2002-11-26 18:16:27Z cg $"); | 35SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/emu10k1.c 109623 2003-01-21 08:56:16Z alfred $"); |
36 37/* -------------------------------------------------------------------- */ 38 39#define EMU10K1_PCI_ID 0x00021102 40#define EMU10K2_PCI_ID 0x00041102 41#define EMU_DEFAULT_BUFSZ 4096 42#define EMU_CHANS 4 43#undef EMUDEBUG --- 1406 unchanged lines hidden (view full) --- 1450emu_pci_attach(device_t dev) 1451{ 1452 struct ac97_info *codec = NULL; 1453 struct sc_info *sc; 1454 u_int32_t data; 1455 int i, gotmic; 1456 char status[SND_STATUSLEN]; 1457 | 36 37/* -------------------------------------------------------------------- */ 38 39#define EMU10K1_PCI_ID 0x00021102 40#define EMU10K2_PCI_ID 0x00041102 41#define EMU_DEFAULT_BUFSZ 4096 42#define EMU_CHANS 4 43#undef EMUDEBUG --- 1406 unchanged lines hidden (view full) --- 1450emu_pci_attach(device_t dev) 1451{ 1452 struct ac97_info *codec = NULL; 1453 struct sc_info *sc; 1454 u_int32_t data; 1455 int i, gotmic; 1456 char status[SND_STATUSLEN]; 1457 |
1458 if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) { | 1458 if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_ZERO)) == NULL) { |
1459 device_printf(dev, "cannot allocate softc\n"); 1460 return ENXIO; 1461 } 1462 1463 sc->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); 1464 sc->dev = dev; 1465 sc->type = pci_get_devid(dev); 1466 sc->rev = pci_get_revid(dev); --- 162 unchanged lines hidden --- | 1459 device_printf(dev, "cannot allocate softc\n"); 1460 return ENXIO; 1461 } 1462 1463 sc->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); 1464 sc->dev = dev; 1465 sc->type = pci_get_devid(dev); 1466 sc->rev = pci_get_revid(dev); --- 162 unchanged lines hidden --- |