31 Mar, 2016

1 commit


09 Oct, 2015

4 commits

  • Currently, when asynchronous transactions finish in error state and
    retries, work scheduling and work running also continues. This
    should be canceled at fatal error because it can cause endless loop.

    This commit enables to cancel transferring MIDI messages when transactions
    encounter fatal errors. This is achieved by setting error state.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • Typically, the target devices have internal buffer to adjust output of
    received MIDI messages for MIDI serial bus, while the capacity of the
    buffer is limited. IEEE 1394 transactions can transfer more MIDI messages
    than MIDI serial bus can. This can cause buffer over flow in device side.

    This commit adds throttle to limit MIDI data rate by counting intervals
    between two MIDI messages. Usual MIDI messages consists of two or three
    bytes. This requires 1.302 to 1.953 mili-seconds interval between these
    messages. This commit uses kernel monotonic time service to calculate the
    time of next transaction.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • Currently, when waiting for a response, callers can start another
    transaction by scheduling another work. This is not good for error
    processing of transaction, especially the first response is too late.

    This commit serialize request/response transactions, by adding one
    boolean member to represent idling state.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    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: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

21 Oct, 2013

1 commit

  • 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: Clemens Ladisch

    Clemens Ladisch
     

18 Apr, 2012

1 commit


15 Mar, 2011

1 commit

  • Add a driver for two playback-only FireWire devices based on the OXFW970
    chip.

    v2: better AMDTP API abstraction; fix fw_unit leak; small fixes
    v3: cache the iPCR value
    v4: FireWave constraints; fix fw_device reference counting;
    fix PCR caching; small changes and fixes
    v5: volume/mute support; fix crashing due to pcm stop races
    v6: fix build; one-channel volume for LaCie
    v7: use signed values to make volume (range checks) work; fix function
    block IDs for volume/mute; always use channel 0 for LaCie volume

    Signed-off-by: Clemens Ladisch
    Acked-by: Stefan Richter
    Tested-by: Jay Fenlason
    Signed-off-by: Takashi Iwai

    Clemens Ladisch