diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-19 18:52:58 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-19 18:52:58 -0600 |
commit | afae1035cca2f7f943038bb8cc0c5662e6388fc6 (patch) | |
tree | 5319faa5f7c2dfcde982b22319da7f8384be9d07 /nuttx/include | |
parent | 900b21bcda1dd609f0541a070fd4556fdb58119a (diff) | |
download | px4-nuttx-afae1035cca2f7f943038bb8cc0c5662e6388fc6.tar.gz px4-nuttx-afae1035cca2f7f943038bb8cc0c5662e6388fc6.tar.bz2 px4-nuttx-afae1035cca2f7f943038bb8cc0c5662e6388fc6.zip |
The WM8904 audio driver is mostly code complete and ready to begin initial testing
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/audio/i2s.h | 10 | ||||
-rw-r--r-- | nuttx/include/nuttx/audio/wm8904.h | 37 |
2 files changed, 42 insertions, 5 deletions
diff --git a/nuttx/include/nuttx/audio/i2s.h b/nuttx/include/nuttx/audio/i2s.h index 8ef782053..21489271b 100644 --- a/nuttx/include/nuttx/audio/i2s.h +++ b/nuttx/include/nuttx/audio/i2s.h @@ -60,8 +60,8 @@ * * Description: * Set the I2S RX sample rate. NOTE: This will have no effect if (1) the - * driver does not support an I2C receiver or if (2) the sample rate is - * driven by the I2C frame clock. This may also have unexpected side- + * driver does not support an I2S receiver or if (2) the sample rate is + * driven by the I2S frame clock. This may also have unexpected side- * effects of the RX sample is coupled with the TX sample rate. * * Input Parameters: @@ -130,8 +130,8 @@ * * Description: * Set the I2S TX sample rate. NOTE: This will have no effect if (1) the - * driver does not support an I2C transmitter or if (2) the sample rate is - * driven by the I2C frame clock. This may also have unexpected side- + * driver does not support an I2S transmitter or if (2) the sample rate is + * driven by the I2S frame clock. This may also have unexpected side- * effects of the TX sample is coupled with the RX sample rate. * * Input Parameters: @@ -176,7 +176,7 @@ * the completion of the transfer. The callback will be * performed in the context of the worker thread. * arg - An opaque argument that will be provided to the callback - * when the transfer complete. + * when the transfer completes. * timeout - The timeout value to use. The transfer will be cancelled * and an ETIMEDOUT error will be reported if this timeout * elapsed without completion of the DMA transfer. Units diff --git a/nuttx/include/nuttx/audio/wm8904.h b/nuttx/include/nuttx/audio/wm8904.h index 4b84f6d2a..c3538da19 100644 --- a/nuttx/include/nuttx/audio/wm8904.h +++ b/nuttx/include/nuttx/audio/wm8904.h @@ -57,6 +57,15 @@ /* Configuration ************************************************************ * * CONFIG_AUDIO_WM8904 - Enabled WM8904 support + * CONFIG_WM8904_INITVOLUME - The initial volume level in the range {0..1000} + * CONFIG_WM8904_INFLIGHT - Maximum number of buffers that the WM8904 driver + * will send to the I2S driver before any have completed. + * CONFIG_WM8904_MSG_PRIO - Priority of messages sent to the WM8904 worker + * thread. + * CONFIG_WM8904_BUFFER_SIZE - Preferred buffer size + * CONFIG_WM8904_NUM_BUFFERS - Preferred number of buffers + * CONFIG_WM8904_WORKER_STACKSIZE - Stack size to use when creating the the + * WM8904 worker thread. */ /* Pre-requisites */ @@ -83,6 +92,34 @@ /* Default configuration values */ +#ifndef CONFIG_WM8904_INITVOLUME +# define CONFIG_WM8904_INITVOLUME 250 +#endif + +#ifndef CONFIG_WM8904_INFLIGHT +# define CONFIG_WM8904_INFLIGHT 2 +#endif + +#if CONFIG_WM8904_INFLIGHT > 255 +# error CONFIG_WM8904_INFLIGHT must fit in a uint8_t +#endif + +#ifndef CONFIG_WM8904_MSG_PRIO +# define CONFIG_WM8904_MSG_PRIO 1 +#endif + +#ifndef CONFIG_WM8904_BUFFER_SIZE +# define CONFIG_WM8904_BUFFER_SIZE 8192 +#endif + +#ifndef CONFIG_WM8904_NUM_BUFFERS +# define CONFIG_WM8904_NUM_BUFFERS 4 +#endif + +#ifndef CONFIG_WM8904_WORKER_STACKSIZE +# define CONFIG_WM8904_WORKER_STACKSIZE 768 +#endif + /* Helper macros ************************************************************/ #define WM8904_ATTACH(s,isr,arg) ((s)->attach(s,isr,arg)) |