Deleted Added
full compact
cs4281.c (119690) cs4281.c (126695)
1/*
2 * Copyright (c) 2000 Orion Hodson <O.Hodson@cs.ucl.ac.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

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

32#include <dev/sound/pcm/sound.h>
33#include <dev/sound/pcm/ac97.h>
34
35#include <dev/pci/pcireg.h>
36#include <dev/pci/pcivar.h>
37
38#include <dev/sound/pci/cs4281.h>
39
1/*
2 * Copyright (c) 2000 Orion Hodson <O.Hodson@cs.ucl.ac.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

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

32#include <dev/sound/pcm/sound.h>
33#include <dev/sound/pcm/ac97.h>
34
35#include <dev/pci/pcireg.h>
36#include <dev/pci/pcivar.h>
37
38#include <dev/sound/pci/cs4281.h>
39
40SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/cs4281.c 119690 2003-09-02 17:30:40Z jhb $");
40SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/cs4281.c 126695 2004-03-06 15:52:42Z matk $");
41
42#define CS4281_DEFAULT_BUFSZ 16384
43
44/* Max fifo size for full duplex is 64 */
45#define CS4281_FIFO_SIZE 15
46
47/* DMA Engine Indices */
48#define CS4281_DMA_PLAY 0

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

853 mixer_init(dev, ac97_getmixerclass(), codec);
854
855 if (pcm_register(dev, sc, 1, 1))
856 goto bad;
857
858 pcm_addchan(dev, PCMDIR_PLAY, &cs4281chan_class, sc);
859 pcm_addchan(dev, PCMDIR_REC, &cs4281chan_class, sc);
860
41
42#define CS4281_DEFAULT_BUFSZ 16384
43
44/* Max fifo size for full duplex is 64 */
45#define CS4281_FIFO_SIZE 15
46
47/* DMA Engine Indices */
48#define CS4281_DMA_PLAY 0

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

853 mixer_init(dev, ac97_getmixerclass(), codec);
854
855 if (pcm_register(dev, sc, 1, 1))
856 goto bad;
857
858 pcm_addchan(dev, PCMDIR_PLAY, &cs4281chan_class, sc);
859 pcm_addchan(dev, PCMDIR_REC, &cs4281chan_class, sc);
860
861 snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld",
861 snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
862 (sc->regtype == SYS_RES_IOPORT)? "io" : "memory",
862 (sc->regtype == SYS_RES_IOPORT)? "io" : "memory",
863 rman_get_start(sc->reg), rman_get_start(sc->irq));
863 rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_cs4281));
864 pcm_setstatus(dev, status);
865
866 return 0;
867
868 bad:
869 if (codec)
870 ac97_destroy(codec);
871 if (sc->reg)

--- 109 unchanged lines hidden ---
864 pcm_setstatus(dev, status);
865
866 return 0;
867
868 bad:
869 if (codec)
870 ac97_destroy(codec);
871 if (sc->reg)

--- 109 unchanged lines hidden ---