2 * Copyright (C) 2001 CodeFactory AB
3 * Copyright (C) 2001 Thomas Nyberg <thomas@codefactory.se>
4 * Copyright (C) 2001-2002 Andy Wingo <apwingo@eos.ncsu.edu>
5 * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #ifndef __GST_ALSA_H__
24 #define __GST_ALSA_H__
27 #define ALSA_PCM_NEW_HW_PARAMS_API
28 #define ALSA_PCM_NEW_SW_PARAMS_API
30 #include <alsa/asoundlib.h>
31 #include <alsa/control.h>
32 #include <alsa/error.h>
35 #define GST_CHECK_ALSA_VERSION(major,minor,micro) \
36 (SND_LIB_MAJOR > (major) || \
37 (SND_LIB_MAJOR == (major) && SND_LIB_MINOR > (minor)) || \
38 (SND_LIB_MAJOR == (major) && SND_LIB_MINOR == (minor) && \
39 SND_LIB_SUBMINOR >= (micro)))
41 GST_DEBUG_CATEGORY_EXTERN (alsa_debug);
42 #define GST_CAT_DEFAULT alsa_debug
44 snd_pcm_t * gst_alsa_open_iec958_pcm (GstObject * obj);
46 GstCaps * gst_alsa_probe_supported_formats (GstObject * obj,
48 const GstCaps * template_caps);
50 gchar * gst_alsa_find_device_name (GstObject * obj,
53 snd_pcm_stream_t stream);
55 gchar * gst_alsa_find_card_name (GstObject * obj,
56 const gchar * devcard,
57 snd_pcm_stream_t stream);
60 #endif /* __GST_ALSA_H__ */