neomagic.c (65644) | neomagic.c (66012) |
---|---|
1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 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 --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHERIN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 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 --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHERIN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/dev/sound/pci/neomagic.c 65644 2000-09-09 19:21:04Z cg $ | 28 * $FreeBSD: head/sys/dev/sound/pci/neomagic.c 66012 2000-09-17 23:46:32Z cg $ |
29 */ 30 31#include <dev/sound/pcm/sound.h> 32#include <dev/sound/pcm/ac97.h> 33#include <dev/sound/pci/neomagic.h> 34#include <dev/sound/pci/neomagic-coeff.h> 35 36#include <pci/pcireg.h> --- 37 unchanged lines hidden (view full) --- 74 75/* 76 * prototypes 77 */ 78 79/* channel interface */ 80static void *nmchan_init(void *devinfo, snd_dbuf *b, pcm_channel *c, int dir); 81static int nmchan_free(void *data); | 29 */ 30 31#include <dev/sound/pcm/sound.h> 32#include <dev/sound/pcm/ac97.h> 33#include <dev/sound/pci/neomagic.h> 34#include <dev/sound/pci/neomagic-coeff.h> 35 36#include <pci/pcireg.h> --- 37 unchanged lines hidden (view full) --- 74 75/* 76 * prototypes 77 */ 78 79/* channel interface */ 80static void *nmchan_init(void *devinfo, snd_dbuf *b, pcm_channel *c, int dir); 81static int nmchan_free(void *data); |
82static int nmchan_setdir(void *data, int dir); | |
83static int nmchan_setformat(void *data, u_int32_t format); 84static int nmchan_setspeed(void *data, u_int32_t speed); 85static int nmchan_setblocksize(void *data, u_int32_t blocksize); 86static int nmchan_trigger(void *data, int go); 87static int nmchan_getptr(void *data); 88static pcmchan_caps *nmchan_getcaps(void *data); 89 90static int nm_waitcd(struct sc_info *sc); --- 609 unchanged lines hidden (view full) --- 700 } 701 return 0; 702} 703 704static device_method_t nm_methods[] = { 705 /* Device interface */ 706 DEVMETHOD(device_probe, nm_pci_probe), 707 DEVMETHOD(device_attach, nm_pci_attach), | 82static int nmchan_setformat(void *data, u_int32_t format); 83static int nmchan_setspeed(void *data, u_int32_t speed); 84static int nmchan_setblocksize(void *data, u_int32_t blocksize); 85static int nmchan_trigger(void *data, int go); 86static int nmchan_getptr(void *data); 87static pcmchan_caps *nmchan_getcaps(void *data); 88 89static int nm_waitcd(struct sc_info *sc); --- 609 unchanged lines hidden (view full) --- 699 } 700 return 0; 701} 702 703static device_method_t nm_methods[] = { 704 /* Device interface */ 705 DEVMETHOD(device_probe, nm_pci_probe), 706 DEVMETHOD(device_attach, nm_pci_attach), |
707 DEVMETHOD(device_detach, nm_pci_detach), |
|
708 DEVMETHOD(device_resume, nm_pci_resume), 709 { 0, 0 } 710}; 711 712static driver_t nm_driver = { 713 "pcm", 714 nm_methods, 715 sizeof(snddev_info), 716}; 717 718static devclass_t pcm_devclass; 719 720DRIVER_MODULE(snd_neomagic, pci, nm_driver, pcm_devclass, 0, 0); 721MODULE_DEPEND(snd_neomagic, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); 722MODULE_VERSION(snd_neomagic, 1); | 708 DEVMETHOD(device_resume, nm_pci_resume), 709 { 0, 0 } 710}; 711 712static driver_t nm_driver = { 713 "pcm", 714 nm_methods, 715 sizeof(snddev_info), 716}; 717 718static devclass_t pcm_devclass; 719 720DRIVER_MODULE(snd_neomagic, pci, nm_driver, pcm_devclass, 0, 0); 721MODULE_DEPEND(snd_neomagic, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); 722MODULE_VERSION(snd_neomagic, 1); |