Deleted Added
full compact
ac97.h (70134) ac97.h (74763)
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

--- 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 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

--- 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/pcm/ac97.h 70134 2000-12-18 01:36:41Z cg $
26 * $FreeBSD: head/sys/dev/sound/pcm/ac97.h 74763 2001-03-24 23:10:29Z cg $
27 */
28
29#define AC97_MUTE 0x8000
30
31#define AC97_REG_RESET 0x00
32#define AC97_MIX_MASTER 0x02
33#define AC97_MIX_PHONES 0x04
34#define AC97_MIX_MONO 0x06

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

72 unsigned recidx:4;
73 unsigned mask:1;
74 unsigned enable:1;
75};
76
77#define AC97_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, sizeof(struct kobj))
78#define AC97_CREATE(dev, devinfo, cls) ac97_create(dev, devinfo, &cls ## _class)
79
27 */
28
29#define AC97_MUTE 0x8000
30
31#define AC97_REG_RESET 0x00
32#define AC97_MIX_MASTER 0x02
33#define AC97_MIX_PHONES 0x04
34#define AC97_MIX_MONO 0x06

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

72 unsigned recidx:4;
73 unsigned mask:1;
74 unsigned enable:1;
75};
76
77#define AC97_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, sizeof(struct kobj))
78#define AC97_CREATE(dev, devinfo, cls) ac97_create(dev, devinfo, &cls ## _class)
79
80struct ac97_info {
81 kobj_t methods;
82 device_t dev;
83 void *devinfo;
84 char *name;
85 char rev;
86 unsigned count, caps, se, extcaps, extid, extstat, noext:1;
87 struct ac97mixtable_entry mix[32];
88};
80struct ac97_info;
89
90#include "ac97_if.h"
91
92extern kobj_class_t ac97_getmixerclass(void);
93
94struct ac97_info *ac97_create(device_t dev, void *devinfo, kobj_class_t cls);
95void ac97_destroy(struct ac97_info *codec);
96int ac97_setrate(struct ac97_info *codec, int which, int rate);
97int ac97_setextmode(struct ac97_info *codec, u_int16_t mode);
98u_int16_t ac97_getextmode(struct ac97_info *codec);
99u_int16_t ac97_getextcaps(struct ac97_info *codec);
100
81
82#include "ac97_if.h"
83
84extern kobj_class_t ac97_getmixerclass(void);
85
86struct ac97_info *ac97_create(device_t dev, void *devinfo, kobj_class_t cls);
87void ac97_destroy(struct ac97_info *codec);
88int ac97_setrate(struct ac97_info *codec, int which, int rate);
89int ac97_setextmode(struct ac97_info *codec, u_int16_t mode);
90u_int16_t ac97_getextmode(struct ac97_info *codec);
91u_int16_t ac97_getextcaps(struct ac97_info *codec);
92