big simple mixer update

- exported all necessary functions to create a mixer module outside alsa-lib
- separated simple mixer API from the simple mixer implementation
  (using callbacks as usuall)
  - src/mixer/simple.c is the core
  - src/mixer/simple_none.c is the current (no-abstraction) implementation
    based on control names; note that this module does not depend on
    internal ALSA structures now
  - src/mixer/simple_abst.c is the ongoing abstraction which will use
    external dynamic modules; src/conf/smixer.conf will describe which
    modules will be used depending on the components from the driver
This commit is contained in:
Jaroslav Kysela 2005-06-03 13:33:04 +00:00
parent ae07fd40fb
commit 597b4d0942
12 changed files with 2270 additions and 1486 deletions

View file

@ -42,15 +42,10 @@ typedef struct list_head *bag_iterator_t;
#define bag_for_each(pos, bag) list_for_each(pos, bag)
#define bag_for_each_safe(pos, next, bag) list_for_each_safe(pos, next, bag)
#define MIXER_COMPARE_WEIGHT_SIMPLE_BASE 0
#define MIXER_COMPARE_WEIGHT_NEXT_BASE 10000000
#define MIXER_COMPARE_WEIGHT_NOT_FOUND 1000000000
struct _snd_mixer_class {
struct list_head list;
snd_mixer_t *mixer;
int (*event)(snd_mixer_class_t *class, unsigned int mask,
snd_hctl_elem_t *helem, snd_mixer_elem_t *melem);
snd_mixer_event_t event;
void *private_data;
void (*private_free)(snd_mixer_class_t *class);
snd_mixer_compare_t compare;
@ -85,16 +80,3 @@ struct _snd_mixer_selem_id {
unsigned char name[60];
unsigned int index;
};
int snd_mixer_class_register(snd_mixer_class_t *class, snd_mixer_t *mixer);
int snd_mixer_add_elem(snd_mixer_t *mixer, snd_mixer_elem_t *elem);
int snd_mixer_remove_elem(snd_mixer_t *mixer, snd_mixer_elem_t *elem);
int snd_mixer_elem_add(snd_mixer_elem_t *elem, snd_mixer_class_t *class);
int snd_mixer_elem_remove(snd_mixer_elem_t *elem);
int snd_mixer_elem_info(snd_mixer_elem_t *elem);
int snd_mixer_elem_value(snd_mixer_elem_t *elem);
int snd_mixer_elem_attach(snd_mixer_elem_t *melem,
snd_hctl_elem_t *helem);
int snd_mixer_elem_detach(snd_mixer_elem_t *melem,
snd_hctl_elem_t *helem);
int snd_mixer_elem_empty(snd_mixer_elem_t *melem);