[components/drivers/audio] [修复] audio 中枚举类型不匹配的问题

Signed-off-by: MurphyZhao <d2014zjt@163.com>
This commit is contained in:
MurphyZhao 2018-11-24 17:37:07 +08:00
parent 3cf808921d
commit 7556ab89da
3 changed files with 6 additions and 6 deletions

View File

@ -167,7 +167,7 @@ static rt_err_t _audio_dev_open(struct rt_device *dev, rt_uint16_t oflag)
return -RT_ENOMEM; return -RT_ENOMEM;
} }
rt_audio_pipe_init(&audio_pipe, "recpipe", RT_PIPE_FLAG_FORCE_WR | RT_PIPE_FLAG_BLOCK_RD, buf, rt_audio_pipe_init(&audio_pipe, "recpipe", (rt_int32_t)(RT_PIPE_FLAG_FORCE_WR | RT_PIPE_FLAG_BLOCK_RD), buf,
CFG_AUDIO_RECORD_PIPE_SIZE); CFG_AUDIO_RECORD_PIPE_SIZE);
} }

View File

@ -213,7 +213,7 @@ const static struct rt_device_ops audio_pipe_ops =
*/ */
rt_err_t rt_audio_pipe_init(struct rt_audio_pipe *pipe, rt_err_t rt_audio_pipe_init(struct rt_audio_pipe *pipe,
const char *name, const char *name,
enum rt_audio_pipe_flag flag, rt_int32_t flag,
rt_uint8_t *buf, rt_uint8_t *buf,
rt_size_t size) rt_size_t size)
{ {
@ -258,7 +258,7 @@ rt_err_t rt_audio_pipe_detach(struct rt_audio_pipe *pipe)
} }
#ifdef RT_USING_HEAP #ifdef RT_USING_HEAP
rt_err_t rt_audio_pipe_create(const char *name, enum rt_audio_pipe_flag flag, rt_size_t size) rt_err_t rt_audio_pipe_create(const char *name, rt_int32_t flag, rt_size_t size)
{ {
rt_uint8_t *rb_memptr = RT_NULL; rt_uint8_t *rb_memptr = RT_NULL;
struct rt_audio_pipe *pipe = RT_NULL; struct rt_audio_pipe *pipe = RT_NULL;

View File

@ -50,7 +50,7 @@ struct rt_audio_pipe
/* ring buffer in pipe device */ /* ring buffer in pipe device */
struct rt_ringbuffer ringbuffer; struct rt_ringbuffer ringbuffer;
enum rt_audio_pipe_flag flag; rt_int32_t flag;
/* suspended list */ /* suspended list */
rt_list_t suspended_read_list; rt_list_t suspended_read_list;
@ -64,12 +64,12 @@ struct rt_audio_pipe
rt_err_t rt_audio_pipe_init(struct rt_audio_pipe *pipe, rt_err_t rt_audio_pipe_init(struct rt_audio_pipe *pipe,
const char *name, const char *name,
enum rt_audio_pipe_flag flag, rt_int32_t flag,
rt_uint8_t *buf, rt_uint8_t *buf,
rt_size_t size); rt_size_t size);
rt_err_t rt_audio_pipe_detach(struct rt_audio_pipe *pipe); rt_err_t rt_audio_pipe_detach(struct rt_audio_pipe *pipe);
#ifdef RT_USING_HEAP #ifdef RT_USING_HEAP
rt_err_t rt_audio_pipe_create(const char *name, enum rt_audio_pipe_flag flag, rt_size_t size); rt_err_t rt_audio_pipe_create(const char *name, rt_int32_t flag, rt_size_t size);
void rt_audio_pipe_destroy(struct rt_audio_pipe *pipe); void rt_audio_pipe_destroy(struct rt_audio_pipe *pipe);
#endif #endif
#endif #endif