Commit Graph

42 Commits

Author SHA1 Message Date
chao an 664927c86e mm/alloc: remove all unnecessary cast for alloc
Fix the minor style issue and remove unnecessary cast

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-30 14:34:20 +08:00
Tiago Medicci Serrano ea276b20ef audio/pcm_decode: fix warnings regarding unused functions and vars
* 'pcm_dump' available if 'CONFIG_DEBUG_AUDIO_INFO' is set
instead of using the 'CONFIG_PCM_DEBUG'.
* 'pcm_leuint16' and 'pcm_leuint32' available if
'CONFIG_AUDIO_FORMAT_RAW' is not set (once 'pcm_parsewav', which
is available under the same condition, use them).
* 'headersize' var, from 'pcm_enqueuebuffer' declared only if
'CONFIG_AUDIO_FORMAT_RAW' is not set (as it's used by the code
defined by the same condition).
2023-05-02 19:19:14 +03:00
Gustavo Henrique Nihei e6b204f438 nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
tobias2johansson 57d823b69d pcm_decode: correction to RAW format support
corrects misplaced preprocessor directives for CONFIG_AUDIO_FORMAT_RAW
2021-06-02 02:27:36 -05:00
Yuichi Nakamura 9061c997fc audio/pcm_decode.c: skip extra chunk of wav header
Summary:
- The wav header parser in /dev/audio/pcm device driver expects the 'data'
  chunk is placed just after the 'fmt ' chunk.
- Because the wav files generated by FFmpeg places 'LIST' chunk which
  contains the music track information between 'fmt ' and 'data' chunks,
  nxplayer cannot playback the files.
- This patch skips extra chunks after 'fmt ' chunk to find the 'data' chunk.

Impact:
- All architectures which support /dev/audio/pcm device.

Testing:
- Tested by Raspberry Pi Pico audio driver.
- nxplayer can playback the wav files which are created by FFmpeg after
  applying this patch.
2021-04-19 03:32:21 -05:00
Alin Jerpelea 231b8518b7 NuttX: Ken Pettit: update licenses to Apache
Ken Pettit has submitted the ICLA and we can migrate the licenses
 to Apache.

Sebastien Lorquet has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-10 06:42:19 -05:00
Alin Jerpelea 41b029876f pcm_decode: add RAW format support
adds CONFIG_AUDIO_FORMAT_RAW as an option to the PCM
audio format for devices expecting raw data without
a header.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-02 18:27:45 -08:00
Gustavo Henrique Nihei 76acb32e29 Fix typos reported by codespell 2021-02-25 11:31:49 -08:00
YAMAMOTO Takashi d7086d333e audio/pcm_decode.c: Fix syslog formats 2020-11-27 05:18:57 -06:00
Ouss4 d065bbe9b3 audio/pcm_decode.c: Fix #endif position when excluding stop and
pause/resume.
2020-06-05 23:59:28 +08:00
Alin Jerpelea d9d720b296 audio: nxstyle fixes for core and drivers
nxstyle fixes for the audio core and drivers

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-04-21 17:19:52 -06:00
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 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
Nathan Hartman 46aaec7ba0 Fix minor typos in docs and comments. 2019-09-29 12:52:20 -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
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 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 06cd5b2fcc mm, audio, crypto, graphics: Fix various spacing/alignment issues 2015-10-08 09:10:22 -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 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 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 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
Gregory Nutt 72133f5d95 Add ioctls so that PCM decoder can configure the driver bitrate, num channels, and sample width 2014-07-23 12:21:04 -06:00
Gregory Nutt 516b343666 Flesh out missing PCM decoder methods 2014-07-23 11:58:43 -06:00
Gregory Nutt cfa76b5278 Flesh out a few more PCM methods, still incomplete. Re-vision PCM structure definition 2014-07-22 19:23:05 -06:00
Gregory Nutt d7a9633dcd Rename pcm_decode.h to pcm.h since it will hold more than just decoding definitions. Fix some porting errors like idbg should auddbg, etc. Add wav file header and a few low-level wav utilities. 2014-07-22 15:54:56 -06:00
Gregory Nutt a4dcd690bb Add new framework for the PCM decoder. It is now a 'front end' for lower-level drivers like the WM8904 that performs the PCM decoding from end 2014-07-22 11:54:13 -06:00