2001-01-01 15:15:41 +00:00
|
|
|
/*
|
|
|
|
|
* ALSA lib - local header file
|
|
|
|
|
* Copyright (c) 2000 by Abramo Bagnara <abramo@alsa-project.org>
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU Library General Public License as
|
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU Library General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2001-02-06 23:48:10 +00:00
|
|
|
#ifndef __LOCAL_H
|
|
|
|
|
#define __LOCAL_H
|
|
|
|
|
|
2001-06-26 10:45:10 +00:00
|
|
|
#include "config.h"
|
2001-06-04 18:04:18 +00:00
|
|
|
|
2001-06-26 10:45:10 +00:00
|
|
|
#define ALSA_LIB "libasound.so"
|
2001-05-22 09:19:43 +00:00
|
|
|
|
2001-03-30 10:12:19 +00:00
|
|
|
#define _snd_config_iterator list_head
|
2001-02-04 17:03:17 +00:00
|
|
|
#define _snd_interval sndrv_interval
|
|
|
|
|
#define _snd_pcm_info sndrv_pcm_info
|
|
|
|
|
#define _snd_pcm_hw_params sndrv_pcm_hw_params
|
|
|
|
|
#define _snd_pcm_sw_params sndrv_pcm_sw_params
|
|
|
|
|
#define _snd_pcm_status sndrv_pcm_status
|
|
|
|
|
|
2001-02-07 15:13:15 +00:00
|
|
|
#define _snd_ctl_card_info sndrv_ctl_card_info
|
2001-02-09 11:20:31 +00:00
|
|
|
#define _snd_ctl_elem_id sndrv_ctl_elem_id
|
|
|
|
|
#define _snd_ctl_elem_list sndrv_ctl_elem_list
|
|
|
|
|
#define _snd_ctl_elem_info sndrv_ctl_elem_info
|
2001-02-11 15:45:35 +00:00
|
|
|
#define _snd_ctl_elem_value sndrv_ctl_elem_value
|
2001-02-06 23:48:10 +00:00
|
|
|
#define _snd_ctl_event sndrv_ctl_event
|
|
|
|
|
|
2001-02-04 17:03:17 +00:00
|
|
|
#define _snd_rawmidi_info sndrv_rawmidi_info
|
|
|
|
|
#define _snd_rawmidi_params sndrv_rawmidi_params
|
|
|
|
|
#define _snd_rawmidi_status sndrv_rawmidi_status
|
|
|
|
|
|
2001-02-05 15:44:42 +00:00
|
|
|
#define _snd_hwdep_info sndrv_hwdep_info
|
|
|
|
|
|
2001-01-31 17:26:56 +00:00
|
|
|
#include "asoundlib.h"
|
2001-06-20 20:52:12 +00:00
|
|
|
#include "list.h"
|
|
|
|
|
|
|
|
|
|
struct _snd_async_handler {
|
|
|
|
|
enum {
|
|
|
|
|
SND_ASYNC_HANDLER_GENERIC,
|
|
|
|
|
SND_ASYNC_HANDLER_PCM,
|
|
|
|
|
SND_ASYNC_HANDLER_CTL,
|
|
|
|
|
} type;
|
|
|
|
|
int fd;
|
|
|
|
|
union {
|
|
|
|
|
snd_pcm_t *pcm;
|
|
|
|
|
snd_ctl_t *ctl;
|
|
|
|
|
} u;
|
|
|
|
|
snd_async_callback_t callback;
|
|
|
|
|
void *private_data;
|
|
|
|
|
struct list_head glist;
|
|
|
|
|
struct list_head hlist;
|
|
|
|
|
};
|
2001-01-01 15:15:41 +00:00
|
|
|
|
2001-03-29 10:11:38 +00:00
|
|
|
typedef enum _snd_set_mode {
|
2001-02-06 23:48:10 +00:00
|
|
|
SND_CHANGE,
|
|
|
|
|
SND_TRY,
|
|
|
|
|
SND_TEST,
|
2001-03-29 10:11:38 +00:00
|
|
|
} snd_set_mode_t;
|
2001-02-06 23:48:10 +00:00
|
|
|
|
2001-02-21 21:59:35 +00:00
|
|
|
size_t page_align(size_t size);
|
|
|
|
|
size_t page_size(void);
|
|
|
|
|
|
2001-06-11 13:35:48 +00:00
|
|
|
int safe_strtol(const char *str, long *val);
|
|
|
|
|
|
2001-04-19 21:18:23 +00:00
|
|
|
#define HAVE_GNU_LD
|
|
|
|
|
#define HAVE_ELF
|
|
|
|
|
#define HAVE_ASM_PREVIOUS_DIRECTIVE
|
|
|
|
|
|
|
|
|
|
/* Stolen from libc-symbols.h in GNU glibc */
|
|
|
|
|
|
|
|
|
|
/* When a reference to SYMBOL is encountered, the linker will emit a
|
|
|
|
|
warning message MSG. */
|
|
|
|
|
#ifdef HAVE_GNU_LD
|
|
|
|
|
# ifdef HAVE_ELF
|
|
|
|
|
|
|
|
|
|
/* We want the .gnu.warning.SYMBOL section to be unallocated. */
|
|
|
|
|
# ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
|
|
|
|
|
# define __make_section_unallocated(section_string) \
|
|
|
|
|
asm (".section " section_string "\n\t.previous");
|
|
|
|
|
# elif defined HAVE_ASM_POPSECTION_DIRECTIVE
|
|
|
|
|
# define __make_section_unallocated(section_string) \
|
|
|
|
|
asm (".pushsection " section_string "\n\t.popsection");
|
|
|
|
|
# else
|
|
|
|
|
# define __make_section_unallocated(section_string)
|
|
|
|
|
# endif
|
|
|
|
|
|
|
|
|
|
/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
|
|
|
|
|
section attributes on what looks like a comment to the assembler. */
|
|
|
|
|
# ifdef HAVE_SECTION_QUOTES
|
|
|
|
|
# define link_warning(symbol, msg) \
|
|
|
|
|
__make_section_unallocated (".gnu.warning." #symbol) \
|
|
|
|
|
static const char __evoke_link_warning_##symbol[] \
|
|
|
|
|
__attribute__ ((section (".gnu.warning." #symbol "\"\n\t#\""))) = msg;
|
|
|
|
|
# else
|
|
|
|
|
# define link_warning(symbol, msg) \
|
|
|
|
|
__make_section_unallocated (".gnu.warning." #symbol) \
|
|
|
|
|
static const char __evoke_link_warning_##symbol[] \
|
|
|
|
|
__attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
|
|
|
|
|
# endif
|
|
|
|
|
# else
|
|
|
|
|
# define link_warning(symbol, msg) \
|
|
|
|
|
asm (".stabs \"" msg "\",30,0,0,0\n\t" \
|
|
|
|
|
".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
|
|
|
|
|
# endif
|
|
|
|
|
#else
|
|
|
|
|
/* We will never be heard; they will all die horribly. */
|
|
|
|
|
# define link_warning(symbol, msg)
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-02-06 23:48:10 +00:00
|
|
|
#endif
|