nxplayer: Fix warnings by nxstyle

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2017-12-19 15:06:11 +09:00
parent 6134eedb71
commit 77ac05c383
3 changed files with 44 additions and 44 deletions

View File

@ -64,7 +64,7 @@ struct nxplayer_s
pthread_t playId; /* Thread ID of the playthread */
int crefs; /* Number of references to the player */
sem_t sem; /* Thread sync semaphore */
FILE* fileFd; /* File descriptor of open file */
FILE *fileFd; /* File descriptor of open file */
#ifdef CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE
char prefdevice[CONFIG_NAME_MAX]; /* Preferred audio device */
int prefformat; /* Formats supported by preferred device */
@ -74,7 +74,7 @@ struct nxplayer_s
char mediadir[CONFIG_NAME_MAX]; /* Root media directory where media is located */
#endif
#ifdef CONFIG_AUDIO_MULTI_SESSION
FAR void* session; /* Session assigment from device */
FAR void *session; /* Session assigment from device */
#endif
#ifndef CONFIG_AUDIO_EXCLUDE_VOLUME
uint16_t volume; /* Volume as a whole percentage (0-100) */
@ -88,7 +88,7 @@ struct nxplayer_s
#endif
};
typedef int (*nxplayer_func)(FAR struct nxplayer_s* pPlayer, char* pargs);
typedef int (*nxplayer_func)(FAR struct nxplayer_s *pPlayer, char *pargs);
/****************************************************************************
* Public Data

View File

@ -492,7 +492,7 @@ static int nxplayer_mediasearch(FAR struct nxplayer_s *pPlayer,
****************************************************************************/
static int nxplayer_readbuffer(FAR struct nxplayer_s *pPlayer,
FAR struct ap_buffer_s* apb)
FAR struct ap_buffer_s *apb)
{
/* Validate the file is still open. It will be closed automatically when
* we encounter the end of file (or, perhaps, a read error that we cannot
@ -574,7 +574,7 @@ static int nxplayer_readbuffer(FAR struct nxplayer_s *pPlayer,
****************************************************************************/
static int nxplayer_enqueuebuffer(FAR struct nxplayer_s *pPlayer,
FAR struct ap_buffer_s* apb)
FAR struct ap_buffer_s *apb)
{
struct audio_buf_desc_s bufdesc;
int ret;
@ -629,9 +629,9 @@ static void *nxplayer_playthread(pthread_addr_t pvarg)
bool failed = false;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
struct ap_buffer_info_s buf_info;
FAR struct ap_buffer_s** pBuffers;
FAR struct ap_buffer_s **pBuffers;
#else
FAR struct ap_buffer_s* pBuffers[CONFIG_AUDIO_NUM_BUFFERS];
FAR struct ap_buffer_s *pBuffers[CONFIG_AUDIO_NUM_BUFFERS];
#endif
#ifdef CONFIG_DEBUG_FEATURES
int outstanding = 0;
@ -1091,7 +1091,7 @@ int nxplayer_setvolume(FAR struct nxplayer_s *pPlayer, uint16_t volume)
/* Send a CONFIGURE ioctl to the device to set the volume */
#ifdef CONFIG_AUDIO_MULTI_SESSION
cap_desc.session= pPlayer->session;
cap_desc.session = pPlayer->session;
#endif
cap_desc.caps.ac_len = sizeof(struct audio_caps_s);
cap_desc.caps.ac_type = AUDIO_TYPE_FEATURE;
@ -1177,7 +1177,7 @@ int nxplayer_setbass(FAR struct nxplayer_s *pPlayer, uint8_t level)
/* Send a CONFIGURE ioctl to the device to set the volume */
#ifdef CONFIG_AUDIO_MULTI_SESSION
cap_desc.session= pPlayer->session;
cap_desc.session = pPlayer->session;
#endif
cap_desc.caps.ac_len = sizeof(struct audio_caps_s);
cap_desc.caps.ac_type = AUDIO_TYPE_FEATURE;
@ -1229,7 +1229,7 @@ int nxplayer_settreble(FAR struct nxplayer_s *pPlayer, uint8_t level)
/* Send a CONFIGURE ioctl to the device to set the volume */
#ifdef CONFIG_AUDIO_MULTI_SESSION
cap_desc.session= pPlayer->session;
cap_desc.session = pPlayer->session;
#endif
cap_desc.caps.ac_len = sizeof(struct audio_caps_s);
cap_desc.caps.ac_type = AUDIO_TYPE_FEATURE;
@ -1446,7 +1446,7 @@ int nxplayer_rewind(FAR struct nxplayer_s *pPlayer, uint8_t subsample)
/* Send a CONFIGURE ioctl to the device to set the forward rate */
#ifdef CONFIG_AUDIO_MULTI_SESSION
cap_desc.session= pPlayer->session;
cap_desc.session = pPlayer->session;
#endif
cap_desc.caps.ac_len = sizeof(struct audio_caps_s);
cap_desc.caps.ac_type = AUDIO_TYPE_PROCESSING;
@ -1587,7 +1587,7 @@ int nxplayer_setdevice(FAR struct nxplayer_s *pPlayer, FAR const char *pDevice)
int nxplayer_stop(FAR struct nxplayer_s *pPlayer)
{
struct audio_msg_s term_msg;
FAR void* value;
FAR void *value;
DEBUGASSERT(pPlayer != NULL);
@ -1931,10 +1931,10 @@ FAR struct nxplayer_s *nxplayer_create(void)
*
****************************************************************************/
void nxplayer_release(FAR struct nxplayer_s* pPlayer)
void nxplayer_release(FAR struct nxplayer_s *pPlayer)
{
int refcount;
FAR void* value;
FAR void *value;
/* Grab the semaphore */
@ -1996,7 +1996,7 @@ void nxplayer_release(FAR struct nxplayer_s* pPlayer)
*
****************************************************************************/
void nxplayer_reference(FAR struct nxplayer_s* pPlayer)
void nxplayer_reference(FAR struct nxplayer_s *pPlayer)
{
/* Grab the semaphore */
@ -2032,7 +2032,7 @@ void nxplayer_reference(FAR struct nxplayer_s* pPlayer)
*
****************************************************************************/
void nxplayer_detach(FAR struct nxplayer_s* pPlayer)
void nxplayer_detach(FAR struct nxplayer_s *pPlayer)
{
#if 0
/* Grab the semaphore */

View File

@ -79,44 +79,44 @@ struct mp_cmd_s {
* Private Function Prototypes
****************************************************************************/
static int nxplayer_cmd_quit(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_play(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_quit(FAR struct nxplayer_s *pPlayer, char *parg);
static int nxplayer_cmd_play(FAR struct nxplayer_s *pPlayer, char *parg);
#ifdef CONFIG_NXPLAYER_INCLUDE_SYSTEM_RESET
static int nxplayer_cmd_reset(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_reset(FAR struct nxplayer_s *pPlayer, char *parg);
#endif
#ifdef CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE
static int nxplayer_cmd_device(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_device(FAR struct nxplayer_s *pPlayer, char *parg);
#endif
#ifndef CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME
static int nxplayer_cmd_pause(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_resume(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_pause(FAR struct nxplayer_s *pPlayer, char *parg);
static int nxplayer_cmd_resume(FAR struct nxplayer_s *pPlayer, char *parg);
#endif
#ifdef CONFIG_NXPLAYER_INCLUDE_MEDIADIR
static int nxplayer_cmd_mediadir(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_mediadir(FAR struct nxplayer_s *pPlayer, char *parg);
#endif
#ifndef CONFIG_AUDIO_EXCLUDE_STOP
static int nxplayer_cmd_stop(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_stop(FAR struct nxplayer_s *pPlayer, char *parg);
#endif
#ifndef CONFIG_AUDIO_EXCLUDE_VOLUME
static int nxplayer_cmd_volume(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_volume(FAR struct nxplayer_s *pPlayer, char *parg);
#ifndef CONFIG_AUDIO_EXCLUDE_BALANCE
static int nxplayer_cmd_balance(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_balance(FAR struct nxplayer_s *pPlayer, char *parg);
#endif
#endif
#ifndef CONFIG_AUDIO_EXCLUDE_TONE
static int nxplayer_cmd_bass(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_treble(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_bass(FAR struct nxplayer_s *pPlayer, char *parg);
static int nxplayer_cmd_treble(FAR struct nxplayer_s *pPlayer, char *parg);
#endif
#ifdef CONFIG_NXPLAYER_INCLUDE_HELP
static int nxplayer_cmd_help(FAR struct nxplayer_s *pPlayer, char* parg);
static int nxplayer_cmd_help(FAR struct nxplayer_s *pPlayer, char *parg);
#endif
/****************************************************************************
@ -156,7 +156,7 @@ static struct mp_cmd_s g_nxplayer_cmds[] =
#ifndef CONFIG_AUDIO_EXCLUDE_STOP
{ "stop", "", nxplayer_cmd_stop, NXPLAYER_HELP_TEXT(Stop playback) },
#endif
{ "tone", "freq secs",NULL, NXPLAYER_HELP_TEXT(Produce a pure tone) },
{ "tone", "freq secs", NULL, NXPLAYER_HELP_TEXT(Produce a pure tone) },
#ifndef CONFIG_AUDIO_EXCLUDE_TONE
{ "treble", "d%", nxplayer_cmd_treble, NXPLAYER_HELP_TEXT(Set treble level percentage) },
#endif
@ -181,7 +181,7 @@ static const int g_nxplayer_cmd_count = sizeof(g_nxplayer_cmds) / sizeof(struct
*
****************************************************************************/
static int nxplayer_cmd_play(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_play(FAR struct nxplayer_s *pPlayer, char *parg)
{
int ret;
@ -235,7 +235,7 @@ static int nxplayer_cmd_play(FAR struct nxplayer_s *pPlayer, char* parg)
****************************************************************************/
#ifndef CONFIG_AUDIO_EXCLUDE_VOLUME
static int nxplayer_cmd_volume(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_volume(FAR struct nxplayer_s *pPlayer, char *parg)
{
uint16_t percent;
@ -265,7 +265,7 @@ static int nxplayer_cmd_volume(FAR struct nxplayer_s *pPlayer, char* parg)
****************************************************************************/
#ifndef CONFIG_AUDIO_EXCLUDE_TONE
static int nxplayer_cmd_bass(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_bass(FAR struct nxplayer_s *pPlayer, char *parg)
{
uint8_t level_percent;
@ -295,7 +295,7 @@ static int nxplayer_cmd_bass(FAR struct nxplayer_s *pPlayer, char* parg)
****************************************************************************/
#ifndef CONFIG_AUDIO_EXCLUDE_TONE
static int nxplayer_cmd_treble(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_treble(FAR struct nxplayer_s *pPlayer, char *parg)
{
uint8_t level_percent;
@ -326,7 +326,7 @@ static int nxplayer_cmd_treble(FAR struct nxplayer_s *pPlayer, char* parg)
#ifndef CONFIG_AUDIO_EXCLUDE_VOLUME
#ifndef CONFIG_AUDIO_EXCLUDE_BALANCE
static int nxplayer_cmd_balance(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_balance(FAR struct nxplayer_s *pPlayer, char *parg)
{
uint16_t percent;
@ -357,7 +357,7 @@ static int nxplayer_cmd_balance(FAR struct nxplayer_s *pPlayer, char* parg)
****************************************************************************/
#ifdef CONFIG_NXPLAYER_INCLUDE_SYSTEM_RESET
static int nxplayer_cmd_reset(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_reset(FAR struct nxplayer_s *pPlayer, char *parg)
{
nxplayer_systemreset(pPlayer);
@ -374,7 +374,7 @@ static int nxplayer_cmd_reset(FAR struct nxplayer_s *pPlayer, char* parg)
****************************************************************************/
#ifdef CONFIG_NXPLAYER_INCLUDE_MEDIADIR
static int nxplayer_cmd_mediadir(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_mediadir(FAR struct nxplayer_s *pPlayer, char *parg)
{
/* If no arg given, then print current media dir */
@ -396,7 +396,7 @@ static int nxplayer_cmd_mediadir(FAR struct nxplayer_s *pPlayer, char* parg)
****************************************************************************/
#ifndef CONFIG_AUDIO_EXCLUDE_STOP
static int nxplayer_cmd_stop(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_stop(FAR struct nxplayer_s *pPlayer, char *parg)
{
/* Stop the playback */
@ -415,7 +415,7 @@ static int nxplayer_cmd_stop(FAR struct nxplayer_s *pPlayer, char* parg)
****************************************************************************/
#ifndef CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME
static int nxplayer_cmd_pause(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_pause(FAR struct nxplayer_s *pPlayer, char *parg)
{
/* Pause the playback */
@ -434,7 +434,7 @@ static int nxplayer_cmd_pause(FAR struct nxplayer_s *pPlayer, char* parg)
****************************************************************************/
#ifndef CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME
static int nxplayer_cmd_resume(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_resume(FAR struct nxplayer_s *pPlayer, char *parg)
{
/* Resume the playback */
@ -452,7 +452,7 @@ static int nxplayer_cmd_resume(FAR struct nxplayer_s *pPlayer, char* parg)
****************************************************************************/
#ifdef CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE
static int nxplayer_cmd_device(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_device(FAR struct nxplayer_s *pPlayer, char *parg)
{
int ret;
char path[32];
@ -511,7 +511,7 @@ static int nxplayer_cmd_device(FAR struct nxplayer_s *pPlayer, char* parg)
* nxplayer_cmd_quit() terminates the application
****************************************************************************/
static int nxplayer_cmd_quit(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_quit(FAR struct nxplayer_s *pPlayer, char *parg)
{
/* Stop the playback if any */
@ -530,7 +530,7 @@ static int nxplayer_cmd_quit(FAR struct nxplayer_s *pPlayer, char* parg)
****************************************************************************/
#ifdef CONFIG_NXPLAYER_INCLUDE_HELP
static int nxplayer_cmd_help(FAR struct nxplayer_s *pPlayer, char* parg)
static int nxplayer_cmd_help(FAR struct nxplayer_s *pPlayer, char *parg)
{
int x, len, maxlen = 0;
int c;
@ -673,7 +673,7 @@ int nxplayer_main(int argc, char *argv[])
/* Release the NxPlayer context */
// nxplayer_detach(pPlayer);
/* nxplayer_detach(pPlayer); */
nxplayer_release(pPlayer);
return OK;