Deleted Added
full compact
csa.c (53573) csa.c (54073)
1/*-
2 * Copyright (c) 1999 Seigo Tanimura
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999 Seigo Tanimura
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/sound/pci/csa.c 53573 1999-11-22 10:28:05Z tanimura $
26 * $FreeBSD: head/sys/dev/sound/pci/csa.c 54073 1999-12-03 08:41:24Z mdodd $
27 */
28
29#include "csa.h"
30#include "pci.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>

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

86static int csa_transferimage(csa_res *resp, u_long *src, u_long dest, u_long len);
87
88static devclass_t csa_devclass;
89
90#if NPCI > 0
91static int
92csa_probe(device_t dev)
93{
27 */
28
29#include "csa.h"
30#include "pci.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>

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

86static int csa_transferimage(csa_res *resp, u_long *src, u_long dest, u_long len);
87
88static devclass_t csa_devclass;
89
90#if NPCI > 0
91static int
92csa_probe(device_t dev)
93{
94 device_t child;
94 char *s;
95 struct sndcard_func *func;
96
97 s = NULL;
98 switch (pci_get_devid(dev)) {
99 case CS4610_PCI_ID:
100 s = "Crystal Semiconductor CS4610/4611 Audio accelerator";
101 break;

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

114 device_set_desc(dev, s);
115
116 /* PCM Audio */
117 func = malloc(sizeof(struct sndcard_func), M_DEVBUF, M_NOWAIT);
118 if (func == NULL)
119 return (ENOMEM);
120 bzero(func, sizeof(*func));
121 func->func = SCF_PCM;
95 char *s;
96 struct sndcard_func *func;
97
98 s = NULL;
99 switch (pci_get_devid(dev)) {
100 case CS4610_PCI_ID:
101 s = "Crystal Semiconductor CS4610/4611 Audio accelerator";
102 break;

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

115 device_set_desc(dev, s);
116
117 /* PCM Audio */
118 func = malloc(sizeof(struct sndcard_func), M_DEVBUF, M_NOWAIT);
119 if (func == NULL)
120 return (ENOMEM);
121 bzero(func, sizeof(*func));
122 func->func = SCF_PCM;
122 device_add_child(dev, "pcm", -1, func);
123 child = device_add_child(dev, "pcm", -1);
124 device_set_ivars(child, func);
123
124#if notyet
125 /* Midi Interface */
126 func = malloc(sizeof(struct sndcard_func), M_DEVBUF, M_NOWAIT);
127 if (func == NULL)
128 return (ENOMEM);
129 bzero(func, sizeof(*func));
130 func->func = SCF_MIDI;
125
126#if notyet
127 /* Midi Interface */
128 func = malloc(sizeof(struct sndcard_func), M_DEVBUF, M_NOWAIT);
129 if (func == NULL)
130 return (ENOMEM);
131 bzero(func, sizeof(*func));
132 func->func = SCF_MIDI;
131 device_add_child(dev, "midi", -1, func);
133 child = device_add_child(dev, "midi", -1);
134 device_set_ivars(child, func);
132#endif /* notyet */
133
134 return (0);
135 }
136
137 return (ENXIO);
138}
139

--- 654 unchanged lines hidden ---
135#endif /* notyet */
136
137 return (0);
138 }
139
140 return (ENXIO);
141}
142

--- 654 unchanged lines hidden ---