Lines Matching refs:dev_obj
62 rt_device_t dev_obj; in player_test() local
64 dev_obj = rt_device_find(SOUND_PLAYER_DEVICE_NAME); in player_test()
65 if (dev_obj == RT_NULL) in player_test()
67 uassert_not_null(dev_obj); in player_test()
70 if (dev_obj->type != RT_Device_Class_Sound) in player_test()
76 res = rt_device_open(dev_obj, RT_DEVICE_OFLAG_WRONLY); in player_test()
86 struct rt_audio_device *audio_dev = rt_container_of(dev_obj, struct rt_audio_device, parent); in player_test()
104 res = rt_device_write(dev_obj, 0, player_buffer, TX_DMA_BLOCK_SIZE); in player_test()
148 res = rt_device_write(dev_obj, TX_DMA_BLOCK_SIZE, player_buffer, TX_DMA_BLOCK_SIZE); in player_test()
190 if (dev_obj != RT_NULL) in player_test()
193 rt_device_close(dev_obj); in player_test()
199 rt_device_t dev_obj; in mic_test() local
212 dev_obj = rt_device_find(SOUND_MIC_DEVICE_NAME); in mic_test()
213 if (dev_obj == RT_NULL) in mic_test()
220 res = rt_device_open(dev_obj, RT_DEVICE_OFLAG_RDONLY); in mic_test()
228 length = rt_device_read(dev_obj, 0, mic_buffer,RX_DMA_BLOCK_SIZE); in mic_test()
255 length = rt_device_read(dev_obj, 0, mic_buffer, RX_DMA_FIFO_SIZE); in mic_test()
286 if (dev_obj != RT_NULL) in mic_test()
289 rt_device_close(dev_obj); in mic_test()