• 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 AUDIO_DEVICE_ALSASYMBOLTABLE_LINUX_H_
29 #define AUDIO_DEVICE_ALSASYMBOLTABLE_LINUX_H_
30 
31 #include "modules/audio_device/linux/latebindingsymboltable_linux.h"
32 
33 namespace webrtc {
34 namespace adm_linux_alsa {
35 
36 // The ALSA symbols we need, as an X-Macro list.
37 // This list must contain precisely every libasound function that is used in
38 // alsasoundsystem.cc.
39 #define ALSA_SYMBOLS_LIST                      \
40   X(snd_device_name_free_hint)                 \
41   X(snd_device_name_get_hint)                  \
42   X(snd_device_name_hint)                      \
43   X(snd_pcm_avail_update)                      \
44   X(snd_pcm_close)                             \
45   X(snd_pcm_delay)                             \
46   X(snd_pcm_drop)                              \
47   X(snd_pcm_open)                              \
48   X(snd_pcm_prepare)                           \
49   X(snd_pcm_readi)                             \
50   X(snd_pcm_recover)                           \
51   X(snd_pcm_resume)                            \
52   X(snd_pcm_reset)                             \
53   X(snd_pcm_state)                             \
54   X(snd_pcm_set_params)                        \
55   X(snd_pcm_get_params)                        \
56   X(snd_pcm_start)                             \
57   X(snd_pcm_stream)                            \
58   X(snd_pcm_frames_to_bytes)                   \
59   X(snd_pcm_bytes_to_frames)                   \
60   X(snd_pcm_wait)                              \
61   X(snd_pcm_writei)                            \
62   X(snd_pcm_info_get_class)                    \
63   X(snd_pcm_info_get_subdevices_avail)         \
64   X(snd_pcm_info_get_subdevice_name)           \
65   X(snd_pcm_info_set_subdevice)                \
66   X(snd_pcm_info_get_id)                       \
67   X(snd_pcm_info_set_device)                   \
68   X(snd_pcm_info_set_stream)                   \
69   X(snd_pcm_info_get_name)                     \
70   X(snd_pcm_info_get_subdevices_count)         \
71   X(snd_pcm_info_sizeof)                       \
72   X(snd_pcm_hw_params)                         \
73   X(snd_pcm_hw_params_malloc)                  \
74   X(snd_pcm_hw_params_free)                    \
75   X(snd_pcm_hw_params_any)                     \
76   X(snd_pcm_hw_params_set_access)              \
77   X(snd_pcm_hw_params_set_format)              \
78   X(snd_pcm_hw_params_set_channels)            \
79   X(snd_pcm_hw_params_set_rate_near)           \
80   X(snd_pcm_hw_params_set_buffer_size_near)    \
81   X(snd_card_next)                             \
82   X(snd_card_get_name)                         \
83   X(snd_config_update)                         \
84   X(snd_config_copy)                           \
85   X(snd_config_get_id)                         \
86   X(snd_ctl_open)                              \
87   X(snd_ctl_close)                             \
88   X(snd_ctl_card_info)                         \
89   X(snd_ctl_card_info_sizeof)                  \
90   X(snd_ctl_card_info_get_id)                  \
91   X(snd_ctl_card_info_get_name)                \
92   X(snd_ctl_pcm_next_device)                   \
93   X(snd_ctl_pcm_info)                          \
94   X(snd_mixer_load)                            \
95   X(snd_mixer_free)                            \
96   X(snd_mixer_detach)                          \
97   X(snd_mixer_close)                           \
98   X(snd_mixer_open)                            \
99   X(snd_mixer_attach)                          \
100   X(snd_mixer_first_elem)                      \
101   X(snd_mixer_elem_next)                       \
102   X(snd_mixer_selem_get_name)                  \
103   X(snd_mixer_selem_is_active)                 \
104   X(snd_mixer_selem_register)                  \
105   X(snd_mixer_selem_set_playback_volume_all)   \
106   X(snd_mixer_selem_get_playback_volume)       \
107   X(snd_mixer_selem_has_playback_volume)       \
108   X(snd_mixer_selem_get_playback_volume_range) \
109   X(snd_mixer_selem_has_playback_switch)       \
110   X(snd_mixer_selem_get_playback_switch)       \
111   X(snd_mixer_selem_set_playback_switch_all)   \
112   X(snd_mixer_selem_has_capture_switch)        \
113   X(snd_mixer_selem_get_capture_switch)        \
114   X(snd_mixer_selem_set_capture_switch_all)    \
115   X(snd_mixer_selem_has_capture_volume)        \
116   X(snd_mixer_selem_set_capture_volume_all)    \
117   X(snd_mixer_selem_get_capture_volume)        \
118   X(snd_mixer_selem_get_capture_volume_range)  \
119   X(snd_dlopen)                                \
120   X(snd_dlclose)                               \
121   X(snd_config)                                \
122   X(snd_config_search)                         \
123   X(snd_config_get_string)                     \
124   X(snd_config_search_definition)              \
125   X(snd_config_get_type)                       \
126   X(snd_config_delete)                         \
127   X(snd_config_iterator_entry)                 \
128   X(snd_config_iterator_first)                 \
129   X(snd_config_iterator_next)                  \
130   X(snd_config_iterator_end)                   \
131   X(snd_config_delete_compound_members)        \
132   X(snd_config_get_integer)                    \
133   X(snd_config_get_bool)                       \
134   X(snd_dlsym)                                 \
135   X(snd_strerror)                              \
136   X(snd_lib_error)                             \
137   X(snd_lib_error_set_handler)
138 
139 LATE_BINDING_SYMBOL_TABLE_DECLARE_BEGIN(AlsaSymbolTable)
140 #define X(sym) 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 adm_linux_alsa
146 }  // namespace webrtc
147 
148 #endif  // AUDIO_DEVICE_ALSASYMBOLTABLE_LINUX_H_
149