|
Packit Service |
db8eaa |
/*
|
|
Packit Service |
db8eaa |
* Mixer Interface - local header file
|
|
Packit Service |
db8eaa |
* Copyright (c) 2000 by Jaroslav Kysela <perex@perex.cz>
|
|
Packit Service |
db8eaa |
* Copyright (c) 2001 by Abramo Bagnara <abramo@alsa-project.org>
|
|
Packit Service |
db8eaa |
*
|
|
Packit Service |
db8eaa |
*
|
|
Packit Service |
db8eaa |
* This library is free software; you can redistribute it and/or modify
|
|
Packit Service |
db8eaa |
* it under the terms of the GNU Lesser General Public License as
|
|
Packit Service |
db8eaa |
* published by the Free Software Foundation; either version 2.1 of
|
|
Packit Service |
db8eaa |
* the License, or (at your option) any later version.
|
|
Packit Service |
db8eaa |
*
|
|
Packit Service |
db8eaa |
* This program is distributed in the hope that it will be useful,
|
|
Packit Service |
db8eaa |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
db8eaa |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
db8eaa |
* GNU Lesser General Public License for more details.
|
|
Packit Service |
db8eaa |
*
|
|
Packit Service |
db8eaa |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
db8eaa |
* License along with this library; if not, write to the Free Software
|
|
Packit Service |
db8eaa |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit Service |
db8eaa |
*
|
|
Packit Service |
db8eaa |
*/
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
#include "local.h"
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
typedef struct _bag1 {
|
|
Packit Service |
db8eaa |
void *ptr;
|
|
Packit Service |
db8eaa |
struct list_head list;
|
|
Packit Service |
db8eaa |
} bag1_t;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
typedef struct list_head bag_t;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int bag_new(bag_t **bag);
|
|
Packit Service |
db8eaa |
void bag_free(bag_t *bag);
|
|
Packit Service |
db8eaa |
int bag_add(bag_t *bag, void *ptr);
|
|
Packit Service |
db8eaa |
int bag_del(bag_t *bag, void *ptr);
|
|
Packit Service |
db8eaa |
int bag_empty(bag_t *bag);
|
|
Packit Service |
db8eaa |
void bag_del_all(bag_t *bag);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
typedef struct list_head *bag_iterator_t;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
#define bag_iterator_entry(i) (list_entry((i), bag1_t, list)->ptr)
|
|
Packit Service |
db8eaa |
#define bag_for_each(pos, bag) list_for_each(pos, bag)
|
|
Packit Service |
db8eaa |
#define bag_for_each_safe(pos, next, bag) list_for_each_safe(pos, next, bag)
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct _snd_mixer_class {
|
|
Packit Service |
db8eaa |
struct list_head list;
|
|
Packit Service |
db8eaa |
snd_mixer_t *mixer;
|
|
Packit Service |
db8eaa |
snd_mixer_event_t event;
|
|
Packit Service |
db8eaa |
void *private_data;
|
|
Packit Service |
db8eaa |
void (*private_free)(snd_mixer_class_t *class);
|
|
Packit Service |
db8eaa |
snd_mixer_compare_t compare;
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct _snd_mixer_elem {
|
|
Packit Service |
db8eaa |
snd_mixer_elem_type_t type;
|
|
Packit Service |
db8eaa |
struct list_head list; /* links for list of all elems */
|
|
Packit Service |
db8eaa |
snd_mixer_class_t *class;
|
|
Packit Service |
db8eaa |
void *private_data;
|
|
Packit Service |
db8eaa |
void (*private_free)(snd_mixer_elem_t *elem);
|
|
Packit Service |
db8eaa |
snd_mixer_elem_callback_t callback;
|
|
Packit Service |
db8eaa |
void *callback_private;
|
|
Packit Service |
db8eaa |
bag_t helems;
|
|
Packit Service |
db8eaa |
int compare_weight; /* compare weight (reversed) */
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct _snd_mixer {
|
|
Packit Service |
db8eaa |
struct list_head slaves; /* list of all slaves */
|
|
Packit Service |
db8eaa |
struct list_head classes; /* list of all elem classes */
|
|
Packit Service |
db8eaa |
struct list_head elems; /* list of all elems */
|
|
Packit Service |
db8eaa |
snd_mixer_elem_t **pelems; /* array of all elems */
|
|
Packit Service |
db8eaa |
unsigned int count;
|
|
Packit Service |
db8eaa |
unsigned int alloc;
|
|
Packit Service |
db8eaa |
unsigned int events;
|
|
Packit Service |
db8eaa |
snd_mixer_callback_t callback;
|
|
Packit Service |
db8eaa |
void *callback_private;
|
|
Packit Service |
db8eaa |
snd_mixer_compare_t compare;
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct _snd_mixer_selem_id {
|
|
Packit Service |
db8eaa |
char name[60];
|
|
Packit Service |
db8eaa |
unsigned int index;
|
|
Packit Service |
db8eaa |
};
|