Audio: Add hooks for fast-forward and rewind needed by CMediaPlayer; add hooks for equalizer settings needed by the WM8904

This commit is contained in:
Gregory Nutt 2014-07-24 08:28:10 -06:00
parent 82aa010083
commit ca779ece55
3 changed files with 62 additions and 11 deletions

View file

@ -20,6 +20,8 @@ config AUDIO_MULTI_SESSION
Selecting this feature adds support for tracking multiple concurrent
sessions with the lower-level audio devices.
menu "Audio Buffer Configuration"
config AUDIO_LARGE_BUFFERS
bool "Support Audio Buffers with greater than 65K samples"
default n
@ -56,6 +58,8 @@ config AUDIO_DRIVER_SPECIFIC_BUFFERS
adds extra code which allows the lower-level audio device to specify
a partucular size and number of buffers.
endmenu # Audio Buffer Configuration
menu "Supported Audio Formats"
config AUDIO_FORMAT_AC3
@ -116,11 +120,28 @@ config AUDIO_EXCLUDE_BALANCE
---help---
Exclude building support for changing the balance.
config AUDIO_EXCLUDE_EQUALIZER
bool "Exclude equalizer controls"
default y
---help---
Exclude building support for setting equalization.
config AUDIO_EQUALIZER_NBANDS
int "Number of equalizer bands"
default 8
depends on !AUDIO_EXCLUDE_EQUALIZER
---help---
If equalizer support is not excluded, then it will be necessary to
provide the (maximum) number of equalization bands to be supported.
config AUDIO_EXCLUDE_TONE
bool "Exclude tone (bass and treble) controls"
default n
default y if !AUDIO_EXCLUDE_EQUALIZER
default n if AUDIO_EXCLUDE_EQUALIZER
---help---
Exclude building support for changing the bass and treble.
Exclude building support for changing the bass and treble. Normally
you would not select both tone controls and equalizer support unless
your underlying hardware supports both options.
config AUDIO_EXCLUDE_PAUSE_RESUME
bool "Exclude pause and resume controls"
@ -137,11 +158,28 @@ config AUDIO_EXCLUDE_STOP
default n
---help---
Exclude building support for stopping audio files once they are
submitted. If the sound system is being used to play short ssytem
notification or error type sounds that typicaly only last a second
submitted. If the sound system is being used to play short sytem
notification or error type sounds that typically only last a second
or two, then there is no need (or chance) to stop the sound
playback once it has started.
config AUDIO_EXCLUDE_FFORWARD
bool "Exclude fast forward controls"
default n if !AUDIO_EXCLUDE_STOP
default y if AUDIO_EXCLUDE_STOP
---help---
Exclude building support for fast forwarding through audio files
once they are submitted. Selecting this option would only make
if the underlying audio decoding logic is capable of sub-sampling
in the stream of audio data.
config AUDIO_EXCLUDE_REWIND
bool "Exclude rewind controls"
default y
---help---
Rewind may be supported by some audio devices, but not the typical
device that receives a non-seekable, stream of audio buffers.
endmenu
config AUDIO_CUSTOM_DEV_PATH

View file

@ -33,10 +33,6 @@
*
****************************************************************************/
/****************************************************************************
* Compilation Switches
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/

View file

@ -126,6 +126,23 @@
* and low-level audio drivers. This ioctls are not used by the higher
* level audio logic and need be implemented only in low-level audio
* drivers that are driven by a decoder.
*
* AUDIOIOC_BITRATE - Set bit rate
*
* ioctl argument: Audio bit rate in bits per second
* Range: 1-65535 BPS (Compare to AUDIO_BIT_RATE_* definitions)
*
* AUDIOIOC_NCHANNELS - Set number of audio channels
*
* ioctl argument: Number of audio channels. 1=MONO, 2=STEREO, etc.
* Range: 1-255, however most drivers will support only
* 1 and possibly 2
*
* AUDIOIOC_SAMPWIDTH - Set sample bit width
*
* ioctl argument: Sample bit width: 8=8-bit data, 16=16-bit data, etc.
* Range: 1-255, however, many drivers will support only
* one sample bit width.
*/
#define AUDIOIOC_BITRATE _AUDIOIOC(17)
@ -134,9 +151,9 @@
/* Audio Device Types *******************************************************/
/* The NuttX audio interface support different types of audio devices for
* input, output, synthesis, and manupulation of audio data. A given driver/
* input, output, synthesis, and manipulation of audio data. A given driver/
* device could support a combination of these device type. The following
* is a list of bit-field definitons for defining the device type.
* is a list of bit-field definitions for defining the device type.
*/
#define AUDIO_TYPE_QUERY 0x00
@ -151,7 +168,7 @@
/* Audio Format Types *******************************************************/
/* The following defines the audio data format types in NuttX. During a
* format query, these will be converted to bit positions withing the
* format query, these will be converted to bit positions within the
* ac_format field, meaning we currently only support up to 16 formats. To
* support more than that, we will use the FMT_OTHER entry, and the
* interfacing software can perform a second query to get the other formats.