diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2010-10-26 11:14:41 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-10-27 03:17:41 -0400 |
commit | 89e1e66d6be8a520cdcd26043cda2cc870a34015 (patch) | |
tree | c9056471d3edf7eea0c665f0aaea10fbdda4e228 /sound/usb/card.h | |
parent | 0d040df9984c8fcb6a777a8f6d5dc513eaefd2de (diff) |
ALSA: usb-audio: automatically detect feedback format
There are two USB Audio Class specifications (v1 and v2), but neither of
them clearly defines the feedback format for high-speed UAC v1 devices.
Add to this whatever the Creative and M-Audio firmware writers have been
smoking, and it becomes impossible to predict the exact feedback format
used by a particular device.
Therefore, automatically detect the feedback format by looking at the
magnitude of the first received feedback value.
Also, this allows us to get rid of some special cases for E-Mu devices.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r-- | sound/usb/card.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h index 1febf2f23754..ae4251d5abf7 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h | |||
@@ -62,12 +62,14 @@ struct snd_usb_substream { | |||
62 | unsigned int syncinterval; /* P for adaptive mode, 0 otherwise */ | 62 | unsigned int syncinterval; /* P for adaptive mode, 0 otherwise */ |
63 | unsigned int freqn; /* nominal sampling rate in fs/fps in Q16.16 format */ | 63 | unsigned int freqn; /* nominal sampling rate in fs/fps in Q16.16 format */ |
64 | unsigned int freqm; /* momentary sampling rate in fs/fps in Q16.16 format */ | 64 | unsigned int freqm; /* momentary sampling rate in fs/fps in Q16.16 format */ |
65 | int freqshift; /* how much to shift the feedback value to get Q16.16 */ | ||
65 | unsigned int freqmax; /* maximum sampling rate, used for buffer management */ | 66 | unsigned int freqmax; /* maximum sampling rate, used for buffer management */ |
66 | unsigned int phase; /* phase accumulator */ | 67 | unsigned int phase; /* phase accumulator */ |
67 | unsigned int maxpacksize; /* max packet size in bytes */ | 68 | unsigned int maxpacksize; /* max packet size in bytes */ |
68 | unsigned int maxframesize; /* max packet size in frames */ | 69 | unsigned int maxframesize; /* max packet size in frames */ |
69 | unsigned int curpacksize; /* current packet size in bytes (for capture) */ | 70 | unsigned int curpacksize; /* current packet size in bytes (for capture) */ |
70 | unsigned int curframesize; /* current packet size in frames (for capture) */ | 71 | unsigned int curframesize; /* current packet size in frames (for capture) */ |
72 | unsigned int syncmaxsize; /* sync endpoint packet size */ | ||
71 | unsigned int fill_max: 1; /* fill max packet size always */ | 73 | unsigned int fill_max: 1; /* fill max packet size always */ |
72 | unsigned int txfr_quirk:1; /* allow sub-frame alignment */ | 74 | unsigned int txfr_quirk:1; /* allow sub-frame alignment */ |
73 | unsigned int fmt_type; /* USB audio format type (1-3) */ | 75 | unsigned int fmt_type; /* USB audio format type (1-3) */ |