mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Added abstraction layer to controls. Added client/server support to controls. Cleaned private_data use for PCMs. Cleaned aserver
This commit is contained in:
parent
1acf1f3fb9
commit
df35e8457a
18 changed files with 1623 additions and 778 deletions
|
|
@ -54,6 +54,30 @@ typedef struct {
|
|||
#define PCM_SHM_SIZE 65536
|
||||
#define PCM_SHM_DATA_MAXLEN (PCM_SHM_SIZE - offsetof(snd_pcm_client_shm_t, data))
|
||||
|
||||
#define SND_CTL_IOCTL_READ _IOR('U', 0xf0, snd_ctl_event_t)
|
||||
#define SND_CTL_IOCTL_CLOSE _IO ('U', 0xf1)
|
||||
|
||||
typedef struct {
|
||||
int result;
|
||||
int cmd;
|
||||
union {
|
||||
snd_ctl_hw_info_t hw_info;
|
||||
snd_control_list_t clist;
|
||||
snd_control_info_t cinfo;
|
||||
snd_control_t cread;
|
||||
snd_control_t cwrite;
|
||||
snd_hwdep_info_t hwdep_info;
|
||||
snd_pcm_info_t pcm_info;
|
||||
int pcm_prefer_subdevice;
|
||||
snd_rawmidi_info_t rawmidi_info;
|
||||
snd_ctl_event_t read;
|
||||
} u;
|
||||
char data[0];
|
||||
} snd_ctl_client_shm_t;
|
||||
|
||||
#define CTL_SHM_SIZE 65536
|
||||
#define CTL_SHM_DATA_MAXLEN (CTL_SHM_SIZE - offsetof(snd_ctl_client_shm_t, data))
|
||||
|
||||
typedef struct {
|
||||
unsigned char dev_type;
|
||||
unsigned char transport_type;
|
||||
|
|
@ -68,10 +92,3 @@ typedef struct {
|
|||
int cookie;
|
||||
} snd_client_open_answer_t;
|
||||
|
||||
struct cmsg_fd
|
||||
{
|
||||
int len; /* sizeof structure */
|
||||
int level; /* SOL_SOCKET */
|
||||
int type; /* SCM_RIGHTS */
|
||||
int fd; /* fd to pass */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
typedef struct snd_ctl snd_ctl_t;
|
||||
|
||||
typedef enum { SND_CTL_TYPE_HW, SND_CTL_TYPE_CLIENT } snd_ctl_type_t;
|
||||
|
||||
typedef struct snd_ctl_callbacks {
|
||||
void *private_data; /* may be used by an application */
|
||||
void (*rebuild) (snd_ctl_t *handle, void *private_data);
|
||||
|
|
@ -35,7 +37,10 @@ int snd_defaults_pcm_device(void);
|
|||
int snd_defaults_rawmidi_card(void);
|
||||
int snd_defaults_rawmidi_device(void);
|
||||
|
||||
int snd_ctl_open(snd_ctl_t **handle, int card);
|
||||
int snd_ctl_hw_open(snd_ctl_t **handle, int card);
|
||||
int snd_ctl_client_open(snd_ctl_t **handlep, char *host, int port, int transport, char *name);
|
||||
snd_ctl_type_t snd_ctl_type(snd_ctl_t *handle);
|
||||
int snd_ctl_open(snd_ctl_t **handle, char *name);
|
||||
int snd_ctl_close(snd_ctl_t *handle);
|
||||
int snd_ctl_file_descriptor(snd_ctl_t *handle);
|
||||
int snd_ctl_hw_info(snd_ctl_t *handle, snd_ctl_hw_info_t *info);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ typedef struct snd_mixer snd_mixer_t;
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int snd_mixer_open(snd_mixer_t **handle, int card);
|
||||
int snd_mixer_open(snd_mixer_t **handle, char *name);
|
||||
int snd_mixer_close(snd_mixer_t *handle);
|
||||
int snd_mixer_file_descriptor(snd_mixer_t *handle);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue