aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbaudio.h
diff options
context:
space:
mode:
authorSergiy Kovalchuk <cnb_zerg@yahoo.com>2009-12-27 12:13:41 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-28 06:29:39 -0500
commit7d2b451e65d255427c108e990507964ac39c13ee (patch)
tree86e977405ae88b08fa74dff3202c9f88207dfacb /sound/usb/usbaudio.h
parent44eba3e82b35ae796826a65d8040001582adc10a (diff)
ALSA: usb-audio - Added functionality for E-mu 0404USB/0202USB/TrackerPre
Added functionality: 1) Extension Units support (all XU settings now available at alsamixer, kmix, etc): - "AnalogueIn soft limiter" switch; - "Sample rate" selector (values 0,1,2,3,4,5 corresponds to 44.1 48 ... 192 kHz); - "DigitalIn CLK source" selector (internal/external) (**); - "DigitalOut format SPDIF/AC3" switch (**); (**)E-mu-0404usb only. 2) Automatic device sample rate adjustment depending on substream samplerate for both capture and playback substream. [minor coding-style fixes by tiwai] Signed-off-by: Sergiy Kovalchuk <cnb_zerg@yahoo.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usbaudio.h')
-rw-r--r--sound/usb/usbaudio.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 9826337c76b8..152216738cce 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -208,6 +208,16 @@ struct snd_usb_midi_endpoint_info {
208/* 208/*
209 */ 209 */
210 210
211/*E-mu USB samplerate control quirk*/
212enum {
213 EMU_QUIRK_SR_44100HZ = 0,
214 EMU_QUIRK_SR_48000HZ,
215 EMU_QUIRK_SR_88200HZ,
216 EMU_QUIRK_SR_96000HZ,
217 EMU_QUIRK_SR_176400HZ,
218 EMU_QUIRK_SR_192000HZ
219};
220
211#define combine_word(s) ((*(s)) | ((unsigned int)(s)[1] << 8)) 221#define combine_word(s) ((*(s)) | ((unsigned int)(s)[1] << 8))
212#define combine_triple(s) (combine_word(s) | ((unsigned int)(s)[2] << 16)) 222#define combine_triple(s) (combine_word(s) | ((unsigned int)(s)[2] << 16))
213#define combine_quad(s) (combine_triple(s) | ((unsigned int)(s)[3] << 24)) 223#define combine_quad(s) (combine_triple(s) | ((unsigned int)(s)[3] << 24))
@@ -233,6 +243,9 @@ void snd_usbmidi_input_stop(struct list_head* p);
233void snd_usbmidi_input_start(struct list_head* p); 243void snd_usbmidi_input_start(struct list_head* p);
234void snd_usbmidi_disconnect(struct list_head *p); 244void snd_usbmidi_disconnect(struct list_head *p);
235 245
246void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
247 unsigned char samplerate_id);
248
236/* 249/*
237 * retrieve usb_interface descriptor from the host interface 250 * retrieve usb_interface descriptor from the host interface
238 * (conditional for compatibility with the older API) 251 * (conditional for compatibility with the older API)