Deleted Added
full compact
mixer.c (100654) mixer.c (107285)
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 100654 2002-07-25 04:49:45Z green $");
31SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/mixer.c 107285 2002-11-26 18:16:27Z cg $");
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;
40 int busy;
41 int hwvol_muted;
42 int hwvol_mixer;
43 int hwvol_step;
44 u_int32_t hwvol_mute_level;
45 u_int32_t devs;
46 u_int32_t recdevs;
47 u_int32_t recsrc;
48 u_int16_t level[32];
49 char name[MIXER_NAMELEN];
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;
40 int busy;
41 int hwvol_muted;
42 int hwvol_mixer;
43 int hwvol_step;
44 u_int32_t hwvol_mute_level;
45 u_int32_t devs;
46 u_int32_t recdevs;
47 u_int32_t recsrc;
48 u_int16_t level[32];
49 char name[MIXER_NAMELEN];
50 void *lock;
50 struct mtx *lock;
51};
52
53static u_int16_t snd_mixerdefaults[SOUND_MIXER_NRDEVICES] = {
54 [SOUND_MIXER_VOLUME] = 75,
55 [SOUND_MIXER_BASS] = 50,
56 [SOUND_MIXER_TREBLE] = 50,
57 [SOUND_MIXER_SYNTH] = 75,
58 [SOUND_MIXER_PCM] = 75,

--- 461 unchanged lines hidden ---
51};
52
53static u_int16_t snd_mixerdefaults[SOUND_MIXER_NRDEVICES] = {
54 [SOUND_MIXER_VOLUME] = 75,
55 [SOUND_MIXER_BASS] = 50,
56 [SOUND_MIXER_TREBLE] = 50,
57 [SOUND_MIXER_SYNTH] = 75,
58 [SOUND_MIXER_PCM] = 75,

--- 461 unchanged lines hidden ---