summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisael Lopez Cruz2013-10-23 01:32:27 -0500
committerAngela Stegmaier2013-11-01 11:42:55 -0500
commit5aadbddedac5f56c83535c45c6c940ef67c96b5d (patch)
tree8440df0f50fec7fe4758cc8e365096ad32c4f255
parentc81ce74a427ed2112cf82a9d012b932d929a5afa (diff)
downloaddevice-ti-common-open-5aadbddedac5f56c83535c45c6c940ef67c96b5d.tar.gz
device-ti-common-open-5aadbddedac5f56c83535c45c6c940ef67c96b5d.tar.xz
device-ti-common-open-5aadbddedac5f56c83535c45c6c940ef67c96b5d.zip
audio: tiaudioutils: Add initial implementation
The tiaudioutils library is meant to provide building blocks to facilitate the implementation of AudioHALs that use multizone audio. Change-Id: I90c7af12aa69ea3bba12efc9cb517abef4ab0dcd Signed-off-by: Angela Stegmaier <a0866189@ti.com> Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
-rw-r--r--audio/utils/Android.mk54
-rw-r--r--audio/utils/doc/Doxyfile1781
-rw-r--r--audio/utils/include/tiaudioutils/ALSAMixer.h329
-rw-r--r--audio/utils/include/tiaudioutils/ALSAPcm.h235
-rw-r--r--audio/utils/include/tiaudioutils/Base.h251
-rw-r--r--audio/utils/include/tiaudioutils/Log.h30
-rw-r--r--audio/utils/include/tiaudioutils/MonoPipe.h284
-rw-r--r--audio/utils/include/tiaudioutils/MumStream.h257
-rw-r--r--audio/utils/include/tiaudioutils/Pcm.h377
-rw-r--r--audio/utils/include/tiaudioutils/Resampler.h219
-rw-r--r--audio/utils/include/tiaudioutils/SimpleStream.h509
-rw-r--r--audio/utils/include/tiaudioutils/Stream.h1072
-rw-r--r--audio/utils/src/ALSAMixer.cpp331
-rw-r--r--audio/utils/src/ALSAPcm.cpp210
-rw-r--r--audio/utils/src/Base.cpp185
-rw-r--r--audio/utils/src/MonoPipe.cpp226
-rw-r--r--audio/utils/src/MumStream.cpp449
-rw-r--r--audio/utils/src/Pcm.cpp122
-rw-r--r--audio/utils/src/Resampler.cpp292
-rw-r--r--audio/utils/src/SimpleStream.cpp605
-rw-r--r--audio/utils/src/Stream.cpp1088
21 files changed, 8906 insertions, 0 deletions
diff --git a/audio/utils/Android.mk b/audio/utils/Android.mk
new file mode 100644
index 0000000..c038c56
--- /dev/null
+++ b/audio/utils/Android.mk
@@ -0,0 +1,54 @@
1# Copyright (C) 2013 Texas Instruments
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH := $(call my-dir)
16
17include $(CLEAR_VARS)
18
19LOCAL_MODULE := libtiaudioutils
20
21LOCAL_SRC_FILES := \
22 src/Base.cpp \
23 src/Pcm.cpp \
24 src/ALSAPcm.cpp \
25 src/ALSAMixer.cpp \
26 src/SimpleStream.cpp \
27 src/MumStream.cpp \
28 src/Stream.cpp \
29 src/Resampler.cpp \
30 src/MonoPipe.cpp
31
32LOCAL_C_INCLUDES += \
33 $(LOCAL_PATH)/include \
34 external/tinyalsa/include \
35 external/speex/include \
36 system/media/audio_utils/include \
37 system/media/audio_route/include \
38 frameworks/av/include
39
40LOCAL_SHARED_LIBRARIES := \
41 liblog \
42 libtinyalsa \
43 libspeexresampler \
44 libaudioutils \
45 libaudioroute \
46 libnbaio \
47 libutils
48
49LOCAL_SHARED_LIBRARIES += libstlport
50include external/stlport/libstlport.mk
51
52LOCAL_MODULE_TAGS := optional
53
54include $(BUILD_SHARED_LIBRARY)
diff --git a/audio/utils/doc/Doxyfile b/audio/utils/doc/Doxyfile
new file mode 100644
index 0000000..78568d6
--- /dev/null
+++ b/audio/utils/doc/Doxyfile
@@ -0,0 +1,1781 @@
1# Doxyfile 1.7.6.1
2
3# This file describes the settings to be used by the documentation system
4# doxygen (www.doxygen.org) for a project.
5#
6# All text after a hash (#) is considered a comment and will be ignored.
7# The format is:
8# TAG = value [value, ...]
9# For lists items can also be appended using:
10# TAG += value [value, ...]
11# Values that contain spaces should be placed between quotes (" ").
12
13#---------------------------------------------------------------------------
14# Project related configuration options
15#---------------------------------------------------------------------------
16
17# This tag specifies the encoding used for all characters in the config file
18# that follow. The default is UTF-8 which is also the encoding used for all
19# text before the first occurrence of this tag. Doxygen uses libiconv (or the
20# iconv built into libc) for the transcoding. See
21# http://www.gnu.org/software/libiconv for the list of possible encodings.
22
23DOXYFILE_ENCODING = UTF-8
24
25# The PROJECT_NAME tag is a single word (or sequence of words) that should
26# identify the project. Note that if you do not use Doxywizard you need
27# to put quotes around the project name if it contains spaces.
28
29PROJECT_NAME = "libtiaudioutils"
30
31# The PROJECT_NUMBER tag can be used to enter a project or revision number.
32# This could be handy for archiving the generated documentation or
33# if some version control system is used.
34
35PROJECT_NUMBER =
36
37# Using the PROJECT_BRIEF tag one can provide an optional one line description
38# for a project that appears at the top of each page and should give viewer
39# a quick idea about the purpose of the project. Keep the description short.
40
41PROJECT_BRIEF =
42
43# With the PROJECT_LOGO tag one can specify an logo or icon that is
44# included in the documentation. The maximum height of the logo should not
45# exceed 55 pixels and the maximum width should not exceed 200 pixels.
46# Doxygen will copy the logo to the output directory.
47
48PROJECT_LOGO =
49
50# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
51# base path where the generated documentation will be put.
52# If a relative path is entered, it will be relative to the location
53# where doxygen was started. If left blank the current directory will be used.
54
55OUTPUT_DIRECTORY =
56
57# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
58# 4096 sub-directories (in 2 levels) under the output directory of each output
59# format and will distribute the generated files over these directories.
60# Enabling this option can be useful when feeding doxygen a huge amount of
61# source files, where putting all generated files in the same directory would
62# otherwise cause performance problems for the file system.
63
64CREATE_SUBDIRS = NO
65
66# The OUTPUT_LANGUAGE tag is used to specify the language in which all
67# documentation generated by doxygen is written. Doxygen will use this
68# information to generate all constant output in the proper language.
69# The default language is English, other supported languages are:
70# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
71# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
72# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
73# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
74# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
75# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
76
77OUTPUT_LANGUAGE = English
78
79# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
80# include brief member descriptions after the members that are listed in
81# the file and class documentation (similar to JavaDoc).
82# Set to NO to disable this.
83
84BRIEF_MEMBER_DESC = YES
85
86# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
87# the brief description of a member or function before the detailed description.
88# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
89# brief descriptions will be completely suppressed.
90
91REPEAT_BRIEF = YES
92
93# This tag implements a quasi-intelligent brief description abbreviator
94# that is used to form the text in various listings. Each string
95# in this list, if found as the leading text of the brief description, will be
96# stripped from the text and the result after processing the whole list, is
97# used as the annotated text. Otherwise, the brief description is used as-is.
98# If left blank, the following values are used ("$name" is automatically
99# replaced with the name of the entity): "The $name class" "The $name widget"
100# "The $name file" "is" "provides" "specifies" "contains"
101# "represents" "a" "an" "the"
102
103ABBREVIATE_BRIEF =
104
105# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
106# Doxygen will generate a detailed section even if there is only a brief
107# description.
108
109ALWAYS_DETAILED_SEC = NO
110
111# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
112# inherited members of a class in the documentation of that class as if those
113# members were ordinary class members. Constructors, destructors and assignment
114# operators of the base classes will not be shown.
115
116INLINE_INHERITED_MEMB = NO
117
118# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
119# path before files name in the file list and in the header files. If set
120# to NO the shortest path that makes the file name unique will be used.
121
122FULL_PATH_NAMES = YES
123
124# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
125# can be used to strip a user-defined part of the path. Stripping is
126# only done if one of the specified strings matches the left-hand part of
127# the path. The tag can be used to show relative paths in the file list.
128# If left blank the directory from which doxygen is run is used as the
129# path to strip.
130
131STRIP_FROM_PATH =
132
133# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
134# the path mentioned in the documentation of a class, which tells
135# the reader which header file to include in order to use a class.
136# If left blank only the name of the header file containing the class
137# definition is used. Otherwise one should specify the include paths that
138# are normally passed to the compiler using the -I flag.
139
140STRIP_FROM_INC_PATH =
141
142# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
143# (but less readable) file names. This can be useful if your file system
144# doesn't support long names like on DOS, Mac, or CD-ROM.
145
146SHORT_NAMES = NO
147
148# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
149# will interpret the first line (until the first dot) of a JavaDoc-style
150# comment as the brief description. If set to NO, the JavaDoc
151# comments will behave just like regular Qt-style comments
152# (thus requiring an explicit @brief command for a brief description.)
153
154JAVADOC_AUTOBRIEF = NO
155
156# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
157# interpret the first line (until the first dot) of a Qt-style
158# comment as the brief description. If set to NO, the comments
159# will behave just like regular Qt-style comments (thus requiring
160# an explicit \brief command for a brief description.)
161
162QT_AUTOBRIEF = NO
163
164# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
165# treat a multi-line C++ special comment block (i.e. a block of //! or ///
166# comments) as a brief description. This used to be the default behaviour.
167# The new default is to treat a multi-line C++ comment block as a detailed
168# description. Set this tag to YES if you prefer the old behaviour instead.
169
170MULTILINE_CPP_IS_BRIEF = NO
171
172# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
173# member inherits the documentation from any documented member that it
174# re-implements.
175
176INHERIT_DOCS = YES
177
178# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
179# a new page for each member. If set to NO, the documentation of a member will
180# be part of the file/class/namespace that contains it.
181
182SEPARATE_MEMBER_PAGES = NO
183
184# The TAB_SIZE tag can be used to set the number of spaces in a tab.
185# Doxygen uses this value to replace tabs by spaces in code fragments.
186
187TAB_SIZE = 8
188
189# This tag can be used to specify a number of aliases that acts
190# as commands in the documentation. An alias has the form "name=value".
191# For example adding "sideeffect=\par Side Effects:\n" will allow you to
192# put the command \sideeffect (or @sideeffect) in the documentation, which
193# will result in a user-defined paragraph with heading "Side Effects:".
194# You can put \n's in the value part of an alias to insert newlines.
195
196ALIASES =
197
198# This tag can be used to specify a number of word-keyword mappings (TCL only).
199# A mapping has the form "name=value". For example adding
200# "class=itcl::class" will allow you to use the command class in the
201# itcl::class meaning.
202
203TCL_SUBST =
204
205# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
206# sources only. Doxygen will then generate output that is more tailored for C.
207# For instance, some of the names that are used will be different. The list
208# of all members will be omitted, etc.
209
210OPTIMIZE_OUTPUT_FOR_C = NO
211
212# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
213# sources only. Doxygen will then generate output that is more tailored for
214# Java. For instance, namespaces will be presented as packages, qualified
215# scopes will look different, etc.
216
217OPTIMIZE_OUTPUT_JAVA = NO
218
219# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
220# sources only. Doxygen will then generate output that is more tailored for
221# Fortran.
222
223OPTIMIZE_FOR_FORTRAN = NO
224
225# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
226# sources. Doxygen will then generate output that is tailored for
227# VHDL.
228
229OPTIMIZE_OUTPUT_VHDL = NO
230
231# Doxygen selects the parser to use depending on the extension of the files it
232# parses. With this tag you can assign which parser to use for a given extension.
233# Doxygen has a built-in mapping, but you can override or extend it using this
234# tag. The format is ext=language, where ext is a file extension, and language
235# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
236# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
237# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
238# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
239# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
240
241EXTENSION_MAPPING =
242
243# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
244# to include (a tag file for) the STL sources as input, then you should
245# set this tag to YES in order to let doxygen match functions declarations and
246# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
247# func(std::string) {}). This also makes the inheritance and collaboration
248# diagrams that involve STL classes more complete and accurate.
249
250BUILTIN_STL_SUPPORT = NO
251
252# If you use Microsoft's C++/CLI language, you should set this option to YES to
253# enable parsing support.
254
255CPP_CLI_SUPPORT = NO
256
257# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
258# Doxygen will parse them like normal C++ but will assume all classes use public
259# instead of private inheritance when no explicit protection keyword is present.
260
261SIP_SUPPORT = NO
262
263# For Microsoft's IDL there are propget and propput attributes to indicate getter
264# and setter methods for a property. Setting this option to YES (the default)
265# will make doxygen replace the get and set methods by a property in the
266# documentation. This will only work if the methods are indeed getting or
267# setting a simple type. If this is not the case, or you want to show the
268# methods anyway, you should set this option to NO.
269
270IDL_PROPERTY_SUPPORT = YES
271
272# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
273# tag is set to YES, then doxygen will reuse the documentation of the first
274# member in the group (if any) for the other members of the group. By default
275# all members of a group must be documented explicitly.
276
277DISTRIBUTE_GROUP_DOC = NO
278
279# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
280# the same type (for instance a group of public functions) to be put as a
281# subgroup of that type (e.g. under the Public Functions section). Set it to
282# NO to prevent subgrouping. Alternatively, this can be done per class using
283# the \nosubgrouping command.
284
285SUBGROUPING = YES
286
287# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
288# unions are shown inside the group in which they are included (e.g. using
289# @ingroup) instead of on a separate page (for HTML and Man pages) or
290# section (for LaTeX and RTF).
291
292INLINE_GROUPED_CLASSES = NO
293
294# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
295# unions with only public data fields will be shown inline in the documentation
296# of the scope in which they are defined (i.e. file, namespace, or group
297# documentation), provided this scope is documented. If set to NO (the default),
298# structs, classes, and unions are shown on a separate page (for HTML and Man
299# pages) or section (for LaTeX and RTF).
300
301INLINE_SIMPLE_STRUCTS = NO
302
303# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
304# is documented as struct, union, or enum with the name of the typedef. So
305# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
306# with name TypeT. When disabled the typedef will appear as a member of a file,
307# namespace, or class. And the struct will be named TypeS. This can typically
308# be useful for C code in case the coding convention dictates that all compound
309# types are typedef'ed and only the typedef is referenced, never the tag name.
310
311TYPEDEF_HIDES_STRUCT = NO
312
313# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
314# determine which symbols to keep in memory and which to flush to disk.
315# When the cache is full, less often used symbols will be written to disk.
316# For small to medium size projects (<1000 input files) the default value is
317# probably good enough. For larger projects a too small cache size can cause
318# doxygen to be busy swapping symbols to and from disk most of the time
319# causing a significant performance penalty.
320# If the system has enough physical memory increasing the cache will improve the
321# performance by keeping more symbols in memory. Note that the value works on
322# a logarithmic scale so increasing the size by one will roughly double the
323# memory usage. The cache size is given by this formula:
324# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
325# corresponding to a cache size of 2^16 = 65536 symbols.
326
327SYMBOL_CACHE_SIZE = 0
328
329# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
330# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
331# their name and scope. Since this can be an expensive process and often the
332# same symbol appear multiple times in the code, doxygen keeps a cache of
333# pre-resolved symbols. If the cache is too small doxygen will become slower.
334# If the cache is too large, memory is wasted. The cache size is given by this
335# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
336# corresponding to a cache size of 2^16 = 65536 symbols.
337
338LOOKUP_CACHE_SIZE = 0
339
340#---------------------------------------------------------------------------
341# Build related configuration options
342#---------------------------------------------------------------------------
343
344# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
345# documentation are documented, even if no documentation was available.
346# Private class members and static file members will be hidden unless
347# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
348
349EXTRACT_ALL = NO
350
351# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
352# will be included in the documentation.
353
354EXTRACT_PRIVATE = NO
355
356# If the EXTRACT_STATIC tag is set to YES all static members of a file
357# will be included in the documentation.
358
359EXTRACT_STATIC = NO
360
361# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
362# defined locally in source files will be included in the documentation.
363# If set to NO only classes defined in header files are included.
364
365EXTRACT_LOCAL_CLASSES = YES
366
367# This flag is only useful for Objective-C code. When set to YES local
368# methods, which are defined in the implementation section but not in
369# the interface are included in the documentation.
370# If set to NO (the default) only methods in the interface are included.
371
372EXTRACT_LOCAL_METHODS = NO
373
374# If this flag is set to YES, the members of anonymous namespaces will be
375# extracted and appear in the documentation as a namespace called
376# 'anonymous_namespace{file}', where file will be replaced with the base
377# name of the file that contains the anonymous namespace. By default
378# anonymous namespaces are hidden.
379
380EXTRACT_ANON_NSPACES = NO
381
382# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
383# undocumented members of documented classes, files or namespaces.
384# If set to NO (the default) these members will be included in the
385# various overviews, but no documentation section is generated.
386# This option has no effect if EXTRACT_ALL is enabled.
387
388HIDE_UNDOC_MEMBERS = NO
389
390# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
391# undocumented classes that are normally visible in the class hierarchy.
392# If set to NO (the default) these classes will be included in the various
393# overviews. This option has no effect if EXTRACT_ALL is enabled.
394
395HIDE_UNDOC_CLASSES = NO
396
397# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
398# friend (class|struct|union) declarations.
399# If set to NO (the default) these declarations will be included in the
400# documentation.
401
402HIDE_FRIEND_COMPOUNDS = NO
403
404# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
405# documentation blocks found inside the body of a function.
406# If set to NO (the default) these blocks will be appended to the
407# function's detailed documentation block.
408
409HIDE_IN_BODY_DOCS = NO
410
411# The INTERNAL_DOCS tag determines if documentation
412# that is typed after a \internal command is included. If the tag is set
413# to NO (the default) then the documentation will be excluded.
414# Set it to YES to include the internal documentation.
415
416INTERNAL_DOCS = NO
417
418# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
419# file names in lower-case letters. If set to YES upper-case letters are also
420# allowed. This is useful if you have classes or files whose names only differ
421# in case and if your file system supports case sensitive file names. Windows
422# and Mac users are advised to set this option to NO.
423
424CASE_SENSE_NAMES = YES
425
426# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
427# will show members with their full class and namespace scopes in the
428# documentation. If set to YES the scope will be hidden.
429
430HIDE_SCOPE_NAMES = NO
431
432# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
433# will put a list of the files that are included by a file in the documentation
434# of that file.
435
436SHOW_INCLUDE_FILES = YES
437
438# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
439# will list include files with double quotes in the documentation
440# rather than with sharp brackets.
441
442FORCE_LOCAL_INCLUDES = NO
443
444# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
445# is inserted in the documentation for inline members.
446
447INLINE_INFO = YES
448
449# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
450# will sort the (detailed) documentation of file and class members
451# alphabetically by member name. If set to NO the members will appear in
452# declaration order.
453
454SORT_MEMBER_DOCS = YES
455
456# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
457# brief documentation of file, namespace and class members alphabetically
458# by member name. If set to NO (the default) the members will appear in
459# declaration order.
460
461SORT_BRIEF_DOCS = NO
462
463# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
464# will sort the (brief and detailed) documentation of class members so that
465# constructors and destructors are listed first. If set to NO (the default)
466# the constructors will appear in the respective orders defined by
467# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
468# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
469# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
470
471SORT_MEMBERS_CTORS_1ST = NO
472
473# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
474# hierarchy of group names into alphabetical order. If set to NO (the default)
475# the group names will appear in their defined order.
476
477SORT_GROUP_NAMES = NO
478
479# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
480# sorted by fully-qualified names, including namespaces. If set to
481# NO (the default), the class list will be sorted only by class name,
482# not including the namespace part.
483# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
484# Note: This option applies only to the class list, not to the
485# alphabetical list.
486
487SORT_BY_SCOPE_NAME = NO
488
489# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
490# do proper type resolution of all parameters of a function it will reject a
491# match between the prototype and the implementation of a member function even
492# if there is only one candidate or it is obvious which candidate to choose
493# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
494# will still accept a match between prototype and implementation in such cases.
495
496STRICT_PROTO_MATCHING = NO
497
498# The GENERATE_TODOLIST tag can be used to enable (YES) or
499# disable (NO) the todo list. This list is created by putting \todo
500# commands in the documentation.
501
502GENERATE_TODOLIST = YES
503
504# The GENERATE_TESTLIST tag can be used to enable (YES) or
505# disable (NO) the test list. This list is created by putting \test
506# commands in the documentation.
507
508GENERATE_TESTLIST = YES
509
510# The GENERATE_BUGLIST tag can be used to enable (YES) or
511# disable (NO) the bug list. This list is created by putting \bug
512# commands in the documentation.
513
514GENERATE_BUGLIST = YES
515
516# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
517# disable (NO) the deprecated list. This list is created by putting
518# \deprecated commands in the documentation.
519
520GENERATE_DEPRECATEDLIST= YES
521
522# The ENABLED_SECTIONS tag can be used to enable conditional
523# documentation sections, marked by \if sectionname ... \endif.
524
525ENABLED_SECTIONS =
526
527# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
528# the initial value of a variable or macro consists of for it to appear in
529# the documentation. If the initializer consists of more lines than specified
530# here it will be hidden. Use a value of 0 to hide initializers completely.
531# The appearance of the initializer of individual variables and macros in the
532# documentation can be controlled using \showinitializer or \hideinitializer
533# command in the documentation regardless of this setting.
534
535MAX_INITIALIZER_LINES = 30
536
537# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
538# at the bottom of the documentation of classes and structs. If set to YES the
539# list will mention the files that were used to generate the documentation.
540
541SHOW_USED_FILES = YES
542
543# If the sources in your project are distributed over multiple directories
544# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
545# in the documentation. The default is NO.
546
547SHOW_DIRECTORIES = NO
548
549# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
550# This will remove the Files entry from the Quick Index and from the
551# Folder Tree View (if specified). The default is YES.
552
553SHOW_FILES = YES
554
555# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
556# Namespaces page.
557# This will remove the Namespaces entry from the Quick Index
558# and from the Folder Tree View (if specified). The default is YES.
559
560SHOW_NAMESPACES = YES
561
562# The FILE_VERSION_FILTER tag can be used to specify a program or script that
563# doxygen should invoke to get the current version for each file (typically from
564# the version control system). Doxygen will invoke the program by executing (via
565# popen()) the command <command> <input-file>, where <command> is the value of
566# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
567# provided by doxygen. Whatever the program writes to standard output
568# is used as the file version. See the manual for examples.
569
570FILE_VERSION_FILTER =
571
572# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
573# by doxygen. The layout file controls the global structure of the generated
574# output files in an output format independent way. The create the layout file
575# that represents doxygen's defaults, run doxygen with the -l option.
576# You can optionally specify a file name after the option, if omitted
577# DoxygenLayout.xml will be used as the name of the layout file.
578
579LAYOUT_FILE =
580
581# The CITE_BIB_FILES tag can be used to specify one or more bib files
582# containing the references data. This must be a list of .bib files. The
583# .bib extension is automatically appended if omitted. Using this command
584# requires the bibtex tool to be installed. See also
585# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
586# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
587# feature you need bibtex and perl available in the search path.
588
589CITE_BIB_FILES =
590
591#---------------------------------------------------------------------------
592# configuration options related to warning and progress messages
593#---------------------------------------------------------------------------
594
595# The QUIET tag can be used to turn on/off the messages that are generated
596# by doxygen. Possible values are YES and NO. If left blank NO is used.
597
598QUIET = NO
599
600# The WARNINGS tag can be used to turn on/off the warning messages that are
601# generated by doxygen. Possible values are YES and NO. If left blank
602# NO is used.
603
604WARNINGS = YES
605
606# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
607# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
608# automatically be disabled.
609
610WARN_IF_UNDOCUMENTED = YES
611
612# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
613# potential errors in the documentation, such as not documenting some
614# parameters in a documented function, or documenting parameters that
615# don't exist or using markup commands wrongly.
616
617WARN_IF_DOC_ERROR = YES
618
619# The WARN_NO_PARAMDOC option can be enabled to get warnings for
620# functions that are documented, but have no documentation for their parameters
621# or return value. If set to NO (the default) doxygen will only warn about
622# wrong or incomplete parameter documentation, but not about the absence of
623# documentation.
624
625WARN_NO_PARAMDOC = NO
626
627# The WARN_FORMAT tag determines the format of the warning messages that
628# doxygen can produce. The string should contain the $file, $line, and $text
629# tags, which will be replaced by the file and line number from which the
630# warning originated and the warning text. Optionally the format may contain
631# $version, which will be replaced by the version of the file (if it could
632# be obtained via FILE_VERSION_FILTER)
633
634WARN_FORMAT = "$file:$line: $text"
635
636# The WARN_LOGFILE tag can be used to specify a file to which warning
637# and error messages should be written. If left blank the output is written
638# to stderr.
639
640WARN_LOGFILE =
641
642#---------------------------------------------------------------------------
643# configuration options related to the input files
644#---------------------------------------------------------------------------
645
646# The INPUT tag can be used to specify the files and/or directories that contain
647# documented source files. You may enter file names like "myfile.cpp" or
648# directories like "/usr/src/myproject". Separate the files or directories
649# with spaces.
650
651INPUT =
652
653# This tag can be used to specify the character encoding of the source files
654# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
655# also the default input encoding. Doxygen uses libiconv (or the iconv built
656# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
657# the list of possible encodings.
658
659INPUT_ENCODING = UTF-8
660
661# If the value of the INPUT tag contains directories, you can use the
662# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
663# and *.h) to filter out the source-files in the directories. If left
664# blank the following patterns are tested:
665# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
666# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
667# *.f90 *.f *.for *.vhd *.vhdl
668
669FILE_PATTERNS =
670
671# The RECURSIVE tag can be used to turn specify whether or not subdirectories
672# should be searched for input files as well. Possible values are YES and NO.
673# If left blank NO is used.
674
675RECURSIVE = YES
676
677# The EXCLUDE tag can be used to specify files and/or directories that should be
678# excluded from the INPUT source files. This way you can easily exclude a
679# subdirectory from a directory tree whose root is specified with the INPUT tag.
680# Note that relative paths are relative to the directory from which doxygen is
681# run.
682
683EXCLUDE =
684
685# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
686# directories that are symbolic links (a Unix file system feature) are excluded
687# from the input.
688
689EXCLUDE_SYMLINKS = NO
690
691# If the value of the INPUT tag contains directories, you can use the
692# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
693# certain files from those directories. Note that the wildcards are matched
694# against the file with absolute path, so to exclude all test directories
695# for example use the pattern */test/*
696
697EXCLUDE_PATTERNS = */test/*
698
699# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
700# (namespaces, classes, functions, etc.) that should be excluded from the
701# output. The symbol name can be a fully qualified name, a word, or if the
702# wildcard * is used, a substring. Examples: ANamespace, AClass,
703# AClass::ANamespace, ANamespace::*Test
704
705EXCLUDE_SYMBOLS =
706
707# The EXAMPLE_PATH tag can be used to specify one or more files or
708# directories that contain example code fragments that are included (see
709# the \include command).
710
711EXAMPLE_PATH =
712
713# If the value of the EXAMPLE_PATH tag contains directories, you can use the
714# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
715# and *.h) to filter out the source-files in the directories. If left
716# blank all files are included.
717
718EXAMPLE_PATTERNS =
719
720# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
721# searched for input files to be used with the \include or \dontinclude
722# commands irrespective of the value of the RECURSIVE tag.
723# Possible values are YES and NO. If left blank NO is used.
724
725EXAMPLE_RECURSIVE = NO
726
727# The IMAGE_PATH tag can be used to specify one or more files or
728# directories that contain image that are included in the documentation (see
729# the \image command).
730
731IMAGE_PATH =
732
733# The INPUT_FILTER tag can be used to specify a program that doxygen should
734# invoke to filter for each input file. Doxygen will invoke the filter program
735# by executing (via popen()) the command <filter> <input-file>, where <filter>
736# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
737# input file. Doxygen will then use the output that the filter program writes
738# to standard output.
739# If FILTER_PATTERNS is specified, this tag will be
740# ignored.
741
742INPUT_FILTER =
743
744# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
745# basis.
746# Doxygen will compare the file name with each pattern and apply the
747# filter if there is a match.
748# The filters are a list of the form:
749# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
750# info on how filters are used. If FILTER_PATTERNS is empty or if
751# non of the patterns match the file name, INPUT_FILTER is applied.
752
753FILTER_PATTERNS =
754
755# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
756# INPUT_FILTER) will be used to filter the input files when producing source
757# files to browse (i.e. when SOURCE_BROWSER is set to YES).
758
759FILTER_SOURCE_FILES = NO
760
761# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
762# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
763# and it is also possible to disable source filtering for a specific pattern
764# using *.ext= (so without naming a filter). This option only has effect when
765# FILTER_SOURCE_FILES is enabled.
766
767FILTER_SOURCE_PATTERNS =
768
769#---------------------------------------------------------------------------
770# configuration options related to source browsing
771#---------------------------------------------------------------------------
772
773# If the SOURCE_BROWSER tag is set to YES then a list of source files will
774# be generated. Documented entities will be cross-referenced with these sources.
775# Note: To get rid of all source code in the generated output, make sure also
776# VERBATIM_HEADERS is set to NO.
777
778SOURCE_BROWSER = NO
779
780# Setting the INLINE_SOURCES tag to YES will include the body
781# of functions and classes directly in the documentation.
782
783INLINE_SOURCES = NO
784
785# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
786# doxygen to hide any special comment blocks from generated source code
787# fragments. Normal C and C++ comments will always remain visible.
788
789STRIP_CODE_COMMENTS = YES
790
791# If the REFERENCED_BY_RELATION tag is set to YES
792# then for each documented function all documented
793# functions referencing it will be listed.
794
795REFERENCED_BY_RELATION = NO
796
797# If the REFERENCES_RELATION tag is set to YES
798# then for each documented function all documented entities
799# called/used by that function will be listed.
800
801REFERENCES_RELATION = NO
802
803# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
804# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
805# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
806# link to the source code.
807# Otherwise they will link to the documentation.
808
809REFERENCES_LINK_SOURCE = YES
810
811# If the USE_HTAGS tag is set to YES then the references to source code
812# will point to the HTML generated by the htags(1) tool instead of doxygen
813# built-in source browser. The htags tool is part of GNU's global source
814# tagging system (see http://www.gnu.org/software/global/global.html). You
815# will need version 4.8.6 or higher.
816
817USE_HTAGS = NO
818
819# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
820# will generate a verbatim copy of the header file for each class for
821# which an include is specified. Set to NO to disable this.
822
823VERBATIM_HEADERS = YES
824
825#---------------------------------------------------------------------------
826# configuration options related to the alphabetical class index
827#---------------------------------------------------------------------------
828
829# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
830# of all compounds will be generated. Enable this if the project
831# contains a lot of classes, structs, unions or interfaces.
832
833ALPHABETICAL_INDEX = YES
834
835# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
836# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
837# in which this list will be split (can be a number in the range [1..20])
838
839COLS_IN_ALPHA_INDEX = 5
840
841# In case all classes in a project start with a common prefix, all
842# classes will be put under the same header in the alphabetical index.
843# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
844# should be ignored while generating the index headers.
845
846IGNORE_PREFIX =
847
848#---------------------------------------------------------------------------
849# configuration options related to the HTML output
850#---------------------------------------------------------------------------
851
852# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
853# generate HTML output.
854
855GENERATE_HTML = YES
856
857# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
858# If a relative path is entered the value of OUTPUT_DIRECTORY will be
859# put in front of it. If left blank `html' will be used as the default path.
860
861HTML_OUTPUT = html
862
863# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
864# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
865# doxygen will generate files with .html extension.
866
867HTML_FILE_EXTENSION = .html
868
869# The HTML_HEADER tag can be used to specify a personal HTML header for
870# each generated HTML page. If it is left blank doxygen will generate a
871# standard header. Note that when using a custom header you are responsible
872# for the proper inclusion of any scripts and style sheets that doxygen
873# needs, which is dependent on the configuration options used.
874# It is advised to generate a default header using "doxygen -w html
875# header.html footer.html stylesheet.css YourConfigFile" and then modify
876# that header. Note that the header is subject to change so you typically
877# have to redo this when upgrading to a newer version of doxygen or when
878# changing the value of configuration settings such as GENERATE_TREEVIEW!
879
880HTML_HEADER =
881
882# The HTML_FOOTER tag can be used to specify a personal HTML footer for
883# each generated HTML page. If it is left blank doxygen will generate a
884# standard footer.
885
886HTML_FOOTER =
887
888# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
889# style sheet that is used by each HTML page. It can be used to
890# fine-tune the look of the HTML output. If the tag is left blank doxygen
891# will generate a default style sheet. Note that doxygen will try to copy
892# the style sheet file to the HTML output directory, so don't put your own
893# style sheet in the HTML output directory as well, or it will be erased!
894
895HTML_STYLESHEET =
896
897# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
898# other source files which should be copied to the HTML output directory. Note
899# that these files will be copied to the base HTML output directory. Use the
900# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
901# files. In the HTML_STYLESHEET file, use the file name only. Also note that
902# the files will be copied as-is; there are no commands or markers available.
903
904HTML_EXTRA_FILES =
905
906# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
907# Doxygen will adjust the colors in the style sheet and background images
908# according to this color. Hue is specified as an angle on a colorwheel,
909# see http://en.wikipedia.org/wiki/Hue for more information.
910# For instance the value 0 represents red, 60 is yellow, 120 is green,
911# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
912# The allowed range is 0 to 359.
913
914HTML_COLORSTYLE_HUE = 220
915
916# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
917# the colors in the HTML output. For a value of 0 the output will use
918# grayscales only. A value of 255 will produce the most vivid colors.
919
920HTML_COLORSTYLE_SAT = 100
921
922# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
923# the luminance component of the colors in the HTML output. Values below
924# 100 gradually make the output lighter, whereas values above 100 make
925# the output darker. The value divided by 100 is the actual gamma applied,
926# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
927# and 100 does not change the gamma.
928
929HTML_COLORSTYLE_GAMMA = 80
930
931# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
932# page will contain the date and time when the page was generated. Setting
933# this to NO can help when comparing the output of multiple runs.
934
935HTML_TIMESTAMP = YES
936
937# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
938# files or namespaces will be aligned in HTML using tables. If set to
939# NO a bullet list will be used.
940
941HTML_ALIGN_MEMBERS = YES
942
943# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
944# documentation will contain sections that can be hidden and shown after the
945# page has loaded. For this to work a browser that supports
946# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
947# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
948
949HTML_DYNAMIC_SECTIONS = NO
950
951# If the GENERATE_DOCSET tag is set to YES, additional index files
952# will be generated that can be used as input for Apple's Xcode 3
953# integrated development environment, introduced with OSX 10.5 (Leopard).
954# To create a documentation set, doxygen will generate a Makefile in the
955# HTML output directory. Running make will produce the docset in that
956# directory and running "make install" will install the docset in
957# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
958# it at startup.
959# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
960# for more information.
961
962GENERATE_DOCSET = NO
963
964# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
965# feed. A documentation feed provides an umbrella under which multiple
966# documentation sets from a single provider (such as a company or product suite)
967# can be grouped.
968
969DOCSET_FEEDNAME = "Doxygen generated docs"
970
971# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
972# should uniquely identify the documentation set bundle. This should be a
973# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
974# will append .docset to the name.
975
976DOCSET_BUNDLE_ID = org.doxygen.Project
977
978# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
979# the documentation publisher. This should be a reverse domain-name style
980# string, e.g. com.mycompany.MyDocSet.documentation.
981
982DOCSET_PUBLISHER_ID = org.doxygen.Publisher
983
984# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
985
986DOCSET_PUBLISHER_NAME = Publisher
987
988# If the GENERATE_HTMLHELP tag is set to YES, additional index files
989# will be generated that can be used as input for tools like the
990# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
991# of the generated HTML documentation.
992
993GENERATE_HTMLHELP = NO
994
995# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
996# be used to specify the file name of the resulting .chm file. You
997# can add a path in front of the file if the result should not be
998# written to the html output directory.
999
1000CHM_FILE =
1001
1002# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
1003# be used to specify the location (absolute path including file name) of
1004# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
1005# the HTML help compiler on the generated index.hhp.
1006
1007HHC_LOCATION =
1008
1009# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
1010# controls if a separate .chi index file is generated (YES) or that
1011# it should be included in the master .chm file (NO).
1012
1013GENERATE_CHI = NO
1014
1015# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
1016# is used to encode HtmlHelp index (hhk), content (hhc) and project file
1017# content.
1018
1019CHM_INDEX_ENCODING =
1020
1021# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
1022# controls whether a binary table of contents is generated (YES) or a
1023# normal table of contents (NO) in the .chm file.
1024
1025BINARY_TOC = NO
1026
1027# The TOC_EXPAND flag can be set to YES to add extra items for group members
1028# to the contents of the HTML help documentation and to the tree view.
1029
1030TOC_EXPAND = NO
1031
1032# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
1033# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
1034# that can be used as input for Qt's qhelpgenerator to generate a
1035# Qt Compressed Help (.qch) of the generated HTML documentation.
1036
1037GENERATE_QHP = NO
1038
1039# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
1040# be used to specify the file name of the resulting .qch file.
1041# The path specified is relative to the HTML output folder.
1042
1043QCH_FILE =
1044
1045# The QHP_NAMESPACE tag specifies the namespace to use when generating
1046# Qt Help Project output. For more information please see
1047# http://doc.trolltech.com/qthelpproject.html#namespace
1048
1049QHP_NAMESPACE = org.doxygen.Project
1050
1051# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
1052# Qt Help Project output. For more information please see
1053# http://doc.trolltech.com/qthelpproject.html#virtual-folders
1054
1055QHP_VIRTUAL_FOLDER = doc
1056
1057# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
1058# add. For more information please see
1059# http://doc.trolltech.com/qthelpproject.html#custom-filters
1060
1061QHP_CUST_FILTER_NAME =
1062
1063# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
1064# custom filter to add. For more information please see
1065# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
1066# Qt Help Project / Custom Filters</a>.
1067
1068QHP_CUST_FILTER_ATTRS =
1069
1070# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
1071# project's
1072# filter section matches.
1073# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
1074# Qt Help Project / Filter Attributes</a>.
1075
1076QHP_SECT_FILTER_ATTRS =
1077
1078# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
1079# be used to specify the location of Qt's qhelpgenerator.
1080# If non-empty doxygen will try to run qhelpgenerator on the generated
1081# .qhp file.
1082
1083QHG_LOCATION =
1084
1085# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
1086# will be generated, which together with the HTML files, form an Eclipse help
1087# plugin. To install this plugin and make it available under the help contents
1088# menu in Eclipse, the contents of the directory containing the HTML and XML
1089# files needs to be copied into the plugins directory of eclipse. The name of
1090# the directory within the plugins directory should be the same as
1091# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
1092# the help appears.
1093
1094GENERATE_ECLIPSEHELP = NO
1095
1096# A unique identifier for the eclipse help plugin. When installing the plugin
1097# the directory name containing the HTML and XML files should also have
1098# this name.
1099
1100ECLIPSE_DOC_ID = org.doxygen.Project
1101
1102# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
1103# at top of each HTML page. The value NO (the default) enables the index and
1104# the value YES disables it. Since the tabs have the same information as the
1105# navigation tree you can set this option to NO if you already set
1106# GENERATE_TREEVIEW to YES.
1107
1108DISABLE_INDEX = NO
1109
1110# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
1111# structure should be generated to display hierarchical information.
1112# If the tag value is set to YES, a side panel will be generated
1113# containing a tree-like index structure (just like the one that
1114# is generated for HTML Help). For this to work a browser that supports
1115# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1116# Windows users are probably better off using the HTML help feature.
1117# Since the tree basically has the same information as the tab index you
1118# could consider to set DISABLE_INDEX to NO when enabling this option.
1119
1120GENERATE_TREEVIEW = NO
1121
1122# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
1123# (range [0,1..20]) that doxygen will group on one line in the generated HTML
1124# documentation. Note that a value of 0 will completely suppress the enum
1125# values from appearing in the overview section.
1126
1127ENUM_VALUES_PER_LINE = 4
1128
1129# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
1130# and Class Hierarchy pages using a tree view instead of an ordered list.
1131
1132USE_INLINE_TREES = NO
1133
1134# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
1135# used to set the initial width (in pixels) of the frame in which the tree
1136# is shown.
1137
1138TREEVIEW_WIDTH = 250
1139
1140# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
1141# links to external symbols imported via tag files in a separate window.
1142
1143EXT_LINKS_IN_WINDOW = NO
1144
1145# Use this tag to change the font size of Latex formulas included
1146# as images in the HTML documentation. The default is 10. Note that
1147# when you change the font size after a successful doxygen run you need
1148# to manually remove any form_*.png images from the HTML output directory
1149# to force them to be regenerated.
1150
1151FORMULA_FONTSIZE = 10
1152
1153# Use the FORMULA_TRANPARENT tag to determine whether or not the images
1154# generated for formulas are transparent PNGs. Transparent PNGs are
1155# not supported properly for IE 6.0, but are supported on all modern browsers.
1156# Note that when changing this option you need to delete any form_*.png files
1157# in the HTML output before the changes have effect.
1158
1159FORMULA_TRANSPARENT = YES
1160
1161# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
1162# (see http://www.mathjax.org) which uses client side Javascript for the
1163# rendering instead of using prerendered bitmaps. Use this if you do not
1164# have LaTeX installed or if you want to formulas look prettier in the HTML
1165# output. When enabled you also need to install MathJax separately and
1166# configure the path to it using the MATHJAX_RELPATH option.
1167
1168USE_MATHJAX = NO
1169
1170# When MathJax is enabled you need to specify the location relative to the
1171# HTML output directory using the MATHJAX_RELPATH option. The destination
1172# directory should contain the MathJax.js script. For instance, if the mathjax
1173# directory is located at the same level as the HTML output directory, then
1174# MATHJAX_RELPATH should be ../mathjax. The default value points to the
1175# mathjax.org site, so you can quickly see the result without installing
1176# MathJax, but it is strongly recommended to install a local copy of MathJax
1177# before deployment.
1178
1179MATHJAX_RELPATH = http://www.mathjax.org/mathjax
1180
1181# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
1182# names that should be enabled during MathJax rendering.
1183
1184MATHJAX_EXTENSIONS =
1185
1186# When the SEARCHENGINE tag is enabled doxygen will generate a search box
1187# for the HTML output. The underlying search engine uses javascript
1188# and DHTML and should work on any modern browser. Note that when using
1189# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
1190# (GENERATE_DOCSET) there is already a search function so this one should
1191# typically be disabled. For large projects the javascript based search engine
1192# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
1193
1194SEARCHENGINE = YES
1195
1196# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1197# implemented using a PHP enabled web server instead of at the web client
1198# using Javascript. Doxygen will generate the search PHP script and index
1199# file to put on the web server. The advantage of the server
1200# based approach is that it scales better to large projects and allows
1201# full text search. The disadvantages are that it is more difficult to setup
1202# and does not have live searching capabilities.
1203
1204SERVER_BASED_SEARCH = NO
1205
1206#---------------------------------------------------------------------------
1207# configuration options related to the LaTeX output
1208#---------------------------------------------------------------------------
1209
1210# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
1211# generate Latex output.
1212
1213GENERATE_LATEX = NO
1214
1215# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
1216# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1217# put in front of it. If left blank `latex' will be used as the default path.
1218
1219LATEX_OUTPUT = latex
1220
1221# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1222# invoked. If left blank `latex' will be used as the default command name.
1223# Note that when enabling USE_PDFLATEX this option is only used for
1224# generating bitmaps for formulas in the HTML output, but not in the
1225# Makefile that is written to the output directory.
1226
1227LATEX_CMD_NAME = latex
1228
1229# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
1230# generate index for LaTeX. If left blank `makeindex' will be used as the
1231# default command name.
1232
1233MAKEINDEX_CMD_NAME = makeindex
1234
1235# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
1236# LaTeX documents. This may be useful for small projects and may help to
1237# save some trees in general.
1238
1239COMPACT_LATEX = NO
1240
1241# The PAPER_TYPE tag can be used to set the paper type that is used
1242# by the printer. Possible values are: a4, letter, legal and
1243# executive. If left blank a4wide will be used.
1244
1245PAPER_TYPE = a4
1246
1247# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
1248# packages that should be included in the LaTeX output.
1249
1250EXTRA_PACKAGES =
1251
1252# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
1253# the generated latex document. The header should contain everything until
1254# the first chapter. If it is left blank doxygen will generate a
1255# standard header. Notice: only use this tag if you know what you are doing!
1256
1257LATEX_HEADER =
1258
1259# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
1260# the generated latex document. The footer should contain everything after
1261# the last chapter. If it is left blank doxygen will generate a
1262# standard footer. Notice: only use this tag if you know what you are doing!
1263
1264LATEX_FOOTER =
1265
1266# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
1267# is prepared for conversion to pdf (using ps2pdf). The pdf file will
1268# contain links (just like the HTML output) instead of page references
1269# This makes the output suitable for online browsing using a pdf viewer.
1270
1271PDF_HYPERLINKS = YES
1272
1273# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
1274# plain latex in the generated Makefile. Set this option to YES to get a
1275# higher quality PDF documentation.
1276
1277USE_PDFLATEX = YES
1278
1279# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
1280# command to the generated LaTeX files. This will instruct LaTeX to keep
1281# running if errors occur, instead of asking the user for help.
1282# This option is also used when generating formulas in HTML.
1283
1284LATEX_BATCHMODE = NO
1285
1286# If LATEX_HIDE_INDICES is set to YES then doxygen will not
1287# include the index chapters (such as File Index, Compound Index, etc.)
1288# in the output.
1289
1290LATEX_HIDE_INDICES = NO
1291
1292# If LATEX_SOURCE_CODE is set to YES then doxygen will include
1293# source code with syntax highlighting in the LaTeX output.
1294# Note that which sources are shown also depends on other settings
1295# such as SOURCE_BROWSER.
1296
1297LATEX_SOURCE_CODE = NO
1298
1299# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
1300# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
1301# http://en.wikipedia.org/wiki/BibTeX for more info.
1302
1303LATEX_BIB_STYLE = plain
1304
1305#---------------------------------------------------------------------------
1306# configuration options related to the RTF output
1307#---------------------------------------------------------------------------
1308
1309# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
1310# The RTF output is optimized for Word 97 and may not look very pretty with
1311# other RTF readers or editors.
1312
1313GENERATE_RTF = NO
1314
1315# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
1316# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1317# put in front of it. If left blank `rtf' will be used as the default path.
1318
1319RTF_OUTPUT = rtf
1320
1321# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
1322# RTF documents. This may be useful for small projects and may help to
1323# save some trees in general.
1324
1325COMPACT_RTF = NO
1326
1327# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
1328# will contain hyperlink fields. The RTF file will
1329# contain links (just like the HTML output) instead of page references.
1330# This makes the output suitable for online browsing using WORD or other
1331# programs which support those fields.
1332# Note: wordpad (write) and others do not support links.
1333
1334RTF_HYPERLINKS = NO
1335
1336# Load style sheet definitions from file. Syntax is similar to doxygen's
1337# config file, i.e. a series of assignments. You only have to provide
1338# replacements, missing definitions are set to their default value.
1339
1340RTF_STYLESHEET_FILE =
1341
1342# Set optional variables used in the generation of an rtf document.
1343# Syntax is similar to doxygen's config file.
1344
1345RTF_EXTENSIONS_FILE =
1346
1347#---------------------------------------------------------------------------
1348# configuration options related to the man page output
1349#---------------------------------------------------------------------------
1350
1351# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
1352# generate man pages
1353
1354GENERATE_MAN = NO
1355
1356# The MAN_OUTPUT tag is used to specify where the man pages will be put.
1357# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1358# put in front of it. If left blank `man' will be used as the default path.
1359
1360MAN_OUTPUT = man
1361
1362# The MAN_EXTENSION tag determines the extension that is added to
1363# the generated man pages (default is the subroutine's section .3)
1364
1365MAN_EXTENSION = .3
1366
1367# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
1368# then it will generate one additional man file for each entity
1369# documented in the real man page(s). These additional files
1370# only source the real man page, but without them the man command
1371# would be unable to find the correct page. The default is NO.
1372
1373MAN_LINKS = NO
1374
1375#---------------------------------------------------------------------------
1376# configuration options related to the XML output
1377#---------------------------------------------------------------------------
1378
1379# If the GENERATE_XML tag is set to YES Doxygen will
1380# generate an XML file that captures the structure of
1381# the code including all documentation.
1382
1383GENERATE_XML = NO
1384
1385# The XML_OUTPUT tag is used to specify where the XML pages will be put.
1386# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1387# put in front of it. If left blank `xml' will be used as the default path.
1388
1389XML_OUTPUT = xml
1390
1391# The XML_SCHEMA tag can be used to specify an XML schema,
1392# which can be used by a validating XML parser to check the
1393# syntax of the XML files.
1394
1395XML_SCHEMA =
1396
1397# The XML_DTD tag can be used to specify an XML DTD,
1398# which can be used by a validating XML parser to check the
1399# syntax of the XML files.
1400
1401XML_DTD =
1402
1403# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
1404# dump the program listings (including syntax highlighting
1405# and cross-referencing information) to the XML output. Note that
1406# enabling this will significantly increase the size of the XML output.
1407
1408XML_PROGRAMLISTING = YES
1409
1410#---------------------------------------------------------------------------
1411# configuration options for the AutoGen Definitions output
1412#---------------------------------------------------------------------------
1413
1414# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
1415# generate an AutoGen Definitions (see autogen.sf.net) file
1416# that captures the structure of the code including all
1417# documentation. Note that this feature is still experimental
1418# and incomplete at the moment.
1419
1420GENERATE_AUTOGEN_DEF = NO
1421
1422#---------------------------------------------------------------------------
1423# configuration options related to the Perl module output
1424#---------------------------------------------------------------------------
1425
1426# If the GENERATE_PERLMOD tag is set to YES Doxygen will
1427# generate a Perl module file that captures the structure of
1428# the code including all documentation. Note that this
1429# feature is still experimental and incomplete at the
1430# moment.
1431
1432GENERATE_PERLMOD = NO
1433
1434# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
1435# the necessary Makefile rules, Perl scripts and LaTeX code to be able
1436# to generate PDF and DVI output from the Perl module output.
1437
1438PERLMOD_LATEX = NO
1439
1440# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
1441# nicely formatted so it can be parsed by a human reader.
1442# This is useful
1443# if you want to understand what is going on.
1444# On the other hand, if this
1445# tag is set to NO the size of the Perl module output will be much smaller
1446# and Perl will parse it just the same.
1447
1448PERLMOD_PRETTY = YES
1449
1450# The names of the make variables in the generated doxyrules.make file
1451# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
1452# This is useful so different doxyrules.make files included by the same
1453# Makefile don't overwrite each other's variables.
1454
1455PERLMOD_MAKEVAR_PREFIX =
1456
1457#---------------------------------------------------------------------------
1458# Configuration options related to the preprocessor
1459#---------------------------------------------------------------------------
1460
1461# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
1462# evaluate all C-preprocessor directives found in the sources and include
1463# files.
1464
1465ENABLE_PREPROCESSING = YES
1466
1467# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
1468# names in the source code. If set to NO (the default) only conditional
1469# compilation will be performed. Macro expansion can be done in a controlled
1470# way by setting EXPAND_ONLY_PREDEF to YES.
1471
1472MACRO_EXPANSION = NO
1473
1474# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
1475# then the macro expansion is limited to the macros specified with the
1476# PREDEFINED and EXPAND_AS_DEFINED tags.
1477
1478EXPAND_ONLY_PREDEF = NO
1479
1480# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
1481# pointed to by INCLUDE_PATH will be searched when a #include is found.
1482
1483SEARCH_INCLUDES = YES
1484
1485# The INCLUDE_PATH tag can be used to specify one or more directories that
1486# contain include files that are not input files but should be processed by
1487# the preprocessor.
1488
1489INCLUDE_PATH =
1490
1491# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
1492# patterns (like *.h and *.hpp) to filter out the header-files in the
1493# directories. If left blank, the patterns specified with FILE_PATTERNS will
1494# be used.
1495
1496INCLUDE_FILE_PATTERNS =
1497
1498# The PREDEFINED tag can be used to specify one or more macro names that
1499# are defined before the preprocessor is started (similar to the -D option of
1500# gcc). The argument of the tag is a list of macros of the form: name
1501# or name=definition (no spaces). If the definition and the = are
1502# omitted =1 is assumed. To prevent a macro definition from being
1503# undefined via #undef or recursively expanded use the := operator
1504# instead of the = operator.
1505
1506PREDEFINED =
1507
1508# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
1509# this tag can be used to specify a list of macro names that should be expanded.
1510# The macro definition that is found in the sources will be used.
1511# Use the PREDEFINED tag if you want to use a different macro definition that
1512# overrules the definition found in the source code.
1513
1514EXPAND_AS_DEFINED =
1515
1516# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
1517# doxygen's preprocessor will remove all references to function-like macros
1518# that are alone on a line, have an all uppercase name, and do not end with a
1519# semicolon, because these will confuse the parser if not removed.
1520
1521SKIP_FUNCTION_MACROS = YES
1522
1523#---------------------------------------------------------------------------
1524# Configuration::additions related to external references
1525#---------------------------------------------------------------------------
1526
1527# The TAGFILES option can be used to specify one or more tagfiles.
1528# Optionally an initial location of the external documentation
1529# can be added for each tagfile. The format of a tag file without
1530# this location is as follows:
1531#
1532# TAGFILES = file1 file2 ...
1533# Adding location for the tag files is done as follows:
1534#
1535# TAGFILES = file1=loc1 "file2 = loc2" ...
1536# where "loc1" and "loc2" can be relative or absolute paths or
1537# URLs. If a location is present for each tag, the installdox tool
1538# does not have to be run to correct the links.
1539# Note that each tag file must have a unique name
1540# (where the name does NOT include the path)
1541# If a tag file is not located in the directory in which doxygen
1542# is run, you must also specify the path to the tagfile here.
1543
1544TAGFILES =
1545
1546# When a file name is specified after GENERATE_TAGFILE, doxygen will create
1547# a tag file that is based on the input files it reads.
1548
1549GENERATE_TAGFILE =
1550
1551# If the ALLEXTERNALS tag is set to YES all external classes will be listed
1552# in the class index. If set to NO only the inherited external classes
1553# will be listed.
1554
1555ALLEXTERNALS = NO
1556
1557# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
1558# in the modules index. If set to NO, only the current project's groups will
1559# be listed.
1560
1561EXTERNAL_GROUPS = YES
1562
1563# The PERL_PATH should be the absolute path and name of the perl script
1564# interpreter (i.e. the result of `which perl').
1565
1566PERL_PATH = /usr/bin/perl
1567
1568#---------------------------------------------------------------------------
1569# Configuration options related to the dot tool
1570#---------------------------------------------------------------------------
1571
1572# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
1573# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
1574# or super classes. Setting the tag to NO turns the diagrams off. Note that
1575# this option also works with HAVE_DOT disabled, but it is recommended to
1576# install and use dot, since it yields more powerful graphs.
1577
1578CLASS_DIAGRAMS = YES
1579
1580# You can define message sequence charts within doxygen comments using the \msc
1581# command. Doxygen will then run the mscgen tool (see
1582# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
1583# documentation. The MSCGEN_PATH tag allows you to specify the directory where
1584# the mscgen tool resides. If left empty the tool is assumed to be found in the
1585# default search path.
1586
1587MSCGEN_PATH =
1588
1589# If set to YES, the inheritance and collaboration graphs will hide
1590# inheritance and usage relations if the target is undocumented
1591# or is not a class.
1592
1593HIDE_UNDOC_RELATIONS = YES
1594
1595# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
1596# available from the path. This tool is part of Graphviz, a graph visualization
1597# toolkit from AT&T and Lucent Bell Labs. The other options in this section
1598# have no effect if this option is set to NO (the default)
1599
1600HAVE_DOT = NO
1601
1602# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
1603# allowed to run in parallel. When set to 0 (the default) doxygen will
1604# base this on the number of processors available in the system. You can set it
1605# explicitly to a value larger than 0 to get control over the balance
1606# between CPU load and processing speed.
1607
1608DOT_NUM_THREADS = 0
1609
1610# By default doxygen will use the Helvetica font for all dot files that
1611# doxygen generates. When you want a differently looking font you can specify
1612# the font name using DOT_FONTNAME. You need to make sure dot is able to find
1613# the font, which can be done by putting it in a standard location or by setting
1614# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
1615# directory containing the font.
1616
1617DOT_FONTNAME = Helvetica
1618
1619# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
1620# The default size is 10pt.
1621
1622DOT_FONTSIZE = 10
1623
1624# By default doxygen will tell dot to use the Helvetica font.
1625# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
1626# set the path where dot can find it.
1627
1628DOT_FONTPATH =
1629
1630# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
1631# will generate a graph for each documented class showing the direct and
1632# indirect inheritance relations. Setting this tag to YES will force the
1633# CLASS_DIAGRAMS tag to NO.
1634
1635CLASS_GRAPH = YES
1636
1637# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
1638# will generate a graph for each documented class showing the direct and
1639# indirect implementation dependencies (inheritance, containment, and
1640# class references variables) of the class with other documented classes.
1641
1642COLLABORATION_GRAPH = YES
1643
1644# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
1645# will generate a graph for groups, showing the direct groups dependencies
1646
1647GROUP_GRAPHS = YES
1648
1649# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
1650# collaboration diagrams in a style similar to the OMG's Unified Modeling
1651# Language.
1652
1653UML_LOOK = NO
1654
1655# If set to YES, the inheritance and collaboration graphs will show the
1656# relations between templates and their instances.
1657
1658TEMPLATE_RELATIONS = NO
1659
1660# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
1661# tags are set to YES then doxygen will generate a graph for each documented
1662# file showing the direct and indirect include dependencies of the file with
1663# other documented files.
1664
1665INCLUDE_GRAPH = YES
1666
1667# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
1668# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
1669# documented header file showing the documented files that directly or
1670# indirectly include this file.
1671
1672INCLUDED_BY_GRAPH = YES
1673
1674# If the CALL_GRAPH and HAVE_DOT options are set to YES then
1675# doxygen will generate a call dependency graph for every global function
1676# or class method. Note that enabling this option will significantly increase
1677# the time of a run. So in most cases it will be better to enable call graphs
1678# for selected functions only using the \callgraph command.
1679
1680CALL_GRAPH = NO
1681
1682# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
1683# doxygen will generate a caller dependency graph for every global function
1684# or class method. Note that enabling this option will significantly increase
1685# the time of a run. So in most cases it will be better to enable caller
1686# graphs for selected functions only using the \callergraph command.
1687
1688CALLER_GRAPH = NO
1689
1690# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
1691# will generate a graphical hierarchy of all classes instead of a textual one.
1692
1693GRAPHICAL_HIERARCHY = YES
1694
1695# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
1696# then doxygen will show the dependencies a directory has on other directories
1697# in a graphical way. The dependency relations are determined by the #include
1698# relations between the files in the directories.
1699
1700DIRECTORY_GRAPH = YES
1701
1702# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
1703# generated by dot. Possible values are svg, png, jpg, or gif.
1704# If left blank png will be used. If you choose svg you need to set
1705# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
1706# visible in IE 9+ (other browsers do not have this requirement).
1707
1708DOT_IMAGE_FORMAT = png
1709
1710# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
1711# enable generation of interactive SVG images that allow zooming and panning.
1712# Note that this requires a modern browser other than Internet Explorer.
1713# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
1714# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
1715# visible. Older versions of IE do not have SVG support.
1716
1717INTERACTIVE_SVG = NO
1718
1719# The tag DOT_PATH can be used to specify the path where the dot tool can be
1720# found. If left blank, it is assumed the dot tool can be found in the path.
1721
1722DOT_PATH =
1723
1724# The DOTFILE_DIRS tag can be used to specify one or more directories that
1725# contain dot files that are included in the documentation (see the
1726# \dotfile command).
1727
1728DOTFILE_DIRS =
1729
1730# The MSCFILE_DIRS tag can be used to specify one or more directories that
1731# contain msc files that are included in the documentation (see the
1732# \mscfile command).
1733
1734MSCFILE_DIRS =
1735
1736# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
1737# nodes that will be shown in the graph. If the number of nodes in a graph
1738# becomes larger than this value, doxygen will truncate the graph, which is
1739# visualized by representing a node as a red box. Note that doxygen if the
1740# number of direct children of the root node in a graph is already larger than
1741# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
1742# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
1743
1744DOT_GRAPH_MAX_NODES = 50
1745
1746# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
1747# graphs generated by dot. A depth value of 3 means that only nodes reachable
1748# from the root by following a path via at most 3 edges will be shown. Nodes
1749# that lay further from the root node will be omitted. Note that setting this
1750# option to 1 or 2 may greatly reduce the computation time needed for large
1751# code bases. Also note that the size of a graph can be further restricted by
1752# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
1753
1754MAX_DOT_GRAPH_DEPTH = 0
1755
1756# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
1757# background. This is disabled by default, because dot on Windows does not
1758# seem to support this out of the box. Warning: Depending on the platform used,
1759# enabling this option may lead to badly anti-aliased labels on the edges of
1760# a graph (i.e. they become hard to read).
1761
1762DOT_TRANSPARENT = NO
1763
1764# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
1765# files in one run (i.e. multiple -o and -T options on the command line). This
1766# makes dot run faster, but since only newer versions of dot (>1.8.10)
1767# support this, this feature is disabled by default.
1768
1769DOT_MULTI_TARGETS = YES
1770
1771# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
1772# generate a legend page explaining the meaning of the various boxes and
1773# arrows in the dot generated graphs.
1774
1775GENERATE_LEGEND = YES
1776
1777# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
1778# remove the intermediate dot files that are used to generate
1779# the various graphs.
1780
1781DOT_CLEANUP = YES
diff --git a/audio/utils/include/tiaudioutils/ALSAMixer.h b/audio/utils/include/tiaudioutils/ALSAMixer.h
new file mode 100644
index 0000000..fb6de31
--- /dev/null
+++ b/audio/utils/include/tiaudioutils/ALSAMixer.h
@@ -0,0 +1,329 @@
1/*
2 * Copyright (C) 2013 Texas Instruments
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/**
18 * \file ALSAMixer.h
19 * \brief Classes for controlling the mixer interface of an ALSA card
20 *
21 * Contains classes involved in the control of the mixer interface of an ALSA
22 * sound card.
23 */
24
25#ifndef _TIAUDIOUTILS_ALSAMIXER_H_
26#define _TIAUDIOUTILS_ALSAMIXER_H_
27
28#include <string>
29#include <list>
30#include <map>
31
32#include <tiaudioutils/Base.h>
33#include <tiaudioutils/Pcm.h>
34
35/* forward declaration */
36struct audio_route;
37
38namespace tiaudioutils {
39
40using std::string;
41using std::list;
42using std::map;
43
44/**
45 * \class ALSAControl
46 * \brief ALSA kcontrol
47 *
48 * An ALSA control that can be string or integer. Other control types like
49 * boolean are treatead as integer type. This class is only meant to carry
50 * control information like its name and value. The control takes effect
51 * when is passed to an ALSAMixer.
52 */
53class ALSAControl {
54 public:
55 /**
56 * \brief Integer ALSA control constructor
57 *
58 * Constructs an integer ALSA control that can be used for boolean,
59 * integer, etc. kcontrols. It's caller responsibility to pass a
60 * valid name (e.g. non-empty string).
61 *
62 * \param name Control name
63 * \param val Control value
64 */
65 ALSAControl(string &name, int val);
66
67 /**
68 * \brief String ALSA control constructor
69 *
70 * Constructs a string ALSA control that can be used for enumerated
71 * type kcontrols. It's caller responsibility to pass a valid name
72 * and value (e.g. non-empty strings).
73 *
74 * \param name Control name
75 * \param val Control value
76 */
77 ALSAControl(string &name, string &val);
78
79 /**
80 * \brief Integer ALSA control constructor
81 *
82 * Constructs an integer ALSA control that can be used for boolean,
83 * integer, etc. kcontrols. It's caller responsibility to pass a
84 * valid name (e.g. non-empty string).
85 *
86 * \param name Control name as a C-style char pointer
87 * \param val Control value
88 */
89 ALSAControl(const char *name, int val);
90
91 /**
92 * \brief String ALSA control constructor
93 *
94 * Constructs a string ALSA control that can be used for enumerated
95 * type kcontrols. It's caller responsibility to pass a valid name
96 * and value (e.g. non-empty strings).
97 *
98 * \param name Control name as a C-style char pointer
99 * \param val Control value as a C-style char pointer
100 */
101 ALSAControl(const char *name, const char *val);
102
103 /**
104 * \brief ALSA control destructor
105 *
106 * Destroy an ALSA control object.
107 */
108 virtual ~ALSAControl() {}
109
110 /**
111 * \brief Get the control name
112 *
113 * Gets the ALSA control name.
114 *
115 * \return Reference to the control name
116 */
117 const string& name() const { return mName; }
118
119 /**
120 * \brief Get the control string value
121 *
122 * Gets the string value of an ALSA control.
123 *
124 * \return Reference to the control value.
125 * Empty string if the control is not of string type
126 */
127 const string& strVal() const { return mStrVal; }
128
129 /**
130 * \brief Get the control integer value
131 *
132 * Gets the integer value of an ALSA control.
133 *
134 * \return Value of the control
135 * \retval -1 if the control is not of integer type
136 */
137 int intVal() const { return mIntVal; }
138
139 /**
140 * \brief Test if the control type is integer
141 *
142 * Test if the ALSA control type is integer.
143 *
144 * \return true if the control is integer type, false otherwise
145 */
146 bool isIntegerType() const;
147
148 /**
149 * \brief Test if the control type is string
150 *
151 * Test if the ALSA control type is string.
152 *
153 * \return true if the control is string type, false otherwise
154 */
155 bool isStringType() const;
156
157 protected:
158 string mName; /**< Control name */
159 string mStrVal; /**< String value of the control */
160 int mIntVal; /**< Integer value of the control */
161 enum {
162 TYPE_INT, /**< Integer type: bool, int, byte, etc */
163 TYPE_STR /**< String type: enum */
164 } mType; /**< Control type category */
165};
166
167/**
168 * \typedef ALSAControlList
169 * \brief List of ALSA Controls
170 *
171 * STL-based list of ALSA controls. It's used to pass controls to be set or
172 * cleared to the ALSAMixer.
173 */
174typedef list<ALSAControl> ALSAControlList;
175
176/**
177 * \class ALSAMixer
178 * \brief ALSA Mixer
179 *
180 * The ALSA mixer is used to set or clear kcontrols in a sound card.
181 */
182class ALSAMixer {
183 public:
184 /**
185 * \brief ALSA mixer constructor
186 *
187 * Constructs an ALSA mixer of a sound card.
188 *
189 * \param card ALSA card id
190 */
191 ALSAMixer(uint32_t card);
192
193 /**
194 * \brief ALSA mixer destructor
195 *
196 * Destroys an ALSA mixer object.
197 */
198 virtual ~ALSAMixer();
199
200 /**
201 * \brief Check the result of constructing an ALSA mixer
202 *
203 * Result of constructing a ALSA mixer. It must be checked before
204 * using any methods. Result is undefined if ALSAMixer is used when
205 * in an unitialized state.
206 *
207 * \return true is mixer construction is correct, false otherwise
208 */
209 bool initCheck() const;
210
211 /**
212 * \brief Set or clear the value of an ALSAControl
213 *
214 * Sets or clears the value of an individual ALSAControl in the card's
215 * mixer.
216 *
217 * \param control The ALSAControl to be set or cleared
218 * \param on true to set the control, false to clear it
219 * \return 0 on success, otherwise negative error code
220 */
221 int set(const ALSAControl &control, bool on);
222
223 /**
224 * \brief Set or clear the value of a list of controls
225 *
226 * Sets or clears the value of an ALSAControlList to the card's mixer.
227 * There is no unwind mechanism to set the controls to their initial value
228 * if this method fails while setting an intermediate control of the list.
229 * Controls with multiple values will all be set to the same ALSAControl
230 * value.
231 *
232 * \param controls The list of ALSA controls to be set or cleared
233 * \param on true to set the control list, false to clear it
234 * \return 0 on success, otherwise negative error code
235 */
236 int set(const ALSAControlList &controls, bool on);
237
238 /**
239 * \brief Initialize routes to the default value
240 *
241 * Initializes card controls based on the default values defined in the
242 * card's XML file, if the file is available.
243 *
244 * \return 0 on success, otherwise negative error code
245 */
246 int initRoutes();
247
248 /**
249 * \brief Apply or reset the controls of an audio path
250 *
251 * Applies or resets the controls of a named path as defined in the
252 * card's XML path, if the file is available. The name of the path
253 * must match any of the declared "path" elements in the XML file.
254 * All the controls in the corresponding XML "path" element will be
255 * applied, but only those controls that have a reset value in the
256 * card defaults section will be reset.
257 *
258 * \param path The path name
259 * \param on true to apply the path, false to reset it
260 * \return 0 on success, otherwise negative error code
261 */
262 int setPath(const char *path, bool on);
263
264 /**
265 * \brief Apply or reset the controls for an audio device
266 *
267 * Applies or resets the controls needed for audio devices (one or more)
268 * based on XML "path" elements named after the Android audio device
269 * definitions (e.g. AUDIO_DEVICE_OUT_SPEAKER, AUDIO_DEVICE_IN_BUILTIN_MIC).
270 * All the controls in the corresponding XML "path" element for a given
271 * device will be applied, but only those controls that have a reset value
272 * in the card defaults section will be reset.
273 *
274 * \param devices The audio devices to apply or reset the path
275 * \param on true to apply the path, false to reset it
276 * \return 0 on success, otherwise negative error code
277 */
278 int setPath(audio_devices_t devices, bool on);
279
280 /**
281 * \brief Update the controls for an audio device transition
282 *
283 * Update the audio routes for a device transition in two steps:
284 * - Reset the paths for inactive devices (devices that after the
285 * transition are no longer used)
286 * - Apply the paths for new active devices (devices that after the
287 * transition are newly used)
288 *
289 * \param oldDevices The devices before the transition
290 * \param newDevices The devices required after the transition
291 * \return 0 on success, otherwise negative error code
292 */
293 int updatePath(audio_devices_t oldDevices, audio_devices_t newDevices);
294
295 private:
296 ALSAMixer(const ALSAMixer &mixer);
297 ALSAMixer& operator=(const ALSAMixer &mixer);
298
299 protected:
300 /** The prefix of the path where to search for the card's route XML file */
301 static const string kAudioRoutePrefix;
302 /** The suffix of the card's route XML file */
303 static const string kAudioRouteSuffix;
304
305 /**
306 * \brief Initialize map of audio device to definition name
307 *
308 * Initialize the internal map of audio devices (audio_device_t) to device
309 * name (string). It allows to search paths in the card's XML file by their
310 * Android device name, e.g. AUDIO_DEVICE_OUT_SPEAKER, AUDIO_DEVICE_IN_BUILTIN_MIC.
311 */
312 void initDeviceMap();
313
314 /**
315 * Map between Android audio devices and their names.
316 * Used to find paths in the XML routes file for a corresponding audio device.
317 */
318 typedef map<audio_devices_t, string> DeviceMap;
319
320 uint32_t mCard; /**< Card id */
321 struct mixer *mMixer; /**< tinyalsa mixer */
322 struct audio_route *mRouter; /**< XML-based audio router */
323 DeviceMap mDevMap; /**< Android device to device name */
324 Mutex mLock; /**< Lock the access to tinyalsa mixer calls */
325};
326
327} /* namespace tiaudioutils */
328
329#endif /* _TIAUDIOUTILS_ALSAMIXER_H_ */
diff --git a/audio/utils/include/tiaudioutils/ALSAPcm.h b/audio/utils/include/tiaudioutils/ALSAPcm.h
new file mode 100644
index 0000000..830e304
--- /dev/null
+++ b/audio/utils/include/tiaudioutils/ALSAPcm.h
@@ -0,0 +1,235 @@
1/*
2 * Copyright (C) 2013 Texas Instruments
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/**
18 * \file ALSAPcm.h
19 * \brief Classes for accessing the PCM interface of an ALSA card
20 *
21 * Contains classes required to play and capture data from an ALSA sound card,
22 * incluiding a class for the ALSA card itself.
23 */
24
25#ifndef _TIAUDIOUTILS_ALSAPCM_H_
26#define _TIAUDIOUTILS_ALSAPCM_H_
27
28#include <tiaudioutils/Base.h>
29#include <tiaudioutils/Pcm.h>
30
31namespace tiaudioutils {
32
33class ALSAInPort;
34class ALSAOutPort;
35
36/**
37 * \class ALSAInPort
38 * \brief ALSA capture port
39 *
40 * The ALSA PCM port used for capture.
41 */
42class ALSAInPort : public PcmInPort {
43 public:
44 /**
45 * \brief ALSA input port constructor
46 *
47 * Constructs an ALSA input/capture port with period count.
48 *
49 * \param card The card id
50 * \param port The port id
51 * \param period_count The period count
52 */
53 ALSAInPort(uint32_t card,
54 uint32_t port,
55 uint32_t period_count = kDefaultNumPeriods);
56
57 /**
58 * \brief ALSA input port destructor
59 *
60 * Destroys an ALSA input/capture port object.
61 */
62 virtual ~ALSAInPort();
63
64 /**
65 * \brief Get the id of the ALSA sound card
66 *
67 * Gets the id of the ALSA sound card that this port belongs to.
68 *
69 * \return The sound card id
70 */
71 uint32_t getCardId() const { return mCardId; }
72
73 /**
74 * \brief Get the port id
75 *
76 * Gets the ALSA input/capture port id which is the PCM device number.
77 *
78 * \return The PCM port id
79 */
80 uint32_t getPortId() const { return mPortId; }
81
82 /**
83 * \brief Open the PCM port for capture
84 *
85 * Opens the ALSA PCM port for capture with the given parameters.
86 *
87 * \param params PcmParams used to open the port
88 * \return 0 on success, otherwise negative error code
89 */
90 int open(const PcmParams &params);
91
92 /**
93 * \brief Close the PCM port
94 *
95 * Closes the ALSA PCM port opened by calling open().
96 */
97 void close();
98
99 /**
100 * \brief Test if the PCM port is open and ready
101 *
102 * Tests if the PCM port is open and ready for capture.
103 *
104 * \return true if the port is open, false otherwise
105 */
106 bool isOpen() const;
107
108 /**
109 * \brief Read audio data from the PCM input port
110 *
111 * Reads audio data from the PCM capture port to the passed buffer.
112 *
113 * \param buffer Pointer to the destination buffer
114 * \param frames Number of frames to be read
115 * \return 0 on success, otherwise negative error code
116 */
117 int read(void *buffer, size_t frames);
118
119 /** Default number of periods for the tinyalsa config of the capture port */
120 static const uint32_t kDefaultNumPeriods = 3;
121
122 private:
123 ALSAInPort(const ALSAInPort &port);
124 ALSAInPort& operator=(const ALSAInPort &port);
125
126 protected:
127 uint32_t mCardId; /**< Id of the ALSA card */
128 uint32_t mPortId; /**< Id of the ALSA PCM device */
129 uint32_t mPeriodCount; /**< Period count of this port */
130 struct pcm *mPcm; /**< tinyalsa pcm handle */
131 mutable Mutex mLock; /**< Synchronize PCM port use */
132};
133
134/**
135 * \class ALSAOutPort
136 * \brief ALSA playback port
137 *
138 * The ALSA PCM port used for playback.
139 */
140class ALSAOutPort : public PcmOutPort {
141 public:
142 /**
143 * \brief ALSA output port constructor
144 *
145 * Constructs an ALSA output/playback port with period count.
146 *
147 * \param card The card id
148 * \param port The port id
149 * \param period_count The period count
150 */
151 ALSAOutPort(uint32_t card,
152 uint32_t port,
153 uint32_t period_count = kDefaultNumPeriods);
154
155 /**
156 * \brief ALSA output port destructor
157 *
158 * Destroys an ALSA output/playback port object.
159 */
160 virtual ~ALSAOutPort();
161
162 /**
163 * \brief Get the id of the ALSA sound card
164 *
165 * Gets the id of the ALSA sound card that this port belongs to.
166 *
167 * \return The sound card id
168 */
169 uint32_t getCardId() const { return mCardId; }
170
171 /**
172 * \brief Get the port id
173 *
174 * Gets the ALSA output/playback port id which is the PCM device number.
175 *
176 * \return The PCM port id
177 */
178 uint32_t getPortId() const { return mPortId; }
179
180 /**
181 * \brief Open the PCM port for playback
182 *
183 * Opens the ALSA PCM port for playback with the given parameters.
184 * The port is open in non-mmap mode.
185 *
186 * \param params PcmParams used to open the port
187 * \return 0 on success, otherwise negative error code
188 */
189 int open(const PcmParams &params);
190
191 /**
192 * \brief Close the PCM port
193 *
194 * Closes the ALSA PCM port opened by calling open().
195 */
196 virtual void close();
197
198 /**
199 * \brief Test if the PCM port is open and ready
200 *
201 * Tests if the PCM port is open and ready for playback.
202 *
203 * \return true if the port is open, false otherwise
204 */
205 bool isOpen() const;
206
207 /**
208 * \brief Write audio data to the PCM output port
209 *
210 * Writes audio data to the PCM playback port from the passed buffer.
211 *
212 * \param buffer Pointer to the source buffer
213 * \param frames Number of frames to be written
214 * \return Number of frames written, otherwise negative error code
215 */
216 int write(const void *buffer, size_t frames);
217
218 /** Default number of periods for the tinyalsa config of the playback port */
219 static const uint32_t kDefaultNumPeriods = 4;
220
221 private:
222 ALSAOutPort(const ALSAOutPort &port);
223 ALSAOutPort& operator=(const ALSAOutPort &port);
224
225 protected:
226 uint32_t mCardId; /**< Id of the ALSA card */
227 uint32_t mPortId; /**< Id of the ALSA PCM device */
228 uint32_t mPeriodCount; /**< Period count of this port */
229 struct pcm *mPcm; /**< tinyalsa pcm handle */
230 mutable Mutex mLock; /**< Synchronize PCM port use */
231};
232
233} /* namespace tiaudioutils */
234
235#endif /* _TIAUDIOUTILS_ALSAPCM_H_ */
diff --git a/audio/utils/include/tiaudioutils/Base.h b/audio/utils/include/tiaudioutils/Base.h
new file mode 100644
index 0000000..dc2a6f1
--- /dev/null
+++ b/audio/utils/include/tiaudioutils/Base.h
@@ -0,0 +1,251 @@
1/*
2 * Copyright (C) 2013 Texas Instruments
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/**
18 * \file Base.h
19 * \brief Miscellaneous base clases
20 *
21 * Miscellaneous classes used across tiaudioutils.
22 */
23
24#ifndef _TIAUDIOUTILS_BASE_H_
25#define _TIAUDIOUTILS_BASE_H_
26
27#include <sys/types.h>
28#include <utils/Mutex.h>
29#include <pthread.h>
30#include <string>
31#include <map>
32
33namespace tiaudioutils {
34
35using std::string;
36using std::map;
37using android::Mutex;
38using android::AutoMutex;
39
40/**
41 * \class SlotMap
42 * \brief Slot map
43 *
44 * The slot map between source and destination streams. Each channel in the
45 * source can be mapped to any channel in the destination. That gives enough
46 * flexibility for doing buffer remix. Destination channel is stored first in
47 * the map and source channel is stored second. This enables a map to be specified
48 * which can duplicate a single source channel to multiple destination channels.
49 */
50class SlotMap : public map<uint32_t, uint32_t> {
51 public:
52 /**
53 * \brief Default constructor
54 *
55 * Constructs a default (but invalid) slot map. Entries to the map can be added
56 * later to make the map valid.
57 */
58 SlotMap() {}
59
60 /**
61 * \brief Symmetric slot map constructor
62 *
63 * Constructs a slot map where the source slots map to the same slots in
64 * the destination.
65 *
66 * \param mask Mask of the slots to be mapped
67 */
68 SlotMap(uint32_t mask);
69
70 /**
71 * \brief Consecutive slots map constructor
72 *
73 * Constructs a slot map where the slots in the source are processed in
74 * ascending order and mapped to their corresponding slot in the destination,
75 * also processed in ascending order.
76 *
77 * \param srcMask Mask of the source slots to be mapped
78 * \param dstMask Mask of the destination slots to be mapped
79 */
80 SlotMap(uint32_t srcMask, uint32_t dstMask);
81
82 /**
83 * \brief Check if the slot map is valid
84 *
85 * Checks if the current state of the slot map is valid, defined as:
86 * - at least one slot is mapped
87 * - same number of source and destination channels
88 *
89 * \return true if slot map is valid, false otherwise
90 */
91 bool isValid() const;
92
93 /**
94 * \brief Get the number of channels in the map
95 *
96 * Gets the number of slots/channels in the map. Calling this function when
97 * the map is in invalid state is a logical error.
98 *
99 * \return Number of slots/channels being mapped
100 */
101 uint32_t getChannelCount() const;
102
103 /**
104 * \brief Get the mask of the source slots
105 *
106 * Gets the mask of the source slots. No assumptions about the map order must
107 * be made from the mask value.
108 *
109 * \return The mask with the slot positions in the source being mapped
110 */
111 uint32_t getSrcMask() const;
112
113 /**
114 * \brief Get the mask of the destination slots
115 *
116 * Gets the mask of the destination slots. No assumptions about the map order
117 * must be made from the mask value.
118 *
119 * \return The mask with the slot positions in the destination being mapped
120 */
121 uint32_t getDstMask() const;
122};
123
124/**
125 * The pthread's start routine passed during thread creation. It runs the
126 * _threadLoop() of ThreadBase.
127 *
128 * \param me Pointer to the ThreadBase object.
129 */
130extern "C" void* threadWrapper(void *me);
131
132/**
133 * \class ThreadBase
134 * \brief Thread base
135 *
136 * Base class of a thread. Derived classes must implement threadFunc() to give
137 * implementation specific functionality to the thread. The thread will continue
138 * executing threadFunc() as long as: threadFunc() returns 0 or stop() is not
139 * called.
140 */
141class ThreadBase {
142 public:
143 /**
144 * \brief Default constructor
145 *
146 * Constructs an unnamed thread.
147 */
148 ThreadBase();
149
150 /**
151 * \brief Named thread constructor
152 *
153 * Constructs a named thread.
154 *
155 * \param name Thread name
156 */
157 ThreadBase(const string &name);
158
159 /**
160 * \brief Named thread constructor
161 *
162 * Constructs a named thread.
163 *
164 * \param name Thread name
165 */
166 ThreadBase(const char *name);
167
168 /**
169 * \brief Destructor
170 *
171 * Destroys a thread similar to the way stop() would.
172 */
173 virtual ~ThreadBase();
174
175 /**
176 * \brief Start thread execution
177 *
178 * Starts the execution of the thread whose main function is threadFunc()
179 * implemented by derived classes. Thread execution continues as long as
180 * the threadFunc() returns 0 and it hasn't been stopped by stop().
181 * Execution loop continues otherwise.
182 *
183 * \return 0 on success, otherwise negative error code
184 */
185 int run();
186
187 /**
188 * \brief Stop thread execution
189 *
190 * Stops the execution of the thread on completion of next thread loop.
191 * Status of threadFunc() upon stopping is returned by this method.
192 *
193 * \return The return value of threadFunc()
194 */
195 int stop();
196
197 /**
198 * \brief Test if thread is running
199 *
200 * Test if the thread is running.
201 *
202 * \return true if thread is running, false otherwise
203 */
204 bool isRunning() const;
205
206 /**
207 * \brief Get the thread name
208 *
209 * Get the name of the thread.
210 *
211 * \return Thread name as a C-style char pointer
212 */
213 const char *name() const { return mName.c_str(); }
214
215 friend void* threadWrapper(void *me);
216
217 private:
218 ThreadBase(const ThreadBase &thread);
219 ThreadBase& operator=(const ThreadBase &thread);
220
221 /**
222 * \brief Thread's internal loop
223 *
224 * The thread's internal loop calls threadFunc() until is returns a value
225 * different than 0 or the thread is stopped through stop().
226 *
227 * \return The return value of threadFunc()
228 */
229 int _threadLoop();
230
231 pthread_t mThread; /**< pthread handle of this thread */
232 string mName; /**< Name of the thread */
233 volatile bool mRunning; /**< Running status of the thread */
234 mutable Mutex mMutex;
235
236 protected:
237 /**
238 * \brief Implementation-specific thread function
239 *
240 * Derived classes must implement it. It should return 0 if the function has
241 * to be executed again on the next loop. Returning an error code breaks the
242 * thread loop.
243 *
244 * \return 0 if function has to be executed again, otherwise an error code
245 */
246 virtual int threadFunc() = 0;
247};
248
249} /* namespace tiaudioutils */
250
251#endif /* _TIAUDIOUTILS_BASE_H_ */
diff --git a/audio/utils/include/tiaudioutils/Log.h b/audio/utils/include/tiaudioutils/Log.h
new file mode 100644
index 0000000..dfc5d79
--- /dev/null
+++ b/audio/utils/include/tiaudioutils/Log.h
@@ -0,0 +1,30 @@
1/*
2 * Copyright (C) 2013 Texas Instruments
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef _TIAUDIOUTILS_LOG_H_
18#define _TIAUDIOUTILS_LOG_H_
19
20/* As usual, LOG_NDEBUG and VERY_VERBOSE_LOGGING must be defined before */
21#define LOG_TAG "tiaudioutils"
22#ifdef VERY_VERBOSE_LOGGING
23#define ALOGVV ALOGV
24#else
25#define ALOGVV(...) do { } while(0)
26#endif
27
28#include <cutils/log.h>
29
30#endif /* _TIAUDIOUTILS_LOG_H_ */
diff --git a/audio/utils/include/tiaudioutils/MonoPipe.h b/audio/utils/include/tiaudioutils/MonoPipe.h
new file mode 100644
index 0000000..c0c352b
--- /dev/null
+++ b/audio/utils/include/tiaudioutils/MonoPipe.h
@@ -0,0 +1,284 @@
1/*
2 * Copyright (C) 2013 Texas Instruments
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/**
18 * \file MonoPipe.h
19 * \brief Classes for writing and reading to/from a mono pipe
20 *
21 * Contains the MonoPipe and its helper buffer provider MonoReader and
22 * MonoWriter that can be used to seamlessly connect the pipe with
23 * stream writers/readers like PcmWriter and PcmReader.
24 */
25
26#ifndef _TIAUDIOUTILS_MONOPIPE_H_
27#define _TIAUDIOUTILS_MONOPIPE_H_
28
29#include <tiaudioutils/Base.h>
30#include <tiaudioutils/Pcm.h>
31
32namespace android {
33 class MonoPipe;
34 class MonoPipeReader;
35}
36
37namespace tiaudioutils {
38
39/**
40 * \class MonoPipe
41 * \brief Mono pipe
42 *
43 * Blocking mono pipe, only one reader and one writer are possible, although
44 * that constraint is not enforced by the class.
45 * The pipe can be accessed directly through read() and write() methods, but
46 * it's also possible through the buffer providers PipeWriter and PipeReader.
47 * The latter approach allows to connect the providers with PCM streams (e.g.
48 * InStream, OutStream) to read and write to PCM ports.
49 */
50class MonoPipe {
51 public:
52 /**
53 * \brief Mono pipe constructor
54 *
55 * Constructs a mono pipe for the specified PCM parameters: sample rate,
56 * sample size and channels. This mono pipe is implemented on top of
57 * NBAIO's mono pipe, so the same limitations apply:
58 * - Sample rate: 44100 and 48000
59 * - Sample size: 16-bits
60 * - Channels: mono and stereo
61 *
62 * \param params PCM params for the pipe as described above
63 * \param frames The size of pipe in frames, forced to be at least to 3x
64 * the frameCount of passed PCM params
65 */
66 MonoPipe(const PcmParams &params, uint32_t frames = 0);
67
68 /**
69 * \brief Mono pipe destructor
70 *
71 * Destroys the mono pipe and its underlying NBAIO mono pipe.
72 */
73 virtual ~MonoPipe();
74
75 /**
76 * \brief Check the result of constructing the mono pipe
77 *
78 * Result of constructing the mono pipe. It must be checked before using
79 * any methods. Result is undefined if the pipe is used when in an
80 * unitialized state.
81 *
82 * \return true if pipe construction is correct, false otherwise
83 */
84 virtual bool initCheck() const;
85
86 /**
87 * \brief Get the parameters of the pipe
88 *
89 * Get the native PcmParams used in the mono pipe.
90 *
91 * \return Reference to the PCM params of the pipe
92 */
93 const PcmParams& getParams() const { return mParams; }
94
95 /**
96 * \brief Read data from the pipe
97 *
98 * Reads data from the mono pipe. The call blocks if the pipe doesn't
99 * have the requested frames, but only for equivalent time to the
100 * missing frames.
101 *
102 * \param buffer Pointer to the destination buffer
103 * \param frames Number of frames to be read
104 * \return Number of frames read, otherwise negative error code
105 */
106 virtual int read(void *buffer, uint32_t frames);
107
108 /**
109 * \brief Check the result of constructing the mono pipe
110 *
111 * Writes data to the mono pipe. The call blocks if the pipe is full.
112 *
113 * \param buffer Pointer to the source buffer
114 * \param frames Number of frames to be written
115 * \return Number of frames written, otherwise negative error code
116 */
117 virtual int write(const void *buffer, uint32_t frames);
118
119 /**
120 * \brief Query the number of frames in the pipe
121 *
122 * Queries the number of frames available in the pipe. A subsequent
123 * read() call for that many frames should succeed.
124 *
125 * \return The number of available frames to be read, negative error
126 * code if the pipe is in bad state
127 */
128 virtual int availableToRead() const;
129
130 /**
131 * \brief Query the empty frame locations in the pipe
132 *
133 * Queries the empty frame locations in the pipe. A subsequent write()
134 * call for that many frames should succeed.
135 *
136 * \return The number of available frames to be write, negative error
137 * code if the pipe is in bad state
138 */
139 virtual int availableToWrite() const;
140
141 protected:
142 /** Ratio between pipe frame count and params frame count */
143 static const uint32_t kPipeSizeFactor = 3;
144
145 android::MonoPipe *mSink; /**< Mono pipe */
146 android::MonoPipeReader *mSource; /**< Reader for the mono pipe */
147 PcmParams mParams; /**< PCM parameters of the pipe */
148};
149
150/**
151 * \class PipeReader
152 * \brief Mono pipe reader
153 *
154 * Buffer provider that can be used to read data from the MonoPipe. This
155 * provider can be used along with OutStream and PcmWriter to read data
156 * from the pipe and write it to a PCM port.
157 */
158class PipeReader : public BufferProvider {
159 public:
160 /**
161 * \brief Pipe reader constructor
162 *
163 * Constructs a buffer provider that is capable of reading data from
164 * the specified mono pipe.
165 *
166 * \param pipe The mono pipe to read data from
167 */
168 PipeReader(MonoPipe *pipe);
169
170 /**
171 * \brief Pipe reader destructor
172 *
173 * Destroys a pipe reader object.
174 */
175 virtual ~PipeReader();
176
177 /**
178 * \brief Check the result of constructing the mono pipe reader
179 *
180 * Result of constructing the mono pipe reader. It must be checked before
181 * using any methods. Result is undefined if the writer is used when in an
182 * unitialized state.
183 *
184 * \return true if pipe construction is correct, false otherwise
185 */
186 bool initCheck() const { return mPipe != NULL; }
187
188 /**
189 * \brief Get the next buffer filled with data from the pipe
190 *
191 * Gets the next audio buffer filled with PCM data read from the pipe.
192 * The buffer can be filled with zeroes if there are no frames
193 * available to read in the pipe, see MonoPipe read() for more
194 * details.
195 *
196 * \param buffer Pointer to the buffer to fill with next buffer's info
197 * \return 0 on success, otherwise negative error code
198 */
199 int getNextBuffer(BufferProvider::Buffer *buffer);
200
201 /**
202 * \brief Release the buffer from the pipe
203 *
204 * Release the audio buffer previously obtained through getNextBuffer().
205 * It's a logical error to release a buffer not previously obtained,
206 * result is undefined.
207 *
208 * \param buffer Pointer to the buffer to be released
209 */
210 void releaseBuffer(BufferProvider::Buffer *buffer);
211
212 protected:
213 MonoPipe *mPipe; /**< The mono pipe used by this writer */
214 BufferProvider::Buffer mBuffer; /**< Buffer with data to be written to the pipe */
215};
216
217/**
218 * \class PipeWriter
219 * \brief Mono pipe writer
220 *
221 * Buffer provider that can be used to write data to the MonoPipe. This
222 * provider can be used along with InStream and PcmReader to read
223 * data from a PCM port and write it to the pipe.
224 */
225class PipeWriter : public BufferProvider {
226 public:
227 /**
228 * \brief Pipe writer constructor
229 *
230 * Constructs a buffer provider that is capable of writing data to
231 * the specified mono pipe.
232 *
233 * \param pipe The mono pipe to write data to
234 */
235 PipeWriter(MonoPipe *pipe);
236
237 /**
238 * \brief Pipe writer destructor
239 *
240 * Destroys a pipe writer object.
241 */
242 virtual ~PipeWriter();
243
244 /**
245 * \brief Check the result of constructing the mono pipe writer
246 *
247 * Result of constructing the mono pipe writer. It must be checked before
248 * using any methods. Result is undefined if the writer is used when in an
249 * unitialized state.
250 *
251 * \return true if pipe construction is correct, false otherwise
252 */
253 bool initCheck() const { return mPipe != NULL; }
254
255 /**
256 * \brief Get the next buffer that will be written to the pipe
257 *
258 * Gets the next audio buffer that can be filled with PCM data for the
259 * mono pipe.
260 *
261 * \param buffer Pointer to the buffer to fill with next buffer's info
262 * \return 0 on success, otherwise negative error code
263 */
264 int getNextBuffer(BufferProvider::Buffer *buffer);
265
266 /**
267 * \brief Release the buffer from the pipe
268 *
269 * Release the audio buffer previously obtained through getNextBuffer().
270 * It's a logical error to release a buffer not previously obtained,
271 * result is undefined.
272 *
273 * \param buffer Pointer to the buffer to be released
274 */
275 void releaseBuffer(BufferProvider::Buffer *buffer);
276
277 protected:
278 MonoPipe *mPipe; /**< The mono pipe used by this writer */
279 BufferProvider::Buffer mBuffer; /**< Buffer with data to be written to the pipe */
280};
281
282} /* namespace tiaudioutils */
283
284#endif /* _TIAUDIOUTILS_MONOPIPE_H_ */
diff --git a/audio/utils/include/tiaudioutils/MumStream.h b/audio/utils/include/tiaudioutils/MumStream.h
new file mode 100644
index 0000000..73507eb
--- /dev/null
+++ b/audio/utils/include/tiaudioutils/MumStream.h
@@ -0,0 +1,257 @@
1/*
2 * Copyright (C) 2013 Texas Instruments
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/**
18 * \file MumStream.h
19 * \brief Classes for merge and unmerge audio streams
20 *
21 * Merge class allows multiple incoming inputs to be assembled in a single
22 * output with flexible slot mapping. Unmerge class produces multiple outputs
23 * from a single input stream.
24 */
25
26#ifndef _TIAUDIOUTILS_MUMSTREAM_H_
27#define _TIAUDIOUTILS_MUMSTREAM_H_
28
29#include <sys/types.h>
30#include <system/audio.h>
31#include <errno.h>
32#include <set>
33
34#include <tiaudioutils/Pcm.h>
35#include <tiaudioutils/Base.h>
36
37#include <utils/RefBase.h>
38#include <utils/StrongPointer.h>
39
40namespace tiaudioutils {
41
42using std::set;
43using android::sp;
44using android::wp;
45
46class InStream;
47class OutStream;
48
49/**
50 * \class Merge
51 * \brief %Merge
52 *
53 * Merge multiple audio streams into a single output stream.
54 */
55class Merge {
56 public:
57 /**
58 * \brief Constructor of a merge
59 *
60 * Constructs a merge object with the given stream parameters. Initially,
61 * the merge object contains no streams to be merged.
62 *
63 * \param params Output stream parameters (see PcmParams)
64 */
65 Merge(const PcmParams &params);
66
67 /**
68 * \brief Destructor of a merge
69 *
70 * Destroys a merge object.
71 */
72 virtual ~Merge();
73
74 /**
75 * \brief Check the result of constructing a merge object
76 *
77 * Result of constructing a Merge. It must be checked before using any Merge
78 * methods.
79 * Result is undefined otherwise.
80 *
81 * \return true if merge construction is correct, false otherwise
82 */
83 virtual bool initCheck() const;
84
85 /**
86 * \brief Get the PcmParams of the merge instance
87 *
88 * Get the PcmParams used in this merge instance.
89 *
90 * \return Reference to the PCM params of the merge
91 */
92 virtual const PcmParams& getParams() const { return mParams; }
93
94 /**
95 * \brief Register a stream for merge
96 *
97 * Register a output stream to be merged.
98 *
99 * \param stream Pointer to a Stream instance to be registered
100 * \return 0 on success, otherwise negative error code
101 */
102 virtual int registerStream(const sp<OutStream>& stream);
103
104 /**
105 * \brief Un-register a stream
106 *
107 * Un-register an output stream from a merge instance.
108 *
109 * \param stream Pointer to a Stream instance to be un-registered
110 */
111 virtual void unregisterStream(sp<OutStream>& stream);
112
113 /**
114 * \brief Process the merge stream
115 *
116 * Process the merge stream operation. It's caller responsibility to pass a
117 * valid buffer previously allocated.
118 *
119 * \param outBuffer Buffer where merged data will be copied to.
120 * \return 0 on success, otherwise negative error code
121 */
122 virtual int process(BufferProvider::Buffer &outBuffer);
123
124 private:
125 Merge(const Merge &merge);
126 Merge& operator=(const Merge &merge);
127
128 protected:
129 /**
130 * \brief Merge an individual stream
131 *
132 * Merge a given stream buffer into the output.
133 *
134 * \param stream The stream to be merged
135 * \param inBuffer The source buffer to be merged
136 * \param outBuffer The destination buffer
137 */
138 virtual void merge(sp<OutStream> stream,
139 BufferProvider::Buffer &inBuffer,
140 BufferProvider::Buffer &outBuffer);
141
142 /** Set of weak pointers to the registered output streams */
143 typedef set< wp<OutStream> > StreamSet;
144
145 PcmParams mParams; /**< PCM parameters used during merge operation */
146 uint32_t mDstMask; /**< The mask of the channels currently being merged */
147 uint32_t mContainerBytes; /**< The number of bytes in the container per sample */
148 StreamSet mStreams; /**< Set of registered OutStream objects */
149 Mutex mLock; /**< Lock to synchronize registration and processing */
150};
151
152/**
153 * \class UnMerge
154 * \brief %UnMerge
155 *
156 * UnMerge a single audio stream into multiple streams.
157 */
158class UnMerge {
159 public:
160 /**
161 * \brief Constructor of an unmerge
162 *
163 * Constructs an unmerge object with the given stream parameters. Initially,
164 * the unmerge object contains no streams to be un-merged.
165 *
166 * \param params Input stream parameters (see PcmParams)
167 */
168 UnMerge(const PcmParams &params);
169
170 /**
171 * \brief Destructor of an unmerge
172 *
173 * Destroys an unmerge object.
174 */
175 virtual ~UnMerge();
176
177 /**
178 * \brief Check the result of constructing an unmerge object
179 *
180 * Result of constructing an UnMerge. It must be checked before using any
181 * UnMerge methods.
182 * Result is undefined otherwise.
183 *
184 * \return true if unmerge construction is correct, false otherwise
185 */
186 virtual bool initCheck() const;
187
188 /**
189 * \brief Get the PcmParams of the unmerge instance
190 *
191 * Get the PcmParams used in this unmerge instance.
192 *
193 * \return Reference to the PCM params of the unmerge
194 */
195 virtual const PcmParams& getParams() const { return mParams; }
196
197 /**
198 * \brief Register an stream for unmerge
199 *
200 * Register an input stream to be filled with un-merged content.
201 *
202 * \param stream Pointer to an InputStream instance to be registered
203 * \return 0 on success, otherwise negative error code
204 */
205 virtual int registerStream(const sp<InStream>& stream);
206
207 /**
208 * \brief Un-register an stream
209 *
210 * Un-register an input stream from an UnMerge instance.
211 *
212 * \param stream Pointer to an InStream instance to be un-registered
213 */
214 virtual void unregisterStream(sp<InStream>& stream);
215
216 /**
217 * \brief Process the unmerge stream
218 *
219 * Process the unmerge stream operation. It's caller responsibility to pass
220 * a valid buffer previously allocated.
221 *
222 * \param inBuffer Buffer from where unmerged data will be copied.
223 * \return 0 on success, otherwise negative error code
224 */
225 virtual int process(BufferProvider::Buffer &inBuffer);
226
227 private:
228 UnMerge(const UnMerge &unmerge);
229 UnMerge& operator=(const UnMerge &unmerge);
230
231 protected:
232 /**
233 * \brief UnMerge an individual stream
234 *
235 * UnMerge data from the input to a given stream buffer.
236 *
237 * \param stream The stream to be filled with unmerged content
238 * \param inBuffer The source buffer to be unmerged
239 * \param outBuffer The destination buffer
240 */
241 virtual void unmerge(sp<InStream> stream,
242 BufferProvider::Buffer &inBuffer,
243 BufferProvider::Buffer &outBuffer);
244
245 /** Set of weak pointers to the registered input streams */
246 typedef set< wp<InStream> > StreamSet;
247
248 PcmParams mParams; /**< PCM parameters used during unmerge operation */
249 uint32_t mSrcMask; /**< The mask of the channels currently being unmerged */
250 uint32_t mContainerBytes; /**< The number of bytes in the container per sample */
251 StreamSet mStreams; /**< Set of registered InStream objects */
252 Mutex mLock; /**< Lock to synchronize registration and processing */
253};
254
255} /* namespace tiaudioutils */
256
257#endif /* _TIAUDIOUTILS_MUMSTREAM_H_ */
diff --git a/audio/utils/include/tiaudioutils/Pcm.h b/audio/utils/include/tiaudioutils/Pcm.h
new file mode 100644
index 0000000..a086d36
--- /dev/null
+++ b/audio/utils/include/tiaudioutils/Pcm.h
@@ -0,0 +1,377 @@
1/*
2 * Copyright (C) 2013 Texas Instruments
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/**
18 * \file Pcm.h
19 * \brief Abstract classes of PCM ports, input and output
20 *
21 * Defines the PCM ports involved in audio playback and capture.
22 */
23
24#ifndef _TIAUDIOUTILS_PCM_H_
25#define _TIAUDIOUTILS_PCM_H_
26
27#include <hardware/audio.h>
28#include <system/audio.h>
29
30#include <tiaudioutils/Base.h>
31
32/* forward declaration */
33struct pcm_config;
34
35namespace tiaudioutils {
36
37/**
38 * \enum StreamDirection
39 * \brief Audio stream direction
40 *
41 * Enum that represents the direction of the audio stream: playback or capture
42 */
43enum StreamDirection {
44 PLAYBACK, /**< Playback direction */
45 CAPTURE /**< Capture direction */
46};
47
48class PcmPort;
49class PcmInPort;
50class PcmOutPort;
51
52/**
53 * \class BufferProvider
54 * \brief %Buffer provider
55 *
56 * It represents components than can provider buffers for capture or playback.
57 */
58class BufferProvider {
59 public:
60 /**
61 * \class Buffer
62 * \brief Audio buffer
63 *
64 * The audio buffer defined as a pointer to the audio data and its size
65 * in frames.
66 */
67 struct Buffer {
68 /**
69 * \brief Default constructor
70 *
71 * Constructs a default (but invalid) audio buffer.
72 */
73 Buffer() : raw(NULL), frameCount(0) { }
74 union {
75 void *raw;
76 int32_t *i32;
77 int16_t *i16;
78 int8_t *i8;
79 }; /**< Pointer to the audio data */
80 size_t frameCount; /**< %Buffer size in frames */
81 };
82
83 protected:
84 BufferProvider() {}
85 virtual ~BufferProvider() {}
86
87 public:
88 /**
89 * \brief Get the next buffer
90 *
91 * Get the next audio buffer with at most the requested number of frames.
92 * The buffer provider can update it with the actual number of frames it
93 * was able to provide.
94 * The buffer provider is in charge of populating the buffer data pointer
95 * with a buffer that is valid until the call to releaseBuffer().
96 *
97 * \param buffer Pointer to the buffer to fill with next buffer's info
98 * \return 0 on success, otherwise negative error code
99 */
100 virtual int getNextBuffer(Buffer* buffer) = 0;
101
102 /**
103 * \brief Release the buffer
104 *
105 * Release the audio buffer previously obtained through getNextBuffer().
106 * It's a logical error to release a buffer not previously obtained, result
107 * is undefined.
108 *
109 * \param buffer Pointer to the buffer to be released
110 */
111 virtual void releaseBuffer(Buffer* buffer) = 0;
112};
113
114/**
115 * \class PcmParams
116 * \brief PCM parameters
117 *
118 * The PCM parameters that define an audio stream.
119 */
120class PcmParams {
121 public:
122 /**
123 * \brief Default constructor
124 *
125 * Constructs default (but invalid) PCM parameters. PCM parameters must be
126 * explicitly set for them to be valid for further use.
127 */
128 PcmParams();
129
130 /**
131 * \brief Constructor from individiual parameter values
132 *g
133 * Constructs the PCM params from explicit values for each field
134 *
135 * \param chan Number of channels/slots in a frame
136 * \param bits Number of bits in a sample
137 * \param rate Sample rate of the stream
138 * \param frames Number of frames in the buffer
139 */
140 PcmParams(uint32_t chan, uint32_t bits, uint32_t rate, uint32_t frames = 0);
141
142 /**
143 * \brief Constructor from a tinyalsa config
144 *
145 * Constructs the PCM params from the config parameters of tinyalsa.
146 * Most parameters are built from their corresponding counterpart, except
147 * for the buffer size which is set from the tinyalsa's period size.
148 *
149 * \param config tinyalsa PCM config
150 */
151 PcmParams(const struct pcm_config &config);
152
153 /**
154 * \brief Constructor from Android's audio config
155 *
156 * Constructs the PCM params from the Android's audio config and an optional
157 * buffer size. Parameters like channels, bit/sample and rate are built from
158 * their Android's audio config counterpart. Buffer size is not defined in
159 * Android's audio config hence it's taken from the passed argument.
160 *
161 * \param config Android audio config structuure
162 * \param frames Number of frames in the audio buffer
163 */
164 PcmParams(const struct audio_config &config, uint32_t frames = 0);
165
166 /**
167 * \brief Test if current state of params is valid
168 *
169 * Test if the current state of the PCM parameters is valid.
170 *
171 * \return true is params are valid, false otherwise
172 */
173 bool isValid() const;
174
175 /**
176 * \brief Get the number of bytes in a sample
177 *
178 * Get the number of bytes in an audio sample.
179 */
180 uint32_t sampleSize() const { return sampleBits / 8; };
181
182 /**
183 * \brief Get the number of bytes in a frame
184 *
185 * Get the number of bytes in an audio frame.
186 */
187 uint32_t frameSize() const { return sampleSize() * channels; };
188
189 /**
190 * \brief Get the number of bytes in the buffer
191 *
192 * Get the number of bytes in the audio buffer.
193 */
194 uint32_t bufferSize() const { return sampleSize() * channels * frameCount; }
195
196 /**
197 * \brief Get the number of samples in the buffer
198 *
199 * Gets the number of audio samples in the buffer. The term sample
200 * refers to the container of a single audio channel.
201 */
202 uint32_t sampleCount() const { return channels * frameCount; }
203
204 /**
205 * \brief Convert frames to bytes
206 *
207 * Convert the number of audio frames to bytes using the PCM parameters in
208 * this object.
209 *
210 * \param frames Number of audio frames to be converted
211 * \return Number of bytes in the passed frames
212 */
213 uint32_t framesToBytes(uint32_t frames) const;
214
215 /**
216 * \brief Convert bytes to frames
217 *
218 * Convert the number of bytes to frames using the PCM parameters in
219 * this object.
220 *
221 * \param bytes Number of bytes to be converted
222 * \return Number of frames in the passed frames
223 */
224 uint32_t bytesToFrames(uint32_t bytes) const;
225
226 /**
227 * \brief Fill pcm_config struct
228 *
229 * Fill a tinyalsa's pcm_config from the parameters of this object. Few fields
230 * of pcm_config are populated: channels, rate, format and period_size. Other
231 * fields must be populated outside this method as PcmParams contains less
232 * information than pcm_config.
233 *
234 * \param config tinyalsa pcm_config to be filled
235 */
236 void toPcmConfig(struct pcm_config &config) const;
237
238 /**
239 * \brief Fill audio_config struct
240 *
241 * Fill an Android's pcm_config from the parameters of this object for the
242 * given stream direction as channel mask is direction dependent in
243 * audio_config.
244 *
245 * \param config audio_config struct to be filled
246 * \param dir Stream direction
247 */
248 void toAudioConfig(struct audio_config &config, StreamDirection dir) const;
249
250 uint32_t channels; /**< The number of channels in a frame */
251 uint32_t sampleBits; /**< The number of bits in a sample */
252 uint32_t sampleRate; /**< The sample rate of the stream */
253 uint32_t frameCount; /**< The number of frames in the buffer */
254};
255
256/**
257 * \class PcmPort
258 * \brief PCM port
259 *
260 * PcmPort abstracts the parts of a PCM port that are common for playback
261 * and capture.
262 */
263class PcmPort {
264 public:
265 /**
266 * \brief Destructor of a PCM port
267 *
268 * Destroys a PCM port object.
269 */
270 virtual ~PcmPort() {}
271
272 /**
273 * \brief Get the card id
274 *
275 * Get the id of the sound card that this PCM port belongs to.
276 *
277 * \return The sound card id
278 */
279 virtual uint32_t getCardId() const = 0;
280
281 /**
282 * \brief Get port id
283 *
284 * Get the id of the PCM port.
285 *
286 * \return The PCM port id
287 */
288 virtual uint32_t getPortId() const = 0;
289
290 /**
291 * \brief Open the PCM port
292 *
293 * Opens a PCM port with the requested PCM parameters.
294 *
295 * \param params Reference to the PCM params
296 * \return 0 on success, otherwise negative error code
297 */
298 virtual int open(const PcmParams &params) = 0;
299
300 /**
301 * \brief Close the PCM port
302 *
303 * Closes the PCM port if open.
304 */
305 virtual void close() = 0;
306
307 /**
308 * \brief Query if PCM port is open
309 *
310 * Query is PCM is open and ready to use.
311 *
312 * \return true if port is open, false otherwise
313 */
314 virtual bool isOpen() const = 0;
315};
316
317/**
318 * \class PcmInPort
319 * \brief PCM input port
320 *
321 * PCM input port represents a port with capture capability.
322 */
323class PcmInPort : public PcmPort {
324 public:
325 /**
326 * \brief Destructor of a PCM input port
327 *
328 * Destroys a PCM input port object.
329 */
330 virtual ~PcmInPort() {}
331
332 /**
333 * \brief Read audio frames
334 *
335 * Read audio frames from the PCM input port. The PCM input port must be
336 * open first by calling open() method. Number of frames read can be less
337 * than requested.
338 *
339 * \param buffer Pointer to the buffer where data will be copied to
340 * \param frames Number of frames to be read
341 * \return Number of frames read, otherwise error code
342 */
343 virtual int read(void *buffer, size_t frames) = 0;
344};
345
346/**
347 * \class PcmOutPort
348 * \brief PCM output port
349 *
350 * PCM output port represents a port with playback capability.
351 */
352class PcmOutPort : public PcmPort {
353 public:
354 /**
355 * \brief Destructor of a PCM output port
356 *
357 * Destroys a PCM output port object.
358 */
359 virtual ~PcmOutPort() {}
360
361 /**
362 * \brief Write audio frames
363 *
364 * Write audio frames from the PCM input port. The PCM output port must be
365 * already open by calling open() method. Number of frames written can be less
366 * than requested.
367 *
368 * \param buffer Pointer to the buffer where playback data resides