]> code.delx.au - pulseaudio/blob - src/modules/alsa-util.h
ea6c7e1df3870212e96be22c75752d35c2530785
[pulseaudio] / src / modules / alsa-util.h
1 #ifndef fooalsautilhfoo
2 #define fooalsautilhfoo
3
4 /* $Id$ */
5
6 /***
7 This file is part of PulseAudio.
8
9 Copyright 2004-2006 Lennart Poettering
10 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
11
12 PulseAudio is free software; you can redistribute it and/or modify
13 it under the terms of the GNU Lesser General Public License as published
14 by the Free Software Foundation; either version 2 of the License,
15 or (at your option) any later version.
16
17 PulseAudio is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 General Public License for more details.
21
22 You should have received a copy of the GNU Lesser General Public License
23 along with PulseAudio; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25 USA.
26 ***/
27
28 #include <asoundlib.h>
29
30 #include <pulse/sample.h>
31 #include <pulse/mainloop-api.h>
32
33 #include <pulse/channelmap.h>
34
35 struct pa_alsa_fdlist;
36
37 struct pa_alsa_fdlist *pa_alsa_fdlist_new(void);
38 void pa_alsa_fdlist_free(struct pa_alsa_fdlist *fdl);
39
40 int pa_alsa_fdlist_init_pcm(struct pa_alsa_fdlist *fdl, snd_pcm_t *pcm_handle, pa_mainloop_api* m, void (*cb)(void *userdata), void *userdata);
41 int pa_alsa_fdlist_init_mixer(struct pa_alsa_fdlist *fdl, snd_mixer_t *mixer_handle, pa_mainloop_api* m);
42
43 int pa_alsa_set_hw_params(snd_pcm_t *pcm_handle, pa_sample_spec *ss, uint32_t *periods, snd_pcm_uframes_t *period_size);
44
45 int pa_alsa_prepare_mixer(snd_mixer_t *mixer, const char *dev);
46 snd_mixer_elem_t *pa_alsa_find_elem(snd_mixer_t *mixer, const char *name, const char *fallback);
47
48 #endif