diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-12 14:16:27 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-12 14:16:27 -0400 |
| commit | e349792a385ed47390d156155b1a1e19af1bf163 (patch) | |
| tree | f9dc4e3e42769950230eaa58ecdd056eb27b23e8 /sound/usb/caiaq/midi.c | |
| parent | 6d21491838a2a9f22843c7530b118596ee9f4d77 (diff) | |
| parent | e3f86d3d3ce350144562d9bd035dc8a274fce58e (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (290 commits)
ALSA: pcm - Update document about xrun_debug proc file
ALSA: lx6464es - support standard alsa module parameters
ALSA: snd_usb_caiaq: set mixername
ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)
ALSA: use card device as parent for jack input-devices
ALSA: sound/ps3: Correct existing and add missing annotations
ALSA: sound/ps3: Restructure driver source
ALSA: sound/ps3: Fix checkpatch issues
ASoC: Fix lm4857 control
ALSA: ctxfi - Clear PCM resources at hw_params and hw_free
ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks
ALSA: ctxfi - Add missing start check in atc_pcm_playback_start()
ALSA: ctxfi - Add use_system_timer module option
ALSA: usb - Add boot quirk for C-Media 6206 USB Audio
ALSA: ctxfi - Fix wrong model id for UAA
ALSA: ctxfi - Clean up probe routines
ALSA: hda - Fix the previous tagra-8ch patch
ALSA: hda - Add 7.1 support for MSI GX620
ALSA: pcm - A helper function to compose PCM stream name for debug prints
ALSA: emu10k1 - Fix minimum periods for efx playback
...
Diffstat (limited to 'sound/usb/caiaq/midi.c')
| -rw-r--r-- | sound/usb/caiaq/midi.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sound/usb/caiaq/midi.c b/sound/usb/caiaq/midi.c index 8fa8cd88d763..538e8c00d31a 100644 --- a/sound/usb/caiaq/midi.c +++ b/sound/usb/caiaq/midi.c | |||
| @@ -40,7 +40,7 @@ static void snd_usb_caiaq_midi_input_trigger(struct snd_rawmidi_substream *subst | |||
| 40 | 40 | ||
| 41 | if (!dev) | 41 | if (!dev) |
| 42 | return; | 42 | return; |
| 43 | 43 | ||
| 44 | dev->midi_receive_substream = up ? substream : NULL; | 44 | dev->midi_receive_substream = up ? substream : NULL; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| @@ -64,18 +64,18 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev, | |||
| 64 | struct snd_rawmidi_substream *substream) | 64 | struct snd_rawmidi_substream *substream) |
| 65 | { | 65 | { |
| 66 | int len, ret; | 66 | int len, ret; |
| 67 | 67 | ||
| 68 | dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE; | 68 | dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE; |
| 69 | dev->midi_out_buf[1] = 0; /* port */ | 69 | dev->midi_out_buf[1] = 0; /* port */ |
| 70 | len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3, | 70 | len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3, |
| 71 | EP1_BUFSIZE - 3); | 71 | EP1_BUFSIZE - 3); |
| 72 | 72 | ||
| 73 | if (len <= 0) | 73 | if (len <= 0) |
| 74 | return; | 74 | return; |
| 75 | 75 | ||
| 76 | dev->midi_out_buf[2] = len; | 76 | dev->midi_out_buf[2] = len; |
| 77 | dev->midi_out_urb.transfer_buffer_length = len+3; | 77 | dev->midi_out_urb.transfer_buffer_length = len+3; |
| 78 | 78 | ||
| 79 | ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC); | 79 | ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC); |
| 80 | if (ret < 0) | 80 | if (ret < 0) |
| 81 | log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed," | 81 | log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed," |
| @@ -88,7 +88,7 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev, | |||
| 88 | static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) | 88 | static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) |
| 89 | { | 89 | { |
| 90 | struct snd_usb_caiaqdev *dev = substream->rmidi->private_data; | 90 | struct snd_usb_caiaqdev *dev = substream->rmidi->private_data; |
| 91 | 91 | ||
| 92 | if (up) { | 92 | if (up) { |
| 93 | dev->midi_out_substream = substream; | 93 | dev->midi_out_substream = substream; |
| 94 | if (!dev->midi_out_active) | 94 | if (!dev->midi_out_active) |
| @@ -113,12 +113,12 @@ static struct snd_rawmidi_ops snd_usb_caiaq_midi_input = | |||
| 113 | .trigger = snd_usb_caiaq_midi_input_trigger, | 113 | .trigger = snd_usb_caiaq_midi_input_trigger, |
| 114 | }; | 114 | }; |
| 115 | 115 | ||
| 116 | void snd_usb_caiaq_midi_handle_input(struct snd_usb_caiaqdev *dev, | 116 | void snd_usb_caiaq_midi_handle_input(struct snd_usb_caiaqdev *dev, |
| 117 | int port, const char *buf, int len) | 117 | int port, const char *buf, int len) |
| 118 | { | 118 | { |
| 119 | if (!dev->midi_receive_substream) | 119 | if (!dev->midi_receive_substream) |
| 120 | return; | 120 | return; |
| 121 | 121 | ||
| 122 | snd_rawmidi_receive(dev->midi_receive_substream, buf, len); | 122 | snd_rawmidi_receive(dev->midi_receive_substream, buf, len); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| @@ -142,16 +142,16 @@ int snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev *device) | |||
| 142 | 142 | ||
| 143 | if (device->spec.num_midi_out > 0) { | 143 | if (device->spec.num_midi_out > 0) { |
| 144 | rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT; | 144 | rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT; |
| 145 | snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, | 145 | snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, |
| 146 | &snd_usb_caiaq_midi_output); | 146 | &snd_usb_caiaq_midi_output); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | if (device->spec.num_midi_in > 0) { | 149 | if (device->spec.num_midi_in > 0) { |
| 150 | rmidi->info_flags |= SNDRV_RAWMIDI_INFO_INPUT; | 150 | rmidi->info_flags |= SNDRV_RAWMIDI_INFO_INPUT; |
| 151 | snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, | 151 | snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, |
| 152 | &snd_usb_caiaq_midi_input); | 152 | &snd_usb_caiaq_midi_input); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | device->rmidi = rmidi; | 155 | device->rmidi = rmidi; |
| 156 | 156 | ||
| 157 | return 0; | 157 | return 0; |
| @@ -160,7 +160,7 @@ int snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev *device) | |||
| 160 | void snd_usb_caiaq_midi_output_done(struct urb* urb) | 160 | void snd_usb_caiaq_midi_output_done(struct urb* urb) |
| 161 | { | 161 | { |
| 162 | struct snd_usb_caiaqdev *dev = urb->context; | 162 | struct snd_usb_caiaqdev *dev = urb->context; |
| 163 | 163 | ||
| 164 | dev->midi_out_active = 0; | 164 | dev->midi_out_active = 0; |
| 165 | if (urb->status != 0) | 165 | if (urb->status != 0) |
| 166 | return; | 166 | return; |
