[alsa-devel] Controlling the Tascam FW-1884

Takashi Sakamoto o-takashi at sakamocchi.jp
Sat Oct 13 12:40:24 CEST 2018


Hi Scott,

On Oct 12 2018 17:12, Scott Bahling wrote:
> I have tested the branches and it works well. I was able to create
> daemon in python to interface the FW-1884 with Ardour via the OSC
> protocol. That's working reliably.

Good to hear ;)

> I had to enable quadlets 00-04 since they contain the fader control
> values. I masked out the solo control values in the same way as the
> monitor control values since they continuously fluctuate in the same
> way.

For FW-1082 these quadlets includes value of movable fader as well,
however unlike FW-1884 they have fluctuate quirk. So I think it
reasonable for us to program this module to ignore them.

Instead, let us program applications so that they call
'hinawa_snd_tscm_get_status()' periodically to get current value of
these faders between touch and untouch event on quadlet 05? This
take applications to consume CPU time more efficiently than handling
many events.

> While testing, noticed that the encoder bits on quadlet 06 do not get
> updated reliably if the encoder knob is moved quickly. The transitions
> on those bits happen quickly and some of the bit state changes get
> lost. I switched to using the absolute encoder values on quadlets 10-15
> which works reliably.

Yep. We need to ignore some bits in quadlet 06 and 08 for value of the
knobs.


Well, as a result, ALSA firewire-tascam driver handles 'edge-trigge'
events except for jog wheel and knobs. For this kind of event, it's
useful to notify before/after value when emitting notification. So I'd
like to change structure passed to UAPI so that:

  struct snd_firewire_tascam_control {
         unsigned int index;
-       __u32 flags;
+       __u32 before;
+       __u32 after;
  };

Would I request your opinion? You can see patches here:
  - 
https://github.com/takaswie/snd-firewire-improve/tree/topic/tascam-userspace-take3
  - https://github.com/takaswie/libhinawa/tree/topic/tascam-userspace-take3

You can receive 'control' event of 'HinawaSndTscm' GObject with these
two values:

```
def handle_control(self, index, before, after):
     print('{0:02d}: {1:08x} -> {2:08x}, {3:08x}'.format(index, before, 
after, after ^ before))
```

idx before      after     XOR
09: ffffffff -> 7fffffff, 80000000
09: 7fffffff -> ffffffff, 80000000
06: ffffffff -> ff7fffff, 00800000
06: ff7fffff -> ffffffff, 00800000
07: ffffffff -> ffffff7f, 00000080
07: ffffff7f -> ffffffff, 00000080
10: 00000000 -> 00000001, 00000001 (knob)
10: 00000001 -> 00000002, 00000003 (knob)
15: 003f000c -> 003f000b, 00000007 (jog wheel)
15: 003f000b -> 003f000a, 00000001 (job wheel)
14: 00100005 -> 00110005, 00010000 (knob)
09: ffffffff -> fffffbff, 00000400
09: fffffbff -> ffffffff, 00000400
05: 01ff00a6 -> 017f00a6, 00800000
05: 017f00a6 -> 01ff00a6, 00800000


Thanks

Takashi Sakamoto


More information about the Alsa-devel mailing list