mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
more simple mixer - basic abstraction - work
- midlayer cleanups and simplification - probably broke the "none" abstraction code somehow (not intensively tested midlayer changes) - trying to implement ac97 module - far from finished - common code should be moved to alsa-lib as core for other modules - perhaps simple_abst.c can be based on this common code, too
This commit is contained in:
parent
3656a66397
commit
ce67d5389b
8 changed files with 856 additions and 298 deletions
|
|
@ -69,6 +69,13 @@ typedef struct _sm_selem {
|
|||
unsigned int capture_group;
|
||||
} sm_selem_t;
|
||||
|
||||
typedef struct _sm_class_basic {
|
||||
char *device;
|
||||
snd_ctl_t *ctl;
|
||||
snd_hctl_t *hctl;
|
||||
snd_ctl_card_info_t *info;
|
||||
} sm_class_basic_t;
|
||||
|
||||
struct sm_elem_ops {
|
||||
int (*is)(snd_mixer_elem_t *elem, int dir, int cmd, int val);
|
||||
int (*get_range)(snd_mixer_elem_t *elem, int dir, long *min, long *max);
|
||||
|
|
@ -78,11 +85,8 @@ struct sm_elem_ops {
|
|||
int (*get_dB)(snd_mixer_elem_t *elem, int dir, snd_mixer_selem_channel_id_t channel, long *value);
|
||||
int (*set_volume)(snd_mixer_elem_t *elem, int dir, snd_mixer_selem_channel_id_t channel, long value);
|
||||
int (*set_dB)(snd_mixer_elem_t *elem, int dir, snd_mixer_selem_channel_id_t channel, long value, int xdir);
|
||||
int (*set_volume_all)(snd_mixer_elem_t *elem, int dir, long value);
|
||||
int (*set_dB_all)(snd_mixer_elem_t *elem, int dir, long value, int xdir);
|
||||
int (*get_switch)(snd_mixer_elem_t *elem, int dir, snd_mixer_selem_channel_id_t channel, int *value);
|
||||
int (*set_switch)(snd_mixer_elem_t *elem, int dir, snd_mixer_selem_channel_id_t channel, int value);
|
||||
int (*set_switch_all)(snd_mixer_elem_t *elem, int dir, int value);
|
||||
int (*enum_item_name)(snd_mixer_elem_t *elem, unsigned int item, size_t maxlen, char *buf);
|
||||
int (*get_enum_item)(snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, unsigned int *itemp);
|
||||
int (*set_enum_item)(snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, unsigned int item);
|
||||
|
|
@ -90,6 +94,8 @@ struct sm_elem_ops {
|
|||
|
||||
int snd_mixer_selem_compare(const snd_mixer_elem_t *c1, const snd_mixer_elem_t *c2);
|
||||
|
||||
int snd_mixer_sbasic_info(const snd_mixer_class_t *class, sm_class_basic_t *info);
|
||||
|
||||
/** \} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue