Commit Graph

61 Commits

Author SHA1 Message Date
Xiang Xiao cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao 5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao 80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Xiang Xiao 6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
anchao 9e3bafc7c6 audio/audio.c: Add message type to support audio trigger. 2019-11-03 19:52:18 -06:00
Nathan Hartman 46aaec7ba0 Fix minor typos in docs and comments. 2019-09-29 12:52:20 -06:00
Juha Niskanen 822bb06967 Fix some typos. Also minor update to stm32f7/nucleo-144/README.txt and stm32l4/nucleo-l496zg/README.txt board documentation. 2019-09-05 08:12:50 -06:00
Gregory Nutt dfd2701f97 audio/audio.c: Yet another missing comma from big CONFIG_DISABLE_POLL removal. 2019-05-22 08:23:59 -06:00
Gregory Nutt b49be4bb20 Squashed commit of the following:
arch/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    sched/ audio/ crypto/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    Documentation/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    fs/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    graphics/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    net/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    drivers/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    include/, syscall/, wireless/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    configs/:  Remove all references to CONFIG_DISABLE_POLL.  Standard POSIX poll can no longer be disabled.
2019-05-21 18:57:54 -06:00
Gregory Nutt dc8c814ca3 Squashed commit of the following:
Fixed coding standard error in several files.  Use of while( is incorrect; a space is required between while and (.  Also ran tools/nxstyle and fix thoses complaints as well in most files.

    Changes to comply with coding standard.  Mostly focused on files with missing space after keyword in if(, switch(, and for(.  Offending files also got changes to comply with tools nxstyle.  If there were logs of nxstyle complaints, the file also got a taste of tools/indent.sh.  Still need to fix occurrences of while( with missing space.  There are a lot of them.
2019-02-27 08:41:08 -06:00
Xiang Xiao b5f8c035a6 audio/audio_comp.c: Add the composite audio driver 2018-08-27 09:03:09 -06:00
Gregory Nutt 2722fd8192 tools/nxstyle.c: Add capability to detect multiple blank lines. Single spacing required by the coding standard. Also coding standard fixes to server .c files for problems found during testing nxstyle. 2018-08-24 05:51:44 -06:00
Alan Carvalho de Assis 283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Alan Carvalho de Assis 97937d3d47 configs/stm32f103-minimum: Add support to BMP180 on BluePill (stm32f103-minimum) board. 2018-02-04 07:34:31 -06:00
Gregory Nutt 7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt fca07be1df Squashed commit of the following:
Change all calls to mq_send() and mq_timedsend() in the OS to calls to nxmq_send() and nxmq_timedsend(), making appropriate changes for differences in return values.

    sched/mqueue:  Add internal function nxmq_send() and nxmq_timedsend() that are equivalent to mq_send() and mq_timedsend() except that they do not create cancellation points and do to not modify the errno variable.
2017-10-10 08:44:12 -06:00
Gregory Nutt 9568600ab1 Squashed commit of the following:
This commit backs out most of commit b4747286b1.  That change was added because sem_wait() would sometimes cause cancellation points inappropriated.  But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.

    In the OS, all calls to sem_wait() changed to nxsem_wait().  nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.

    In all OS functions (not libraries), change sem_wait() to nxsem_wait().  This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.

    sched/semaphore:  Add the function nxsem_wait().  This is a new internal OS interface.  It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt 42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt 83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Gregory Nutt 0de294a586 Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they. 2017-05-11 13:35:56 -06:00
Gregory Nutt 43eb04bb8f Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). 2016-06-20 11:59:15 -06:00
Gregory Nutt 0c8c7fecf0 Add _ to the beginning of all debug macros to avoid name collisions 2016-06-16 12:33:32 -06:00
Gregory Nutt b29a4dd49c audio/, crypto/, libnx/, and mm/: Change some err() ERRORS to warn() WARNINGS or info() 2016-06-12 09:46:23 -06:00
Gregory Nutt a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt e523c93391 Several Makefiles: Add .PHONY definitions to prevent 'clean up to date' message weirdness. 2016-05-10 15:44:06 -06:00
Gregory Nutt 6d1b4c051e Add new top-level wireless/ directory 2016-02-26 17:07:04 -06:00
Gregory Nutt 06cd5b2fcc mm, audio, crypto, graphics: Fix various spacing/alignment issues 2015-10-08 09:10:22 -06:00
Gregory Nutt 342f5fe33d Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation 2015-06-28 08:08:57 -06:00
Gregory Nutt 55e21bf045 PIC32MZ: Correct a few more DEVCFG issues 2015-02-27 16:20:28 -06:00
Gregory Nutt b285162e79 Fix some warnings in audio code causing by fixing the prototypes of mq_send() and mq_receive() 2015-02-09 12:50:04 -06:00
Gregory Nutt 2994448d85 More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs. 2014-11-25 13:15:09 -06:00
Gregory Nutt 205260d5e2 Reanem kzalloc to kmm_zalloc for consistency 2014-08-31 17:34:44 -06:00
Gregory Nutt 9aca0c1c84 Rename kumalloc to kumm_malloc and kuzalloc to kumm_zalloc for consistency with other naming 2014-08-31 16:24:24 -06:00
Gregory Nutt 9ad7dae4c1 Rename kufree to kumm_free for consistency with other naming 2014-08-31 16:15:11 -06:00
Gregory Nutt 78ccbdeb6e PCM decoder: Handle errors in the PCM WAV file in a way that the Nxplayer can recover gracefully: Send and Audio Complete message. 2014-08-05 10:06:05 -06:00
Gregory Nutt bb29ba0a00 Costmetic changes 2014-08-05 10:03:29 -06:00
Gregory Nutt f287d0f9ca PCM decoder: Correct the end of audio stream handling. It was not being detected before so that logic was not examining the WAV header in the first buffer of the next audio file 2014-08-02 14:27:12 -06:00
Gregory Nutt 1130fbc6d1 Audio: More debug outpu 2014-07-31 15:00:12 -06:00
Gregory Nutt 5e9a388ebd PCM decoder: Fix a logic error in a DEBUG assertion 2014-07-28 12:45:22 -06:00
Gregory Nutt 1da856cca9 PCM: Forget to increment pointers in one part of sub-sampling 2014-07-27 21:47:25 -06:00
Gregory Nutt ab26d97d74 PCM: Major simplification of the sub-sampling design. Now need no extra buffers because sub-sampling is done in place 2014-07-27 21:42:10 -06:00
Gregory Nutt 2efb594f50 PCM: remove partial sample buffer. Not needed 2014-07-27 21:00:19 -06:00
Gregory Nutt 38c095bd17 NxPlayer needs to set curbyte field to zero before enqueuing a buffer. Otherwise, it looks like beginning of the buffer has already been consumed 2014-07-27 19:49:01 -06:00
Gregory Nutt f235f95e52 Misc bugfixes while integrating fast forward by sub-sampling 2014-07-27 19:32:07 -06:00
Gregory Nutt c9f15ffd3d PCM: First cut at fast forward by subsampling 2014-07-27 18:33:17 -06:00
Gregory Nutt 4e3de441af PCM Decoder: Add missing audio callback forwarding logic 2014-07-25 10:07:32 -06:00
Gregory Nutt 22f8503d0a Convert ac_format and ac_controls to unions to make access a little cleaner 2014-07-24 10:21:04 -06:00
Gregory Nutt dba43a9c75 Audio: Get rid of the decoder->driver IOCTLs that I added a couple of commits back; Use existing configure method 2014-07-24 09:56:39 -06:00