[components/drivers/audio] [修复] audio 中枚举类型不匹配的问题
Signed-off-by: MurphyZhao <d2014zjt@163.com>
This commit is contained in:
parent
3cf808921d
commit
7556ab89da
@ -167,7 +167,7 @@ static rt_err_t _audio_dev_open(struct rt_device *dev, rt_uint16_t oflag)
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
const char *name,
|
||||
enum rt_audio_pipe_flag flag,
|
||||
rt_int32_t flag,
|
||||
rt_uint8_t *buf,
|
||||
rt_size_t size)
|
||||
{
|
||||
@ -258,7 +258,7 @@ rt_err_t rt_audio_pipe_detach(struct rt_audio_pipe *pipe)
|
||||
}
|
||||
|
||||
#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;
|
||||
struct rt_audio_pipe *pipe = RT_NULL;
|
||||
|
@ -50,7 +50,7 @@ struct rt_audio_pipe
|
||||
/* ring buffer in pipe device */
|
||||
struct rt_ringbuffer ringbuffer;
|
||||
|
||||
enum rt_audio_pipe_flag flag;
|
||||
rt_int32_t flag;
|
||||
|
||||
/* suspended 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,
|
||||
const char *name,
|
||||
enum rt_audio_pipe_flag flag,
|
||||
rt_int32_t flag,
|
||||
rt_uint8_t *buf,
|
||||
rt_size_t size);
|
||||
rt_err_t rt_audio_pipe_detach(struct rt_audio_pipe *pipe);
|
||||
#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);
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user