File tree 9 files changed +1863
-0
lines changed
9 files changed +1863
-0
lines changed Original file line number Diff line number Diff line change
1
+ # ##############################################################################
2
+ # apps/audioutils/alsa-lib/CMakeLists.txt
3
+ #
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more contributor
5
+ # license agreements. See the NOTICE file distributed with this work for
6
+ # additional information regarding copyright ownership. The ASF licenses this
7
+ # file to you under the Apache License, Version 2.0 (the "License"); you may not
8
+ # use this file except in compliance with the License. You may obtain a copy of
9
+ # the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations under
17
+ # the License.
18
+ #
19
+ # ##############################################################################
20
+
21
+ if (CONFIG_AUDIOUTILS_ALSA_LIB)
22
+ target_sources (apps PRIVATE alsa_pcm.c alsa_error.c)
23
+ endif ()
Original file line number Diff line number Diff line change
1
+ #
2
+ # For a description of the syntax of this configuration file,
3
+ # see the file kconfig-language.txt in the NuttX tools repository.
4
+ #
5
+
6
+ config AUDIOUTILS_ALSA_LIB
7
+ tristate "Enable ALSA lib"
8
+ default n
9
+
10
+ if AUDIOUTILS_ALSA_LIB
11
+
12
+ config AUDIOUTILS_ALSA_LIB_DEV_PATH
13
+ string "play/recored device path"
14
+ default "/dev/audio"
15
+
16
+ endif # ALSA_LIB
Original file line number Diff line number Diff line change
1
+ ############################################################################
2
+ # apps/audioutils/alsa-lib/Make.defs
3
+ #
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+ ############################################################################
20
+
21
+ ifneq ($(CONFIG_AUDIOUTILS_ALSA_LIB),)
22
+
23
+ CONFIGURED_APPS += $(APPDIR)/audioutils/alsa-lib
24
+
25
+ CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/audioutils/alsa-lib/include
26
+ CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/audioutils/alsa-lib/include
27
+
28
+ endif
Original file line number Diff line number Diff line change
1
+ # ###########################################################################
2
+ # apps/audioutils/alsa-lib/Makefile
3
+ #
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+ # ###########################################################################
20
+
21
+ include $(APPDIR ) /Make.defs
22
+
23
+ CSRCS += $(wildcard * .c)
24
+
25
+ EXPORT_FILES := include
26
+
27
+ include $(APPDIR ) /Application.mk
Original file line number Diff line number Diff line change
1
+ /****************************************************************************
2
+ * apps/audioutils/alsa-lib/alsa_error.c
3
+ *
4
+ * Licensed to the Apache Software Foundation (ASF) under one or more
5
+ * contributor license agreements. See the NOTICE file distributed with
6
+ * this work for additional information regarding copyright ownership. The
7
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance with the
9
+ * License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ * License for the specific language governing permissions and limitations
17
+ * under the License.
18
+ *
19
+ ****************************************************************************/
20
+
21
+ /****************************************************************************
22
+ * Included Files
23
+ ****************************************************************************/
24
+
25
+ #include <alsa_error.h>
26
+
27
+ #include <string.h>
28
+
29
+ /****************************************************************************
30
+ * Public Functions
31
+ ****************************************************************************/
32
+
33
+ FAR const char * snd_strerror (int errnum )
34
+ {
35
+ if (errnum < 0 )
36
+ {
37
+ errnum = - errnum ;
38
+ }
39
+
40
+ return (FAR const char * )strerror (errnum );
41
+ }
You can’t perform that action at this time.
0 commit comments