2 * Mixer Interface - simple abstact module - base library
3 * Copyright (c) 2005 by Jaroslav Kysela <perex@perex.cz>
6 * This library is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef __SMIXER_BASE_H
29 #define SID_HEADPHONE 1
37 unsigned short sindex;
38 unsigned short weight;
39 unsigned int chanmap[2];
40 struct sm_elem_ops *sops;
43 #define PURPOSE_VOLUME 0
44 #define PURPOSE_SWITCH 1
45 #define PURPOSE_ENUMLIST 2
47 struct helem_selector {
48 snd_ctl_elem_iface_t iface;
52 unsigned short purpose;
57 struct list_head list;
58 snd_hctl_elem_t *helem;
59 unsigned short purpose;
61 unsigned int inactive: 1;
68 struct list_head helems;
72 unsigned int forced_range: 1;
74 long vol[MAX_CHANNEL];
78 struct bclass_selector {
79 struct list_head list;
80 struct helem_selector *selectors;
85 struct list_head list;
86 struct melem_sids *sids;
90 typedef struct bclass_base_ops {
91 int (*event)(snd_mixer_class_t *class, unsigned int mask,
92 snd_hctl_elem_t *helem, snd_mixer_elem_t *melem);
93 int (*selreg)(snd_mixer_class_t *class,
94 struct helem_selector *selectors,
96 int (*sidreg)(snd_mixer_class_t *class,
97 struct melem_sids *sids,
101 struct bclass_private {
102 struct list_head selectors;
103 struct list_head sids;
105 bclass_base_ops_t ops;
108 int mixer_simple_basic_dlopen(snd_mixer_class_t *class,
109 bclass_base_ops_t **ops);
111 #endif /* __SMIXER_BASE_H */