2 * ALSA client/server header file
3 * Copyright (c) 2000 by Abramo Bagnara <abramo@alsa-project.org>
5 * This library is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation; either version 2.1 of
8 * the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "../src/pcm/pcm_local.h"
23 #include "../src/control/control_local.h"
25 int snd_receive_fd(int sock, void *data, size_t len, int *fd);
27 typedef enum _snd_dev_type {
36 typedef enum _snd_transport_type {
37 SND_TRANSPORT_TYPE_SHM,
38 SND_TRANSPORT_TYPE_TCP,
39 } snd_transport_type_t;
41 #define SND_PCM_IOCTL_HWSYNC _IO ('A', 0x22)
42 #define SND_PCM_IOCTL_STATE _IO ('A', 0xf1)
43 #define SND_PCM_IOCTL_MMAP _IO ('A', 0xf2)
44 #define SND_PCM_IOCTL_MUNMAP _IO ('A', 0xf3)
45 #define SND_PCM_IOCTL_MMAP_COMMIT _IO ('A', 0xf4)
46 #define SND_PCM_IOCTL_AVAIL_UPDATE _IO ('A', 0xf5)
47 #define SND_PCM_IOCTL_ASYNC _IO ('A', 0xf6)
48 #define SND_PCM_IOCTL_CLOSE _IO ('A', 0xf7)
49 #define SND_PCM_IOCTL_POLL_DESCRIPTOR _IO ('A', 0xf8)
50 #define SND_PCM_IOCTL_HW_PTR_FD _IO ('A', 0xf9)
51 #define SND_PCM_IOCTL_APPL_PTR_FD _IO ('A', 0xfa)
52 #define SND_PCM_IOCTL_FORWARD _IO ('A', 0xfb)
55 snd_pcm_uframes_t ptr;
57 off_t offset; /* for mmap */
59 } snd_pcm_shm_rbptr_t;
64 snd_pcm_shm_rbptr_t hw;
65 snd_pcm_shm_rbptr_t appl;
72 snd_pcm_hw_params_t hw_refine;
73 snd_pcm_hw_params_t hw_params;
74 snd_pcm_sw_params_t sw_params;
75 snd_pcm_status_t status;
77 snd_pcm_uframes_t frames;
80 snd_pcm_sframes_t frames;
85 snd_pcm_channel_info_t channel_info;
87 snd_pcm_uframes_t frames;
90 snd_pcm_uframes_t frames;
96 snd_pcm_uframes_t offset;
97 snd_pcm_uframes_t frames;
106 } snd_pcm_shm_ctrl_t;
108 #define PCM_SHM_SIZE sizeof(snd_pcm_shm_ctrl_t)
110 #define SND_CTL_IOCTL_READ _IOR('U', 0xf1, snd_ctl_event_t)
111 #define SND_CTL_IOCTL_CLOSE _IO ('U', 0xf2)
112 #define SND_CTL_IOCTL_POLL_DESCRIPTOR _IO ('U', 0xf3)
113 #define SND_CTL_IOCTL_ASYNC _IO ('U', 0xf4)
124 int subscribe_events;
125 snd_ctl_card_info_t card_info;
126 snd_ctl_elem_list_t element_list;
127 snd_ctl_elem_info_t element_info;
128 snd_ctl_elem_value_t element_read;
129 snd_ctl_elem_value_t element_write;
130 snd_ctl_elem_id_t element_lock;
131 snd_ctl_elem_id_t element_unlock;
132 snd_hwdep_info_t hwdep_info;
133 snd_pcm_info_t pcm_info;
134 int pcm_prefer_subdevice;
135 snd_rawmidi_info_t rawmidi_info;
136 int rawmidi_prefer_subdevice;
137 unsigned int power_state;
138 snd_ctl_event_t read;
141 } snd_ctl_shm_ctrl_t;
143 #define CTL_SHM_SIZE 65536
144 #define CTL_SHM_DATA_MAXLEN (CTL_SHM_SIZE - offsetof(snd_ctl_shm_ctrl_t, data))
147 unsigned char dev_type;
148 unsigned char transport_type;
149 unsigned char stream;
151 unsigned char namelen;
153 } snd_client_open_request_t;
158 } snd_client_open_answer_t;