diff options
Diffstat (limited to 'sound/firewire/fireface')
-rw-r--r-- | sound/firewire/fireface/ff-midi.c | 22 | ||||
-rw-r--r-- | sound/firewire/fireface/ff-pcm.c | 52 |
2 files changed, 35 insertions, 39 deletions
diff --git a/sound/firewire/fireface/ff-midi.c b/sound/firewire/fireface/ff-midi.c index 29ee0a7365c3..949ee56b4e0e 100644 --- a/sound/firewire/fireface/ff-midi.c +++ b/sound/firewire/fireface/ff-midi.c | |||
@@ -74,18 +74,6 @@ static void midi_playback_trigger(struct snd_rawmidi_substream *substream, | |||
74 | spin_unlock_irqrestore(&ff->lock, flags); | 74 | spin_unlock_irqrestore(&ff->lock, flags); |
75 | } | 75 | } |
76 | 76 | ||
77 | static struct snd_rawmidi_ops midi_capture_ops = { | ||
78 | .open = midi_capture_open, | ||
79 | .close = midi_capture_close, | ||
80 | .trigger = midi_capture_trigger, | ||
81 | }; | ||
82 | |||
83 | static struct snd_rawmidi_ops midi_playback_ops = { | ||
84 | .open = midi_playback_open, | ||
85 | .close = midi_playback_close, | ||
86 | .trigger = midi_playback_trigger, | ||
87 | }; | ||
88 | |||
89 | static void set_midi_substream_names(struct snd_rawmidi_str *stream, | 77 | static void set_midi_substream_names(struct snd_rawmidi_str *stream, |
90 | const char *const name) | 78 | const char *const name) |
91 | { | 79 | { |
@@ -99,6 +87,16 @@ static void set_midi_substream_names(struct snd_rawmidi_str *stream, | |||
99 | 87 | ||
100 | int snd_ff_create_midi_devices(struct snd_ff *ff) | 88 | int snd_ff_create_midi_devices(struct snd_ff *ff) |
101 | { | 89 | { |
90 | static const struct snd_rawmidi_ops midi_capture_ops = { | ||
91 | .open = midi_capture_open, | ||
92 | .close = midi_capture_close, | ||
93 | .trigger = midi_capture_trigger, | ||
94 | }; | ||
95 | static const struct snd_rawmidi_ops midi_playback_ops = { | ||
96 | .open = midi_playback_open, | ||
97 | .close = midi_playback_close, | ||
98 | .trigger = midi_playback_trigger, | ||
99 | }; | ||
102 | struct snd_rawmidi *rmidi; | 100 | struct snd_rawmidi *rmidi; |
103 | struct snd_rawmidi_str *stream; | 101 | struct snd_rawmidi_str *stream; |
104 | int err; | 102 | int err; |
diff --git a/sound/firewire/fireface/ff-pcm.c b/sound/firewire/fireface/ff-pcm.c index adb5c87f492f..ad974b5a2561 100644 --- a/sound/firewire/fireface/ff-pcm.c +++ b/sound/firewire/fireface/ff-pcm.c | |||
@@ -379,35 +379,33 @@ static int pcm_playback_ack(struct snd_pcm_substream *substream) | |||
379 | return amdtp_stream_pcm_ack(&ff->rx_stream); | 379 | return amdtp_stream_pcm_ack(&ff->rx_stream); |
380 | } | 380 | } |
381 | 381 | ||
382 | static struct snd_pcm_ops pcm_capture_ops = { | ||
383 | .open = pcm_open, | ||
384 | .close = pcm_close, | ||
385 | .ioctl = snd_pcm_lib_ioctl, | ||
386 | .hw_params = pcm_capture_hw_params, | ||
387 | .hw_free = pcm_capture_hw_free, | ||
388 | .prepare = pcm_capture_prepare, | ||
389 | .trigger = pcm_capture_trigger, | ||
390 | .pointer = pcm_capture_pointer, | ||
391 | .ack = pcm_capture_ack, | ||
392 | .page = snd_pcm_lib_get_vmalloc_page, | ||
393 | }; | ||
394 | |||
395 | static struct snd_pcm_ops pcm_playback_ops = { | ||
396 | .open = pcm_open, | ||
397 | .close = pcm_close, | ||
398 | .ioctl = snd_pcm_lib_ioctl, | ||
399 | .hw_params = pcm_playback_hw_params, | ||
400 | .hw_free = pcm_playback_hw_free, | ||
401 | .prepare = pcm_playback_prepare, | ||
402 | .trigger = pcm_playback_trigger, | ||
403 | .pointer = pcm_playback_pointer, | ||
404 | .ack = pcm_playback_ack, | ||
405 | .page = snd_pcm_lib_get_vmalloc_page, | ||
406 | .mmap = snd_pcm_lib_mmap_vmalloc, | ||
407 | }; | ||
408 | |||
409 | int snd_ff_create_pcm_devices(struct snd_ff *ff) | 382 | int snd_ff_create_pcm_devices(struct snd_ff *ff) |
410 | { | 383 | { |
384 | static const struct snd_pcm_ops pcm_capture_ops = { | ||
385 | .open = pcm_open, | ||
386 | .close = pcm_close, | ||
387 | .ioctl = snd_pcm_lib_ioctl, | ||
388 | .hw_params = pcm_capture_hw_params, | ||
389 | .hw_free = pcm_capture_hw_free, | ||
390 | .prepare = pcm_capture_prepare, | ||
391 | .trigger = pcm_capture_trigger, | ||
392 | .pointer = pcm_capture_pointer, | ||
393 | .ack = pcm_capture_ack, | ||
394 | .page = snd_pcm_lib_get_vmalloc_page, | ||
395 | }; | ||
396 | static const struct snd_pcm_ops pcm_playback_ops = { | ||
397 | .open = pcm_open, | ||
398 | .close = pcm_close, | ||
399 | .ioctl = snd_pcm_lib_ioctl, | ||
400 | .hw_params = pcm_playback_hw_params, | ||
401 | .hw_free = pcm_playback_hw_free, | ||
402 | .prepare = pcm_playback_prepare, | ||
403 | .trigger = pcm_playback_trigger, | ||
404 | .pointer = pcm_playback_pointer, | ||
405 | .ack = pcm_playback_ack, | ||
406 | .page = snd_pcm_lib_get_vmalloc_page, | ||
407 | .mmap = snd_pcm_lib_mmap_vmalloc, | ||
408 | }; | ||
411 | struct snd_pcm *pcm; | 409 | struct snd_pcm *pcm; |
412 | int err; | 410 | int err; |
413 | 411 | ||