Commit Graph

22 Commits

Author SHA1 Message Date
Xiang Xiao
893387b2c5 Fix the minor style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 19:07:16 +02:00
Xiang Xiao
9291d07a87 Fix the coding style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-06 12:20:32 +02:00
Xiang Xiao
d364d7a810 system: Fix nx[looper|player|recorder] warning
nxlooper.c:879:7: warning: 'strncpy' specified bound 96 equals destination size [-Wstringop-truncation]
  879 |       strncpy(plooper->recorddev, pdevice, sizeof(plooper->playdev));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nxlooper.c:875:7: warning: 'strncpy' specified bound 96 equals destination size [-Wstringop-truncation]
  875 |       strncpy(plooper->playdev, pdevice, sizeof(plooper->playdev));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nxlooper.c: In function 'nxlooper_loopraw':
nxlooper.c:165:52: warning: '%s' directive output may be truncated writing up to 96 bytes into a region of size 53 [-Wformat-truncation=]
  165 |           snprintf(path, sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |                                                    ^~
nxlooper.c:165:11: note: 'snprintf' output between 12 and 108 bytes into a destination of size 64
  165 |           snprintf(path, sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nxplayer.c: In function 'nxplayer_playinternal':
nxplayer.c:359:53: warning: '%s' directive output may be truncated writing up to 96 bytes into a region of size 53 [-Wformat-truncation=]
  359 |           snprintf(path,  sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |                                                     ^~
nxplayer.c:359:11: note: 'snprintf' output between 12 and 108 bytes into a destination of size 64
  359 |           snprintf(path,  sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nxrecorder.c: In function 'nxrecorder_setdevice':
nxrecorder.c:695:3: warning: 'strncpy' specified bound 96 equals destination size [-Wstringop-truncation]
  695 |   strncpy(precorder->device, pdevice, sizeof(precorder->device));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nxplayer.c: In function 'nxplayer_setdevice':
nxplayer.c:1686:3: warning: 'strncpy' specified bound 96 equals destination size [-Wstringop-truncation]
 1686 |   strncpy(pplayer->prefdevice, pdevice, sizeof(pplayer->prefdevice));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC:  nxrecorder_main.c
nxplayer.c: In function 'nxplayer_setmediadir':
nxplayer.c:2090:3: warning: 'strncpy' specified bound 96 equals destination size [-Wstringop-truncation]
 2090 |   strncpy(pplayer->mediadir, mediadir, sizeof(pplayer->mediadir));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-23 11:05:18 +02:00
Xiang Xiao
213e60232f Include assert.h in necessary place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-31 08:51:22 +02:00
ligd
0e4c29be03 system/nx: update mqueue_open return value
Change-Id: Ic8d7763fa2da01312cb0e02b4aaf73893cad471a
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-03 21:15:00 -06:00
danguanghua
f210010466 system: enable O_CLOEXEC when openning audio device
N/A

to avoid multiple open operations of audio_open

Change-Id: Id283def4811c71f3c0bd38dc1a480afce303c4c3
Signed-off-by: danguanghua <danguanghua@xiaomi.com>
2020-12-19 07:56:18 -06:00
Xiang Xiao
16c6e1f0b8 system: nxplayer and nxrecorder shouldn't hardcode message length to 16
the audio driver may config a very large buffer count,
so let's adjust the message queue length dynamically.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-14 16:30:11 +01:00
danguanghua
3d42c6460f fix build bread if CONFIG_AUDIO_MULTI_SESSION enabled
N/A

Change-Id: I785f44a4381965df700000cbd33faeb2d2e24f6e
Signed-off-by: danguanghua <danguanghua@xiaomi.com>
2020-12-11 08:06:31 -06:00
YAMAMOTO Takashi
ec0f0b7fbc system/nxrecorder/nxrecorder.c: Fix a syslog format 2020-11-27 02:43:30 -06:00
YAMAMOTO Takashi
ce3ca22152 system/nxrecorder/nxrecorder.c: Don't assume debug macro expansion 2020-11-27 02:43:30 -06:00
licheng
a375f64f81 nxplayer&nxrecoder: add channel map support
Change-Id: I5e5534e7330d816533a6894cf3cd8c4e19984c6f
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-27 00:35:49 -07:00
Xiang Xiao
837b405624 Change all files come from Xiaomi/Pinecone to Apache License 2.0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-23 15:44:32 -06:00
Masayuki Ishikawa
fed7a53ef5 system: nxrecorder: Refactor nxrecorder.c
NOTE: Remove redundant code regarding audio buffer configuration

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-17 13:04:23 +08:00
Masayuki Ishikawa
2282310483 system: nxrecorder: Add O_TRUNC when creating a file
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-16 17:00:24 +08:00
Masayuki Ishikawa
1d4dc43e73 system: nxrecorder: Fix compile warnings in nxrecorder.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-10 18:15:08 -07:00
Alin Jerpelea
2749e6467b system: nxplayer & nxrecorder: nxstyle fixes
nxstyle fixes for nxplayer & nxrecorder apps

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-04-21 16:41:51 -06:00
Xiang Xiao
d660492289 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:41:36 -06:00
Xiang Xiao
1154735ca6 Refine the preprocess conditional guard style 2020-01-31 11:04:10 -06:00
Xiang Xiao
857158451b 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

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 23:21:01 +08:00
Gregory Nutt
8f16bb8ebc system/nxplayer and nxrecorder: Fix some coding standard violatins that are just to in-yer-face to ignore: No CamelCase variable names. This was not an extensive check for use of CamelCase. Just some I stumbled across. 2019-02-15 19:25:01 -06:00
Michał Łyszczek
53d8cd78c0 nuttx/sched/mqueue: Change 'int prio' to 'unsigned int prio'. According to open group specification, priority field in mq_* functions should have unsigned type: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/mqueue.h.html 2019-02-15 19:22:48 -06:00
ZhongAn
392943a0a0 apps/system/nxrecorder: Add nxrecorder application 2018-08-27 08:20:11 -06:00