#
# For a description of the syntax of this configuration file,
# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
-#
-config AUDIO_NULL
- bool "NULL audio device"
+config AUDIO_I2SCHAR
+ bool "I2S character driver (for testing only)"
default n
- depends on AUDIO
+ depends on I2S && AUDIO
---help---
- A do-nothinig audio device driver to simplify testing of audio
- decoders.
-
-if AUDIO_NULL
-
-config AUDIO_NULL_MSG_PRIO
- int "Null audio device message priority"
- default 1
+ This selection enables a simple character driver that supports I2S
+ transfers via a read() and write(). The intent of this driver is to
+ support I2S testing. It is not an audio driver but does conform to
+ some of the buffer management heuristics of an audio driver. It is
+ not suitable for use in any real driver application in its current
+ form.
-config AUDIO_NULL_BUFFER_SIZE
- int "Null audio device preferred buffer size"
- default 8192
+if AUDIO_I2SCHAR
-config AUDIO_NULL_NUM_BUFFERS
- int "Null audio device preferred number of buffers"
- default 4
+config AUDIO_I2SCHAR_RXTIMEOUT
+ int "RX timeout"
+ default 0
+ ---help---
+ This is a fixed timeout value that will be used for all receiver
+ transfers. This is in units of system clock ticks (configurable).
+ The special value of zero disables RX timeouts. Default: 0
-config AUDIO_NULL_WORKER_STACKSIZE
- int "Null audio device worker thread stack size"
- default 768
+config AUDIO_I2SCHAR_TXTIMEOUT
+ int "TX timeout"
+ default 0
+ ---help---
+ This is a fixed timeout value that will be used for all transmitter
+ transfers. This is in units of system clock ticks (configurable).
+ The special value of zero disables RX timeouts. Default: 0
-endif # AUDIO_NULL
+endif # AUDIO_I2SCHAR
-choice
- prompt "Select how to use the alc5658"
+config AUDIO_NULL
+ bool "NULL audio device"
+ default n
+ depends on AUDIO
+ ---help---
+ A do-nothinig audio device driver to simplify testing of audio
+ decoders.
config AUDIO_ALC5658
bool "ALC5658 audio chip"
config AUDIO_ALC5658CHAR
bool "ALC5658 Character Driver (for testing and demo only)"
- depends on I2S && AUDIO && I2C
+ depends on I2S && AUDIO && I2C && !AUDIO_ALC5658 && EXAMPLES_SENSORBOARD
---help---
This selection enables a simple character driver that supports ALC codec
transfers via a read() and write() ioctl. The intent of this driver is to
endif # AUDIO_ALC5658CHAR
-endchoice
+if AUDIO_NULL
+
+config AUDIO_NULL_MSG_PRIO
+ int "Null audio device message priority"
+ default 1
+
+config AUDIO_NULL_BUFFER_SIZE
+ int "Null audio device preferred buffer size"
+ default 8192
+
+config AUDIO_NULL_NUM_BUFFERS
+ int "Null audio device preferred number of buffers"
+ default 4
+
+config AUDIO_NULL_WORKER_STACKSIZE
+ int "Null audio device worker thread stack size"
+ default 768
+
+endif # AUDIO_NULL
if (ret < 0) {
ret = -errno;
DEBUGASSERT(ret < 0);
- i2serr("ERROR: sem_wait returned: %d\n", ret);
+ lldbg("ERROR: sem_wait returned: %d\n", ret);
goto errout_with_reference;
}
ret = I2S_RECEIVE(priv->i2s, apb, i2schar_rxcallback, priv, CONFIG_AUDIO_I2SCHAR_RXTIMEOUT);
if (ret < 0) {
- i2serr("ERROR: I2S_RECEIVE returned: %d\n", ret);
+ lldbg("ERROR: I2S_RECEIVE returned: %d\n", ret);
goto errout_with_reference;
}
if (ret < 0) {
ret = -errno;
DEBUGASSERT(ret < 0);
- i2serr("ERROR: sem_wait returned: %d\n", ret);
+ lldbg("ERROR: sem_wait returned: %d\n", ret);
goto errout_with_reference;
}
ret = I2S_SEND(priv->i2s, apb, i2schar_txcallback, priv, CONFIG_AUDIO_I2SCHAR_TXTIMEOUT);
if (ret < 0) {
- i2serr("ERROR: I2S_SEND returned: %d\n", ret);
+ lldbg("ERROR: I2S_SEND returned: %d\n", ret);
goto errout_with_reference;
}