305 _NOTE(DATA_READABLE_WITHOUT_LOCK(usb_ac_plumbed_t::acp_tqp))
306 _NOTE(DATA_READABLE_WITHOUT_LOCK(usb_ac_plumbed_t::acp_uacp))
307
308 _NOTE(DATA_READABLE_WITHOUT_LOCK(usb_audio_format_t::ch))
309
310 /* usb_ac driver only care about two states: plumbed or unplumbed */
311 #define USB_AC_STATE_UNPLUMBED 0
312 #define USB_AC_STATE_PLUMBED 1
313 #define USB_AC_STATE_PLUMBED_RESTORING 2
314
315 /* Default pipe states */
316 #define USB_AC_DEF_CLOSED 0
317 #define USB_AC_DEF_OPENED 1
318
319 #define USB_AC_BUFFER_SIZE 256 /* descriptor buffer size */
320
321
322 /*
323 * delay before restoring state
324 */
325 #define USB_AC_RESTORE_DELAY drv_usectohz(1000000)
326
327 /* value for acp_driver */
328 #define USB_AS_PLUMBED 1
329 #define USB_AH_PLUMBED 2
330 #define UNKNOWN_PLUMBED 3
331
332 /* other useful macros */
333 #define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
334
335
336
337
338
339
340 #define AF_REGISTERED 0x1
341 #define AD_SETUP 0x10
342
343
344 int usb_audio_attach(usb_ac_state_t *);
345 /*
|
305 _NOTE(DATA_READABLE_WITHOUT_LOCK(usb_ac_plumbed_t::acp_tqp))
306 _NOTE(DATA_READABLE_WITHOUT_LOCK(usb_ac_plumbed_t::acp_uacp))
307
308 _NOTE(DATA_READABLE_WITHOUT_LOCK(usb_audio_format_t::ch))
309
310 /* usb_ac driver only care about two states: plumbed or unplumbed */
311 #define USB_AC_STATE_UNPLUMBED 0
312 #define USB_AC_STATE_PLUMBED 1
313 #define USB_AC_STATE_PLUMBED_RESTORING 2
314
315 /* Default pipe states */
316 #define USB_AC_DEF_CLOSED 0
317 #define USB_AC_DEF_OPENED 1
318
319 #define USB_AC_BUFFER_SIZE 256 /* descriptor buffer size */
320
321
322 /*
323 * delay before restoring state
324 */
325 #define USB_AC_RESTORE_DELAY drv_sectohz(1)
326
327 /* value for acp_driver */
328 #define USB_AS_PLUMBED 1
329 #define USB_AH_PLUMBED 2
330 #define UNKNOWN_PLUMBED 3
331
332 /* other useful macros */
333 #define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
334
335
336
337
338
339
340 #define AF_REGISTERED 0x1
341 #define AD_SETUP 0x10
342
343
344 int usb_audio_attach(usb_ac_state_t *);
345 /*
|