alsa-project / snd-firewire-ctl-services

A set of server programs for audio and music units on IEEE 1394 bus supported by Linux sound subsystem a.k.a. ALSA.
GNU General Public License v3.0
35 stars 5 forks source link

[PATCH 0/7] runtime/core: rework for runtime core crate #168

Closed takaswie closed 1 year ago

takaswie commented 1 year ago

Current implementation of CtlModel, MeasureModel, and NotifyModel includes duplicated code to read state of control elements. Furthermore, ElemValueAccessor is useless nowadays.

Even though runtime core crate includes many ad-hoc implementations, the rework for implementation evolves many changes for runtime crates. This patchset is the kind of work.

Takashi Sakamoto (7):
  runtime/bebob: obsolete usage of core::ElemValueAccessor
  runtime/fireface: obsolete usage of core::ElemValueAccessor
  runtime/core: remove ElemValueAccessor
  runtimie/core: implement cache function as the part of CtlModel
  runtime/core: change prototype of load function of CardCntr
  runtime/core: use CtlModel::read() to obsolete NotifyModel::read_notified_elem()
  runtime/core: use CtlModel::read() to obsolete MeasureModel::measure_elem()

 runtime/bebob/src/apogee/ensemble_model.rs    | 100 ++++++--------
 runtime/bebob/src/behringer.rs                |  27 ++--
 runtime/bebob/src/digidesign.rs               |  27 ++--
 runtime/bebob/src/esi.rs                      |  27 ++--
 runtime/bebob/src/focusrite/saffire_model.rs  |  50 ++-----
 .../bebob/src/focusrite/saffirele_model.rs    |  42 ++----
 .../bebob/src/focusrite/saffireproio_model.rs |  55 +++-----
 runtime/bebob/src/icon.rs                     |  27 ++--
 runtime/bebob/src/lib.rs                      |   4 +-
 runtime/bebob/src/maudio.rs                   |  24 ++--
 runtime/bebob/src/maudio/audiophile_model.rs  |  31 +----
 runtime/bebob/src/maudio/fw410_model.rs       |  30 +----
 runtime/bebob/src/maudio/ozonic_model.rs      |  30 +----
 .../src/maudio/profirelightbridge_model.rs    |  42 ++----
 runtime/bebob/src/maudio/solo_model.rs        |  30 +----
 runtime/bebob/src/maudio/special_model.rs     | 113 ++++++----------
 runtime/bebob/src/model.rs                    |  62 ++++-----
 runtime/bebob/src/presonus/firebox_model.rs   |  27 ++--
 runtime/bebob/src/presonus/fp10_model.rs      |  27 ++--
 .../bebob/src/presonus/inspire1394_model.rs   |  38 ++----
 runtime/bebob/src/roland.rs                   |  16 +--
 runtime/bebob/src/stanton.rs                  |  27 ++--
 runtime/bebob/src/terratec/aureon_model.rs    |  27 ++--
 runtime/bebob/src/terratec/phase88_model.rs   |  27 ++--
 runtime/bebob/src/yamaha_terratec.rs          |  54 +++-----
 runtime/core/src/card_cntr.rs                 |  19 +--
 runtime/core/src/elem_value_accessor.rs       | 125 ------------------
 runtime/core/src/lib.rs                       |   1 -
 runtime/dice/src/blackbird_model.rs           |  56 ++------
 runtime/dice/src/extension_model.rs           |  56 ++------
 runtime/dice/src/focusrite/liquids56_model.rs |  58 ++------
 runtime/dice/src/focusrite/spro14_model.rs    |  56 ++------
 runtime/dice/src/focusrite/spro24_model.rs    |  58 ++------
 runtime/dice/src/focusrite/spro24dsp_model.rs |  58 ++------
 runtime/dice/src/focusrite/spro26_model.rs    |  58 ++------
 runtime/dice/src/focusrite/spro40_model.rs    |  58 ++------
 runtime/dice/src/io_fw_model.rs               |  52 +-------
 runtime/dice/src/ionix_model.rs               |  34 +----
 runtime/dice/src/lib.rs                       |   2 +-
 runtime/dice/src/mbox3_model.rs               |  58 ++------
 runtime/dice/src/minimal_model.rs             |  26 +---
 runtime/dice/src/model.rs                     |  56 ++++----
 runtime/dice/src/pfire_model.rs               |  84 ++++--------
 runtime/dice/src/presonus/fstudio_model.rs    |  32 +----
 .../dice/src/presonus/fstudiomobile_model.rs  |  56 ++------
 .../dice/src/presonus/fstudioproject_model.rs |  56 ++------
 .../dice/src/presonus/fstudiotube_model.rs    |  56 ++------
 .../dice/src/tcelectronic/desktopk6_model.rs  |  40 +-----
 runtime/dice/src/tcelectronic/itwin_model.rs  |  52 +-------
 runtime/dice/src/tcelectronic/k24d_model.rs   |  52 +-------
 runtime/dice/src/tcelectronic/k8_model.rs     |  44 +-----
 runtime/dice/src/tcelectronic/klive_model.rs  |  52 +-------
 .../dice/src/tcelectronic/studiok48_model.rs  |  56 +-------
 runtime/digi00x/src/lib.rs                    |   4 +-
 runtime/digi00x/src/model.rs                  |  80 +----------
 runtime/fireface/src/ff400_model.rs           |  40 +-----
 runtime/fireface/src/ff400_runtime.rs         |   2 +-
 runtime/fireface/src/ff800_model.rs           |  25 +---
 runtime/fireface/src/ff800_runtime.rs         |   2 +-
 runtime/fireface/src/ff802_model.rs           |  25 +---
 runtime/fireface/src/latter_runtime.rs        |  22 +--
 runtime/fireface/src/lib.rs                   |   6 +-
 runtime/fireface/src/ucx_model.rs             |  55 +++-----
 runtime/fireworks/src/audiofire12_former.rs   |  68 +++-------
 runtime/fireworks/src/audiofire12_later.rs    |  47 +------
 runtime/fireworks/src/audiofire2.rs           |  53 +-------
 runtime/fireworks/src/audiofire4.rs           |  55 +-------
 runtime/fireworks/src/audiofire8.rs           |  48 +------
 runtime/fireworks/src/audiofire9.rs           |  50 +------
 runtime/fireworks/src/lib.rs                  |   2 +-
 runtime/fireworks/src/model.rs                |  24 ++--
 runtime/fireworks/src/onyx1200f.rs            |  46 +------
 runtime/fireworks/src/onyx400f.rs             |  44 +-----
 runtime/fireworks/src/rip.rs                  |  44 +-----
 runtime/motu/src/audioexpress.rs              |  70 +---------
 runtime/motu/src/command_dsp_runtime.rs       |   9 +-
 runtime/motu/src/f828.rs                      |  15 +--
 runtime/motu/src/f828mk2.rs                   |  74 +----------
 runtime/motu/src/f828mk3.rs                   |  67 +---------
 runtime/motu/src/f828mk3_hybrid.rs            |  67 +---------
 runtime/motu/src/f896.rs                      |  15 +--
 runtime/motu/src/f896hd.rs                    |  66 +--------
 runtime/motu/src/f8pre.rs                     |  66 +--------
 runtime/motu/src/h4pre.rs                     |  70 +---------
 runtime/motu/src/register_dsp_runtime.rs      |   9 +-
 runtime/motu/src/track16.rs                   |  65 +--------
 runtime/motu/src/traveler.rs                  |  80 +----------
 runtime/motu/src/traveler_mk3.rs              |  59 +--------
 runtime/motu/src/ultralite.rs                 |  74 +----------
 runtime/motu/src/ultralite_mk3.rs             |  65 +--------
 runtime/motu/src/ultralite_mk3_hybrid.rs      |  65 +--------
 runtime/motu/src/v1_runtime.rs                |  21 +--
 runtime/oxfw/src/apogee_model.rs              |  37 +-----
 runtime/oxfw/src/common_model.rs              |  17 +--
 runtime/oxfw/src/griffin_model.rs             |  17 +--
 runtime/oxfw/src/lacie_model.rs               |  17 +--
 runtime/oxfw/src/lib.rs                       |   2 +-
 runtime/oxfw/src/loud_model.rs                |  17 +--
 runtime/oxfw/src/model.rs                     |  18 +--
 runtime/oxfw/src/tascam_model.rs              |  17 +--
 runtime/tascam/src/fw1082_model.rs            |  49 +++----
 runtime/tascam/src/fw1804_model.rs            |  43 ++----
 runtime/tascam/src/fw1884_model.rs            |  53 +++-----
 runtime/tascam/src/isoch_console_runtime.rs   |  27 ++--
 runtime/tascam/src/isoch_rack_runtime.rs      |  14 +-
 105 files changed, 742 insertions(+), 3660 deletions(-)
 delete mode 100644 runtime/core/src/elem_value_accessor.rs
takaswie commented 1 year ago

Merged.