[PATCH 00/14] ALSA: firewire-motu: code refactoring to obsolete protocol structure

Takashi Sakamoto o-takashi at sakamocchi.jp
Tue May 19 13:16:27 CEST 2020


Hi,

ALSA firewire-motu driver becomes to support more models since its first
commit 2017. As a result, the original structure for generation-dependent
protocol is not suitable for differences between models in some cases.

This patchset is for refactoring the driver to obsolete the protocol
structure. Some helper functions are added with condition statement for
protocol version so that the function calls protocol-dependent function.
Instead of the protocol structure, specification structure is used to
represent model information and to choose model-dependent operation so
that it's easy to handle model-dependent quirks.

Additionally, this patchset changes the way to calculate the number of
chunks in data block. Current implementation calculates by the fixed
number of analog input/output ports and flags in the specification
structure. Although the flags can represent any physical input/output
of the model, it's difficult to debug for supported model and to add
support new models, especially for model-dependent quirks. This
patchset adds each table for the fixed number of chunks of each model.
The calculation is just done for differed part of chunks.

Takashi Sakamoto (14):
  ALSA: firewire-motu: move spec data to v2 protocol file
  ALSA: firewire-motu: move spec data to v3 protocol file
  ALSA: firewire-motu: localize protocol data
  ALSA: firewire-motu: add wrapper functions for protocol-dependent
    operations
  ALSA: firewire-motu: drop protocol structure
  ALSA: firewire-motu: add model-specific table of chunk count
  ALSA: firewire-motu: add alternative functions to detect packet format
    for protocol v2
  ALSA: firewire-motu: add alternative functions to detect packet format
    for protocol v3
  ALSA: firewire-motu: use table-based calculation of packet formats for
    proc
  ALSA: firewire-motu: use table-based calculation of packet formats for
    stream management
  ALSA: firewire-motu: remove obsoleted codes
  ALSA: firewire-motu: refactoring protocol v2 for clock source getter
  ALSA: firewire-motu: refactoring protocol v3 for clock source getter
  ALSA: firewire-motu: refactoring protocol v2 for fetching mode switch

 sound/firewire/motu/amdtp-motu.c       |  19 +-
 sound/firewire/motu/motu-pcm.c         |  14 +-
 sound/firewire/motu/motu-proc.c        |  20 +-
 sound/firewire/motu/motu-protocol-v2.c | 314 +++++++++++++++----------
 sound/firewire/motu/motu-protocol-v3.c | 303 ++++++++++++------------
 sound/firewire/motu/motu-stream.c      |  16 +-
 sound/firewire/motu/motu.c             | 113 +--------
 sound/firewire/motu/motu.h             | 124 +++++++---
 8 files changed, 463 insertions(+), 460 deletions(-)

-- 
2.25.1



More information about the Alsa-devel mailing list