All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Bahling <sbahling@suse.com>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	ffado-devel@lists.sf.net
Subject: Re: Controlling the Tascam FW-1884
Date: Mon, 24 Sep 2018 11:32:49 +0200	[thread overview]
Message-ID: <10a99ea9c672ac6d0c9d5536e9d85a15f5a32d95.camel@suse.com> (raw)
In-Reply-To: <fc278639-12da-02b8-685d-681e06b044e4@sakamocchi.jp>


[-- Attachment #1.1: Type: text/plain, Size: 2573 bytes --]

On Mon, 2018-09-17 at 23:36 +0900, Takashi Sakamoto wrote:
> Hi,


> I prepare branches in two remote repositories:
>   - 
> 
https://github.com/takaswie/snd-firewire-improve/tree/topic/tascam-userspace
>  
> (a384019c0f78)
>   - https://github.com/takaswie/libhinawa/tree/topic/tascam-userspace 
> (a5994ec2165f)
> 
> Installing the patched driver, you can read the status and control
> message in userspace by mmap(2).
> 
> Patched libhinawa produces HinawaSndTscm GObject class. This class is
> also available with gobject introspection. For example with PyGobject:
> 
> ```
> #/usr/bin/env python3
> from time import sleep
> import gi
> gi.require_version('Hinawa', '2.0')
> from gi.repository import Hinawa
> unit = Hinawa.SndTscm()
> # I assume card number 1 is assigned. Take care of file permission.
> unit.open('/dev/snd/hwC1D0')
> unit.listen()
> while (True):
>    for i, frame in enumerate(unit.get_status()):
>      print('{0:02d}: {1:08x}'.format(i, frame))
>    sleep(0.1)
> ```
> 
> This code print the message to stdout, but not start packet streaming.
> You need to start it by ALSA PCM/rawMIDI interfaces, like:
> $ aplay -Dplughw:1,0 /dev/urandom
> 
> I notice that the branches include patches I introduced[1], with some
> minor optimizations to Linux kernel v4.17 or later. The patches are
> written just to satisfy investigation work and really ad-hoc ones.

Thanks! I finally had some time to try it out.

My test system is running a 4.12 kernel from openSUSE Leap 15.0. I
backported the patches but had to remove your GFP_KERNEL patch for it to
work on my kernel. With the GFP_KERNEL patch, user space was not seeing
updates to the data stream. With it removed, I had a constant update.

The kernel was unstable and the system hard locked frequently with the
patches enabled (with and without the GFP_KERNEL patch). But I was able
to map out all the controller functions to the bits in the first 16
quadlets. I will write up my findings and send them later.

> > I noticed that we are able to control the LEDs from the host via the
> > asynchronous link. Do you you think the faders are also controlled
> > that way
> > or would that also go via isochronous packets to the FW-1884?
> 
> The rx isochronous packets from system to the unit include no data to
> control the unit[2]. If the faders are movable from system software,
> it should be achieved by asynchronous transactions, like blighting
> LEDs.

I guess without an analyzer that will be difficult to track down.

-Scott

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2018-09-24  9:32 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 [this message]
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
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=10a99ea9c672ac6d0c9d5536e9d85a15f5a32d95.camel@suse.com \
    --to=sbahling@suse.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ffado-devel@lists.sf.net \
    --cc=o-takashi@sakamocchi.jp \
    /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.