summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-11-10 11:20:06 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-11-10 11:20:06 -0600
commitb6f65ea46230955a33e42c46dc30c5e428d3dd08 (patch)
tree1f1b0619552f38e49112ade56883fb25e8f65b7d
parent5a70f55a6fce67a324ad049e39d3ce532025365b (diff)
downloadpx4-nuttx-b6f65ea46230955a33e42c46dc30c5e428d3dd08.tar.gz
px4-nuttx-b6f65ea46230955a33e42c46dc30c5e428d3dd08.tar.bz2
px4-nuttx-b6f65ea46230955a33e42c46dc30c5e428d3dd08.zip
Moved audio/buffer.c to libc/audio/lib_buffer.c so that it can be shared betweent he OS and applications in a kernel build
-rw-r--r--nuttx/ChangeLog5
-rw-r--r--nuttx/audio/Makefile2
-rw-r--r--nuttx/audio/README.txt11
-rw-r--r--nuttx/libc/Makefile1
-rw-r--r--nuttx/libc/README.txt3
-rw-r--r--nuttx/libc/audio/lib_buffer.c (renamed from nuttx/audio/buffer.c)4
6 files changed, 18 insertions, 8 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index be77b5e56..dd38995af 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -6020,3 +6020,8 @@
* drivers/audio/vs1053: VS1053 worker thread stack size is now
configurable and assigned a name via pthread_setname_np(). From Ken
Pettit (2013-11-10).
+ * libc/audio/lib_buffer.c: Moved audio/buffer/c to libc/audio/lib_buffer.c.
+ This file was moved because it contains buffer management functions
+ that must be available to audio applications. If it was left in the
+ audio/ directory then it would not be available to applications in the
+ NuttX Kernel build (2013-11-10).
diff --git a/nuttx/audio/Makefile b/nuttx/audio/Makefile
index 7b34de1ae..b95e3900b 100644
--- a/nuttx/audio/Makefile
+++ b/nuttx/audio/Makefile
@@ -42,7 +42,7 @@ endif
DEPPATH = --dep-path .
ASRCS =
-CSRCS = audio.c buffer.c
+CSRCS = audio.c
VPATH = .
# Include support for various drivers. Each Make.defs file will add its
diff --git a/nuttx/audio/README.txt b/nuttx/audio/README.txt
index 80178865d..be86cacb0 100644
--- a/nuttx/audio/README.txt
+++ b/nuttx/audio/README.txt
@@ -21,13 +21,18 @@ layer for specific lower-half audio device drivers.
drivers/audio subdirectory. For each attached audio device, there
will be an instance of this upper-half driver bound to the
instance of the lower half driver context.
+ pcm.c - Routines to manage PCM / WAV type data. Currently just a placeholder.
+ README - This file!
+
+Portions of the the audio system interface have application interfaces. Those
+portions reside in the nuttx/libc/audio directory where the will be built for
+access by both OS driver logic and user application logic. Those relevant
+files in nuttx/libc/audio include:
+
buffer.c - Routines to manage creattion and destruction of audio pipeline buffers
(apb) used in the audio subsystem. Audio pipeline buffers are passed
between user applications and the audio drivers to deliver audio
content for playback (or possibly recording in the future).
- pcm.c - Routines to manage PCM / WAV type data. Currently just a placeholder.
- README - This file!
-
Related Header Files
^^^^^^^^^^^^^^^^^^^^
diff --git a/nuttx/libc/Makefile b/nuttx/libc/Makefile
index 2ced86e8c..a303973e5 100644
--- a/nuttx/libc/Makefile
+++ b/nuttx/libc/Makefile
@@ -73,6 +73,7 @@ include spawn/Make.defs
include queue/Make.defs
include wqueue/Make.defs
include misc/Make.defs
+include audio/Make.defs
BINDIR ?= bin
diff --git a/nuttx/libc/README.txt b/nuttx/libc/README.txt
index ed672d038..8b1ef9941 100644
--- a/nuttx/libc/README.txt
+++ b/nuttx/libc/README.txt
@@ -25,6 +25,7 @@ The files in the libc/ directory are organized (mostly) according which file
in the include/ directory provides the prototype for library functions. So
we have:
+ audio - This part of the audio system: nuttx/audio/audio.h
libgen - libgen.h
fixedmath - fixedmath.h
math - math.h
@@ -44,7 +45,7 @@ There is also a misc/ subdirectory that contains various internal functions
and interfaces from header files that are too few to warrant their own sub-
directory:
- misc - Nonstandard "glue" logic, debug.h, crc32.h, dirent.h
+ misc - Nonstandard "glue" logic, debug.h, crc32.h, dirent.h
Library Database
================
diff --git a/nuttx/audio/buffer.c b/nuttx/libc/audio/lib_buffer.c
index b0b5c6c36..0cd3bd9a0 100644
--- a/nuttx/audio/buffer.c
+++ b/nuttx/libc/audio/lib_buffer.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * audio/buffer.c
+ * libc/audio/lib_buffer.c
*
* Copyright (C) 2013 Ken Pettit. All rights reserved.
* Author: Ken Pettit <pettitkd@gmail.com>
@@ -161,7 +161,6 @@ void apb_prepare(FAR struct ap_buffer_s *apb, int8_t allocmode, uint8_t format,
uint8_t subformat, apb_samp_t maxsamples)
{
/* Perform a reference count decrement and possibly release the memory */
-
}
/****************************************************************************
@@ -207,4 +206,3 @@ void apb_reference(FAR struct ap_buffer_s *apb)
}
#endif /* CONFIG_AUDIO */
-