All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Scott Bahling <sbahling@suse.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	ffado-devel@lists.sf.net
Subject: Re: Controlling the Tascam FW-1884
Date: Sat, 13 Oct 2018 19:40:24 +0900	[thread overview]
Message-ID: <97e54edf-1e47-d422-e438-a2c859083fd3@sakamocchi.jp> (raw)
In-Reply-To: <246b8baaa3c415a0accdb76d3b524dec5e0429f9.camel@suse.com>

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

  reply	other threads:[~2018-10-13 10:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9cec059e1ff1a558f21a3f0729c5a69a3d506573.camel@suse.com>
2018-09-08  2:53 ` Controlling the Tascam FW-1884 Takashi Sakamoto
2018-09-08 11:21   ` Scott Bahling
2018-09-10  7:59     ` Takashi Sakamoto
2018-09-12  7:18       ` Scott Bahling
2018-09-17 14:36         ` Takashi Sakamoto
2018-09-24  9:32           ` Scott Bahling
2018-09-28  3:44             ` Takashi Sakamoto
2018-09-28 15:28               ` Scott Bahling
2018-10-02  3:16                 ` Takashi Sakamoto
2018-10-03 20:37                   ` Scott Bahling
2018-10-06  9:07                     ` Takashi Sakamoto
2018-10-07 11:32                       ` Scott Bahling
2018-10-07 14:11                   ` Takashi Sakamoto
2018-10-12  8:12                     ` Scott Bahling
2018-10-13 10:40                       ` Takashi Sakamoto [this message]
2018-10-14 19:09                         ` Scott Bahling
2018-10-22 11:47                           ` Scott Bahling
2018-10-30  9:34                             ` Takashi Sakamoto
2018-11-02  9:26                               ` Scott Bahling
2018-11-02 12:05                                 ` Takashi Sakamoto
2018-11-16 17:37                                   ` Scott Bahling
2018-10-03 19:31               ` Scott Bahling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97e54edf-1e47-d422-e438-a2c859083fd3@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=ffado-devel@lists.sf.net \
    --cc=sbahling@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.