1. 09 10月, 2015 1 次提交
    • T
      ALSA: firewire-lib: add helper functions for asynchronous transactions to transfer MIDI messages · 585d7cba
      Takashi Sakamoto 提交于
      Some models receive MIDI messages via IEEE 1394 asynchronous transactions.
      In this case, MIDI messages are transferred in fixed-length payload. It's
      nice that firewire-lib module has common helper functions.
      
      This commit implements this idea. Each driver adds
      'struct snd_fw_async_midi_port' in its instance structure. In probing,
      it should call snd_fw_async_midi_port_init() to initialize the
      structure with some parameters such as target address, the length
      of payload in a transaction and a pointer for callback function
      to fill the payload buffer. At 'struct snd_rawmidi_ops.trigger()'
      callback, it should call 'snd_fw_async_midi_port_run()' to start
      transactions. Each driver should ensure that the lifetime of MIDI
      substream continues till calling 'snd_fw_async_midi_port_finish()'.
      
      The helper functions support retries to transferring MIDI messages when
      transmission errors occur. When transactions are successful, the helper
      functions call 'snd_rawmidi_transmit_ack()' internally to consume MIDI
      bytes in the buffer. Therefore, Each driver is expected to use
      'snd_rawmidi_transmit_peek()' to tell the number of bytes to transfer to
      return value of 'fill' callback.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      585d7cba
  2. 21 10月, 2013 1 次提交
    • C
      ALSA: firewire: extend snd_fw_transaction() · 1b70485f
      Clemens Ladisch 提交于
      Add a flag to snd_fw_transaction() to allow it to abort when a bus reset
      happens.  This removes most of the duplicated error handling loops that
      were required around calls to the low-level fw_run_transaction().
      
      Also add a flag to suppress error messages; errors are expected when we
      attempt to clean up after the device was unplugged.
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      1b70485f
  3. 18 4月, 2012 1 次提交
  4. 15 3月, 2011 1 次提交