diff options
Diffstat (limited to 'sound/usb/usbaudio.h')
| -rw-r--r-- | sound/usb/usbaudio.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index db3eb21627e..91d0380431b 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -34,13 +34,21 @@ struct snd_usb_audio { int index; struct usb_device *dev; struct snd_card *card; + struct usb_interface *pm_intf; u32 usb_id; - int shutdown; + 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; unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */ + int num_interfaces; int num_suspended_intf; struct list_head pcm_list; /* list of pcm streams */ + struct list_head ep_list; /* list of audio-related endpoints */ int pcm_devs; struct list_head midi_list; /* list of midi interfaces */ @@ -48,12 +56,20 @@ struct snd_usb_audio { struct list_head mixer_list; /* list of mixer interfaces */ int setup; /* from the 'device_setup' module param */ - int nrpacks; /* from the 'nrpacks' module param */ - int async_unlink; /* from the 'async_unlink' module param */ + bool autoclock; /* from the 'autoclock' module param */ struct usb_host_interface *ctrl_intf; /* the audio control interface */ }; +#define usb_audio_err(chip, fmt, args...) \ + dev_err(&(chip)->dev->dev, fmt, ##args) +#define usb_audio_warn(chip, fmt, args...) \ + dev_warn(&(chip)->dev->dev, fmt, ##args) +#define usb_audio_info(chip, fmt, args...) \ + dev_info(&(chip)->dev->dev, fmt, ##args) +#define usb_audio_dbg(chip, fmt, args...) \ + dev_dbg(&(chip)->dev->dev, fmt, ##args) + /* * Information about devices with broken descriptors */ @@ -65,9 +81,11 @@ struct snd_usb_audio { enum quirk_type { QUIRK_IGNORE_INTERFACE, QUIRK_COMPOSITE, + QUIRK_AUTODETECT, QUIRK_MIDI_STANDARD_INTERFACE, QUIRK_MIDI_FIXED_ENDPOINT, QUIRK_MIDI_YAMAHA, + QUIRK_MIDI_ROLAND, QUIRK_MIDI_MIDIMAN, QUIRK_MIDI_NOVATION, QUIRK_MIDI_RAW_BYTES, @@ -75,10 +93,12 @@ enum quirk_type { QUIRK_MIDI_CME, QUIRK_MIDI_AKAI, QUIRK_MIDI_US122L, + QUIRK_MIDI_FTDI, QUIRK_AUDIO_STANDARD_INTERFACE, QUIRK_AUDIO_FIXED_ENDPOINT, QUIRK_AUDIO_EDIROL_UAXX, QUIRK_AUDIO_ALIGN_TRANSFER, + QUIRK_AUDIO_STANDARD_MIXER, QUIRK_TYPE_COUNT }; |
