Deleted Added
full compact
mixer.c (107285) mixer.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

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

23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <dev/sound/pcm/sound.h>
28
29#include "mixer_if.h"
30
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

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

23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <dev/sound/pcm/sound.h>
28
29#include "mixer_if.h"
30
31SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/mixer.c 107285 2002-11-26 18:16:27Z cg $");
31SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/mixer.c 109623 2003-01-21 08:56:16Z alfred $");
32
33MALLOC_DEFINE(M_MIXER, "mixer", "mixer");
34
35#define MIXER_NAMELEN 16
36struct snd_mixer {
37 KOBJ_FIELDS;
38 const char *type;
39 void *devinfo;

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

195int
196mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
197{
198 struct snd_mixer *m;
199 u_int16_t v;
200 dev_t pdev;
201 int i, unit;
202
32
33MALLOC_DEFINE(M_MIXER, "mixer", "mixer");
34
35#define MIXER_NAMELEN 16
36struct snd_mixer {
37 KOBJ_FIELDS;
38 const char *type;
39 void *devinfo;

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

195int
196mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
197{
198 struct snd_mixer *m;
199 u_int16_t v;
200 dev_t pdev;
201 int i, unit;
202
203 m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO);
203 m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_ZERO);
204 snprintf(m->name, MIXER_NAMELEN, "%s:mixer", device_get_nameunit(dev));
205 m->lock = snd_mtxcreate(m->name, "pcm mixer");
206 m->type = cls->name;
207 m->devinfo = devinfo;
208 m->busy = 0;
209
210 if (MIXER_INIT(m))
211 goto bad;

--- 308 unchanged lines hidden ---
204 snprintf(m->name, MIXER_NAMELEN, "%s:mixer", device_get_nameunit(dev));
205 m->lock = snd_mtxcreate(m->name, "pcm mixer");
206 m->type = cls->name;
207 m->devinfo = devinfo;
208 m->busy = 0;
209
210 if (MIXER_INIT(m))
211 goto bad;

--- 308 unchanged lines hidden ---