OSDN Git Service

ALSA: usb-audio: Avoid nested autoresume calls
[uclinux-h8/linux.git] / sound / usb / usbaudio.h
index 91d0380..eb1ea71 100644 (file)
@@ -37,11 +37,12 @@ struct snd_usb_audio {
        struct usb_interface *pm_intf;
        u32 usb_id;
        struct mutex mutex;
-       struct rw_semaphore shutdown_rwsem;
-       unsigned int shutdown:1;
        unsigned int probing:1;
-       unsigned int in_pm:1;
        unsigned int autosuspended:1;   
+       atomic_t active;
+       atomic_t shutdown;
+       atomic_t usage_count;
+       wait_queue_head_t shutdown_wait;
        unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */
        
        int num_interfaces;
@@ -115,4 +116,7 @@ struct snd_usb_audio_quirk {
 #define combine_triple(s)  (combine_word(s) | ((unsigned int)(s)[2] << 16))
 #define combine_quad(s)    (combine_triple(s) | ((unsigned int)(s)[3] << 24))
 
+int snd_usb_lock_shutdown(struct snd_usb_audio *chip);
+void snd_usb_unlock_shutdown(struct snd_usb_audio *chip);
+
 #endif /* __USBAUDIO_H */