• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * libjingle
3  * Copyright 2004--2010, Google Inc.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  *  1. Redistributions of source code must retain the above copyright notice,
9  *     this list of conditions and the following disclaimer.
10  *  2. Redistributions in binary form must reproduce the above copyright notice,
11  *     this list of conditions and the following disclaimer in the documentation
12  *     and/or other materials provided with the distribution.
13  *  3. The name of the author may not be used to endorse or promote products
14  *     derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19  * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef WEBRTC_AUDIO_DEVICE_ALSASYMBOLTABLE_LINUX_H
29 #define WEBRTC_AUDIO_DEVICE_ALSASYMBOLTABLE_LINUX_H
30 
31 #include "webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h"
32 
33 namespace webrtc_adm_linux_alsa {
34 
35 // The ALSA symbols we need, as an X-Macro list.
36 // This list must contain precisely every libasound function that is used in
37 // alsasoundsystem.cc.
38 #define ALSA_SYMBOLS_LIST \
39   X(snd_device_name_free_hint) \
40   X(snd_device_name_get_hint) \
41   X(snd_device_name_hint) \
42   X(snd_pcm_avail_update) \
43   X(snd_pcm_close) \
44   X(snd_pcm_delay) \
45   X(snd_pcm_drop) \
46   X(snd_pcm_open) \
47   X(snd_pcm_prepare) \
48   X(snd_pcm_readi) \
49   X(snd_pcm_recover) \
50   X(snd_pcm_resume) \
51   X(snd_pcm_reset) \
52   X(snd_pcm_state) \
53   X(snd_pcm_set_params) \
54   X(snd_pcm_get_params) \
55   X(snd_pcm_start) \
56   X(snd_pcm_stream) \
57   X(snd_pcm_frames_to_bytes) \
58   X(snd_pcm_bytes_to_frames) \
59   X(snd_pcm_wait) \
60   X(snd_pcm_writei) \
61   X(snd_pcm_info_get_class) \
62   X(snd_pcm_info_get_subdevices_avail) \
63   X(snd_pcm_info_get_subdevice_name) \
64   X(snd_pcm_info_set_subdevice) \
65   X(snd_pcm_info_get_id) \
66   X(snd_pcm_info_set_device) \
67   X(snd_pcm_info_set_stream) \
68   X(snd_pcm_info_get_name) \
69   X(snd_pcm_info_get_subdevices_count) \
70   X(snd_pcm_info_sizeof) \
71   X(snd_pcm_hw_params) \
72   X(snd_pcm_hw_params_malloc) \
73   X(snd_pcm_hw_params_free) \
74   X(snd_pcm_hw_params_any) \
75   X(snd_pcm_hw_params_set_access) \
76   X(snd_pcm_hw_params_set_format) \
77   X(snd_pcm_hw_params_set_channels) \
78   X(snd_pcm_hw_params_set_rate_near) \
79   X(snd_pcm_hw_params_set_buffer_size_near) \
80   X(snd_card_next) \
81   X(snd_card_get_name) \
82   X(snd_config_update) \
83   X(snd_config_copy) \
84   X(snd_config_get_id) \
85   X(snd_ctl_open) \
86   X(snd_ctl_close) \
87   X(snd_ctl_card_info) \
88   X(snd_ctl_card_info_sizeof) \
89   X(snd_ctl_card_info_get_id) \
90   X(snd_ctl_card_info_get_name) \
91   X(snd_ctl_pcm_next_device) \
92   X(snd_ctl_pcm_info) \
93   X(snd_mixer_load) \
94   X(snd_mixer_free) \
95   X(snd_mixer_detach) \
96   X(snd_mixer_close) \
97   X(snd_mixer_open) \
98   X(snd_mixer_attach) \
99   X(snd_mixer_first_elem) \
100   X(snd_mixer_elem_next) \
101   X(snd_mixer_selem_get_name) \
102   X(snd_mixer_selem_is_active) \
103   X(snd_mixer_selem_register) \
104   X(snd_mixer_selem_set_playback_volume_all) \
105   X(snd_mixer_selem_get_playback_volume) \
106   X(snd_mixer_selem_has_playback_volume) \
107   X(snd_mixer_selem_get_playback_volume_range) \
108   X(snd_mixer_selem_has_playback_switch) \
109   X(snd_mixer_selem_get_playback_switch) \
110   X(snd_mixer_selem_set_playback_switch_all) \
111   X(snd_mixer_selem_has_capture_switch) \
112   X(snd_mixer_selem_get_capture_switch) \
113   X(snd_mixer_selem_set_capture_switch_all) \
114   X(snd_mixer_selem_has_capture_volume) \
115   X(snd_mixer_selem_set_capture_volume_all) \
116   X(snd_mixer_selem_get_capture_volume) \
117   X(snd_mixer_selem_get_capture_volume_range) \
118   X(snd_dlopen) \
119   X(snd_dlclose) \
120   X(snd_config) \
121   X(snd_config_search) \
122   X(snd_config_get_string) \
123   X(snd_config_search_definition) \
124   X(snd_config_get_type) \
125   X(snd_config_delete) \
126   X(snd_config_iterator_entry) \
127   X(snd_config_iterator_first) \
128   X(snd_config_iterator_next) \
129   X(snd_config_iterator_end) \
130   X(snd_config_delete_compound_members) \
131   X(snd_config_get_integer) \
132   X(snd_config_get_bool) \
133   X(snd_dlsym) \
134   X(snd_strerror) \
135   X(snd_lib_error) \
136   X(snd_lib_error_set_handler)
137 
138 LATE_BINDING_SYMBOL_TABLE_DECLARE_BEGIN(AlsaSymbolTable)
139 #define X(sym) \
140     LATE_BINDING_SYMBOL_TABLE_DECLARE_ENTRY(AlsaSymbolTable, sym)
141 ALSA_SYMBOLS_LIST
142 #undef X
143 LATE_BINDING_SYMBOL_TABLE_DECLARE_END(AlsaSymbolTable)
144 
145 }  // namespace webrtc_adm_linux_alsa
146 
147 #endif  // WEBRTC_AUDIO_DEVICE_ALSASYMBOLTABLE_LINUX_H
148