ALSA: usb-audio: Avoid unnecessary EP setups in prepare
[deliverable/linux.git] / sound / usb / card.h
index 2b9fffff23b62a5449d39f2a4b03cbaadb1529a6..afa4f9e9b27a2673b1fc955d680859cb7f964f02 100644 (file)
@@ -92,6 +92,8 @@ struct snd_usb_endpoint {
        unsigned char silence_value;
        unsigned int stride;
        int iface, alt_idx;
+       int skip_packets;               /* quirks for devices to ignore the first n packets
+                                          in a stream */
 
        spinlock_t lock;
        struct list_head list;
@@ -105,6 +107,8 @@ struct snd_usb_substream {
        int interface;  /* current interface */
        int endpoint;   /* assigned endpoint */
        struct audioformat *cur_audiofmt;       /* current audioformat pointer (for hw_params callback) */
+       snd_pcm_format_t pcm_format;    /* current audio format (for hw_params callback) */
+       unsigned int channels;          /* current number of channels (for hw_params callback) */
        unsigned int cur_rate;          /* current rate (for hw_params callback) */
        unsigned int period_bytes;      /* current period bytes (for hw_params callback) */
        unsigned int altset_idx;     /* USB data format: index of alternate setting */
@@ -115,14 +119,13 @@ struct snd_usb_substream {
 
        unsigned int hwptr_done;        /* processed byte position in the buffer */
        unsigned int transfer_done;             /* processed frames since last period update */
-       unsigned long active_mask;      /* bitmask of active urbs */
-       unsigned long unlink_mask;      /* bitmask of unlinked urbs */
 
        /* data and sync endpoints for this stream */
        unsigned int ep_num;            /* the endpoint number */
        struct snd_usb_endpoint *data_endpoint;
        struct snd_usb_endpoint *sync_endpoint;
        unsigned long flags;
+       bool need_setup_ep;             /* (re)configure EP at prepare? */
 
        u64 formats;                    /* format bitmasks (all or'ed) */
        unsigned int num_formats;               /* number of supported audio formats (list) */
This page took 0.0299 seconds and 5 git commands to generate.