diff options
Diffstat (limited to 'sound/usb/caiaq')
-rw-r--r-- | sound/usb/caiaq/Makefile | 4 | ||||
-rw-r--r-- | sound/usb/caiaq/audio.c (renamed from sound/usb/caiaq/caiaq-audio.c) | 24 | ||||
-rw-r--r-- | sound/usb/caiaq/audio.h (renamed from sound/usb/caiaq/caiaq-audio.h) | 0 | ||||
-rw-r--r-- | sound/usb/caiaq/control.c (renamed from sound/usb/caiaq/caiaq-control.c) | 10 | ||||
-rw-r--r-- | sound/usb/caiaq/control.h (renamed from sound/usb/caiaq/caiaq-control.h) | 0 | ||||
-rw-r--r-- | sound/usb/caiaq/device.c (renamed from sound/usb/caiaq/caiaq-device.c) | 25 | ||||
-rw-r--r-- | sound/usb/caiaq/device.h (renamed from sound/usb/caiaq/caiaq-device.h) | 0 | ||||
-rw-r--r-- | sound/usb/caiaq/input.c (renamed from sound/usb/caiaq/caiaq-input.c) | 11 | ||||
-rw-r--r-- | sound/usb/caiaq/input.h (renamed from sound/usb/caiaq/caiaq-input.h) | 0 | ||||
-rw-r--r-- | sound/usb/caiaq/midi.c (renamed from sound/usb/caiaq/caiaq-midi.c) | 13 | ||||
-rw-r--r-- | sound/usb/caiaq/midi.h (renamed from sound/usb/caiaq/caiaq-midi.h) | 0 |
11 files changed, 30 insertions, 57 deletions
diff --git a/sound/usb/caiaq/Makefile b/sound/usb/caiaq/Makefile index 23dadd5a11cd..388999653aaa 100644 --- a/sound/usb/caiaq/Makefile +++ b/sound/usb/caiaq/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | snd-usb-caiaq-y := caiaq-device.o caiaq-audio.o caiaq-midi.o caiaq-control.o | 1 | snd-usb-caiaq-y := device.o audio.o midi.o control.o |
2 | snd-usb-caiaq-$(CONFIG_SND_USB_CAIAQ_INPUT) += caiaq-input.o | 2 | snd-usb-caiaq-$(CONFIG_SND_USB_CAIAQ_INPUT) += input.o |
3 | 3 | ||
4 | obj-$(CONFIG_SND_USB_CAIAQ) += snd-usb-caiaq.o | 4 | obj-$(CONFIG_SND_USB_CAIAQ) += snd-usb-caiaq.o |
diff --git a/sound/usb/caiaq/caiaq-audio.c b/sound/usb/caiaq/audio.c index 08d51e0c9fea..b13ce767ac72 100644 --- a/sound/usb/caiaq/caiaq-audio.c +++ b/sound/usb/caiaq/audio.c | |||
@@ -16,20 +16,14 @@ | |||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/spinlock.h> | ||
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/module.h> | ||
21 | #include <linux/moduleparam.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/usb.h> | 21 | #include <linux/usb.h> |
24 | #include <linux/spinlock.h> | ||
25 | #include <sound/core.h> | 22 | #include <sound/core.h> |
26 | #include <sound/initval.h> | ||
27 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
28 | #include <sound/rawmidi.h> | ||
29 | #include <linux/input.h> | ||
30 | 24 | ||
31 | #include "caiaq-device.h" | 25 | #include "device.h" |
32 | #include "caiaq-audio.h" | 26 | #include "audio.h" |
33 | 27 | ||
34 | #define N_URBS 32 | 28 | #define N_URBS 32 |
35 | #define CLOCK_DRIFT_TOLERANCE 5 | 29 | #define CLOCK_DRIFT_TOLERANCE 5 |
@@ -201,11 +195,14 @@ static int snd_usb_caiaq_pcm_prepare(struct snd_pcm_substream *substream) | |||
201 | 195 | ||
202 | debug("%s(%p)\n", __func__, substream); | 196 | debug("%s(%p)\n", __func__, substream); |
203 | 197 | ||
204 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 198 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
199 | dev->period_out_count[index] = BYTES_PER_SAMPLE + 1; | ||
205 | dev->audio_out_buf_pos[index] = BYTES_PER_SAMPLE + 1; | 200 | dev->audio_out_buf_pos[index] = BYTES_PER_SAMPLE + 1; |
206 | else | 201 | } else { |
202 | dev->period_in_count[index] = BYTES_PER_SAMPLE; | ||
207 | dev->audio_in_buf_pos[index] = BYTES_PER_SAMPLE; | 203 | dev->audio_in_buf_pos[index] = BYTES_PER_SAMPLE; |
208 | 204 | } | |
205 | |||
209 | if (dev->streaming) | 206 | if (dev->streaming) |
210 | return 0; | 207 | return 0; |
211 | 208 | ||
@@ -306,8 +303,7 @@ static void check_for_elapsed_periods(struct snd_usb_caiaqdev *dev, | |||
306 | if (!sub) | 303 | if (!sub) |
307 | continue; | 304 | continue; |
308 | 305 | ||
309 | pb = frames_to_bytes(sub->runtime, | 306 | pb = snd_pcm_lib_period_bytes(sub); |
310 | sub->runtime->period_size); | ||
311 | cnt = (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) ? | 307 | cnt = (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) ? |
312 | &dev->period_out_count[stream] : | 308 | &dev->period_out_count[stream] : |
313 | &dev->period_in_count[stream]; | 309 | &dev->period_in_count[stream]; |
diff --git a/sound/usb/caiaq/caiaq-audio.h b/sound/usb/caiaq/audio.h index 8ab1f8d9529e..8ab1f8d9529e 100644 --- a/sound/usb/caiaq/caiaq-audio.h +++ b/sound/usb/caiaq/audio.h | |||
diff --git a/sound/usb/caiaq/caiaq-control.c b/sound/usb/caiaq/control.c index e92c2bbf4fe9..537102ba6b9d 100644 --- a/sound/usb/caiaq/caiaq-control.c +++ b/sound/usb/caiaq/control.c | |||
@@ -18,17 +18,13 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/usb.h> | 21 | #include <linux/usb.h> |
22 | #include <sound/control.h> | ||
23 | #include <sound/core.h> | 23 | #include <sound/core.h> |
24 | #include <sound/initval.h> | ||
25 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
26 | #include <sound/rawmidi.h> | ||
27 | #include <sound/control.h> | ||
28 | #include <linux/input.h> | ||
29 | 25 | ||
30 | #include "caiaq-device.h" | 26 | #include "device.h" |
31 | #include "caiaq-control.h" | 27 | #include "control.h" |
32 | 28 | ||
33 | #define CNT_INTVAL 0x10000 | 29 | #define CNT_INTVAL 0x10000 |
34 | 30 | ||
diff --git a/sound/usb/caiaq/caiaq-control.h b/sound/usb/caiaq/control.h index 2e7ab1aa4fb3..2e7ab1aa4fb3 100644 --- a/sound/usb/caiaq/caiaq-control.h +++ b/sound/usb/caiaq/control.h | |||
diff --git a/sound/usb/caiaq/caiaq-device.c b/sound/usb/caiaq/device.c index cf573a982fdc..515de1cd2a3e 100644 --- a/sound/usb/caiaq/caiaq-device.c +++ b/sound/usb/caiaq/device.c | |||
@@ -19,30 +19,23 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/module.h> | ||
24 | #include <linux/moduleparam.h> | 22 | #include <linux/moduleparam.h> |
25 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/module.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <linux/usb.h> | 26 | #include <linux/usb.h> |
27 | #include <linux/input.h> | ||
28 | #include <linux/spinlock.h> | ||
29 | #include <sound/core.h> | ||
30 | #include <sound/initval.h> | 27 | #include <sound/initval.h> |
28 | #include <sound/core.h> | ||
31 | #include <sound/pcm.h> | 29 | #include <sound/pcm.h> |
32 | #include <sound/rawmidi.h> | ||
33 | #include <sound/control.h> | ||
34 | |||
35 | #include "caiaq-device.h" | ||
36 | #include "caiaq-audio.h" | ||
37 | #include "caiaq-midi.h" | ||
38 | #include "caiaq-control.h" | ||
39 | 30 | ||
40 | #ifdef CONFIG_SND_USB_CAIAQ_INPUT | 31 | #include "device.h" |
41 | #include "caiaq-input.h" | 32 | #include "audio.h" |
42 | #endif | 33 | #include "midi.h" |
34 | #include "control.h" | ||
35 | #include "input.h" | ||
43 | 36 | ||
44 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); | 37 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); |
45 | MODULE_DESCRIPTION("caiaq USB audio, version 1.3.13"); | 38 | MODULE_DESCRIPTION("caiaq USB audio, version 1.3.14"); |
46 | MODULE_LICENSE("GPL"); | 39 | MODULE_LICENSE("GPL"); |
47 | MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2}," | 40 | MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2}," |
48 | "{Native Instruments, RigKontrol3}," | 41 | "{Native Instruments, RigKontrol3}," |
diff --git a/sound/usb/caiaq/caiaq-device.h b/sound/usb/caiaq/device.h index 4cce1ad7493d..4cce1ad7493d 100644 --- a/sound/usb/caiaq/caiaq-device.h +++ b/sound/usb/caiaq/device.h | |||
diff --git a/sound/usb/caiaq/caiaq-input.c b/sound/usb/caiaq/input.c index f743847a5e5a..a48d309bd94c 100644 --- a/sound/usb/caiaq/caiaq-input.c +++ b/sound/usb/caiaq/input.c | |||
@@ -17,17 +17,12 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/module.h> | ||
21 | #include <linux/moduleparam.h> | ||
22 | #include <linux/input.h> | ||
23 | #include <linux/usb.h> | 20 | #include <linux/usb.h> |
24 | #include <linux/usb/input.h> | 21 | #include <linux/usb/input.h> |
25 | #include <linux/spinlock.h> | ||
26 | #include <sound/core.h> | ||
27 | #include <sound/rawmidi.h> | ||
28 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
29 | #include "caiaq-device.h" | 23 | |
30 | #include "caiaq-input.h" | 24 | #include "device.h" |
25 | #include "input.h" | ||
31 | 26 | ||
32 | static unsigned short keycode_ak1[] = { KEY_C, KEY_B, KEY_A }; | 27 | static unsigned short keycode_ak1[] = { KEY_C, KEY_B, KEY_A }; |
33 | static unsigned short keycode_rk2[] = { KEY_1, KEY_2, KEY_3, KEY_4, | 28 | static unsigned short keycode_rk2[] = { KEY_1, KEY_2, KEY_3, KEY_4, |
diff --git a/sound/usb/caiaq/caiaq-input.h b/sound/usb/caiaq/input.h index ced535577864..ced535577864 100644 --- a/sound/usb/caiaq/caiaq-input.h +++ b/sound/usb/caiaq/input.h | |||
diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/midi.c index f19fd360c936..8fa8cd88d763 100644 --- a/sound/usb/caiaq/caiaq-midi.c +++ b/sound/usb/caiaq/midi.c | |||
@@ -16,20 +16,13 @@ | |||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/module.h> | ||
21 | #include <linux/moduleparam.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/usb.h> | 19 | #include <linux/usb.h> |
24 | #include <linux/input.h> | ||
25 | #include <linux/spinlock.h> | ||
26 | #include <sound/core.h> | ||
27 | #include <sound/rawmidi.h> | 20 | #include <sound/rawmidi.h> |
21 | #include <sound/core.h> | ||
28 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
29 | 23 | ||
30 | #include "caiaq-device.h" | 24 | #include "device.h" |
31 | #include "caiaq-midi.h" | 25 | #include "midi.h" |
32 | |||
33 | 26 | ||
34 | static int snd_usb_caiaq_midi_input_open(struct snd_rawmidi_substream *substream) | 27 | static int snd_usb_caiaq_midi_input_open(struct snd_rawmidi_substream *substream) |
35 | { | 28 | { |
diff --git a/sound/usb/caiaq/caiaq-midi.h b/sound/usb/caiaq/midi.h index 9d16db027fc3..9d16db027fc3 100644 --- a/sound/usb/caiaq/caiaq-midi.h +++ b/sound/usb/caiaq/midi.h | |||