1 /* 2 * Driver for USB Audio Device Class devices. 3 * Copyright (c) 2009-13 S.Zharski <imker@gmx.li> 4 * Distributed under the terms of the MIT license. 5 * 6 */ 7 #ifndef _USB_AUDIO_DRIVER_H_ 8 #define _USB_AUDIO_DRIVER_H_ 9 10 11 #include <Drivers.h> 12 #include <USB3.h> 13 14 15 #define DRIVER_NAME "usb_audio" 16 #define MAX_DEVICES 8 17 18 const char* const kVersion = "ver.0.0.5"; 19 20 // initial buffer size in samples 21 const uint32 kSamplesBufferSize = 2048; 22 // [sub]buffers count 23 const uint32 kSamplesBufferCount = 2; 24 25 26 extern usb_module_info* gUSBModule; 27 28 extern "C" status_t usb_audio_device_added(usb_device device, void** cookie); 29 extern "C" status_t usb_audio_device_removed(void* cookie); 30 31 extern "C" status_t init_hardware(); 32 extern "C" void uninit_driver(); 33 34 extern "C" const char** publish_devices(); 35 extern "C" device_hooks *find_device(const char* name); 36 37 38 #endif // _USB_AUDIO_DRIVER_H_ 39 40