[alsa-devel] [PATCH 0/5] ALSA: firewire-tascam: support notification of
Takashi Sakamoto
o-takashi at sakamocchi.jp
Fri Nov 23 05:19:06 CET 2018
Oops, the subject line is truncated... It should be
"ALSA: firewire-tascam: support notification of change of state for
control surface". (My text editor works for the surplus.)
On Fri, Nov 23, 2018 at 01:13:02PM +0900, Takashi Sakamoto wrote:
> Hi,
>
> Units of TASCAM FireWire series transfer its state in tx isochronous
> packets. The way to handle change of the state is a longstanding issue
> since I firstly reveal the mechanism in this list[1].
>
> In this time, Scott Bahling dedicates for further investigation to seek
> better implementation[2][3][4]. Finally, we identified meaning of the
> most of bits in the image of state, and decided which changes are worth
> for userspace applications to handle as events.
>
> This commit adds support notification of the events. Userspace
> applications can handle the notification via ALSA hwdep interface.
> Furthermore, they can retrieve image of the latest states via the
> interface.
>
> Changes from the initial proposal[5]:
> - obsolete usage of mmap(2) due to several disadvantages. Instead, use
> event queue for change notification, and add ioctl command to retrieve
> image of states.
>
> Changes from the latest work[6]:
> - To reduce time in an interrupt context in which tx isochronous packets
> are handled, data in the event and the image is passed to userspace in
> big-endian order. Additionally, image of the states are passed to
> userspace in big-endian order as well. Userspace applications are
> responsible to convert the data in host-endianness order.
> - improve efficiency to copy batch of events to userspace in hwdep
> interface
> - rename structure and macro name.
>
> This patchset is also available in my remote branch for backport purpose
> to Linux v4.17 or later[7].
>
> I've already prepare userspace implementation; libhinwa. A
> 'topic/firewire-tascam-pr' remote branch includes patchset for the
> additional feature[8]. This library produces GObject class to handle the
> event notification and emits GObject signal, and has a method
> 'HinawaSndTscm.get_state()', with enough consideration to endianness.
> Developers can process change of state with these two APIs.
>
> > Scott
>
> As the above, I changed method name from 'HinawaSndTscm.get_status()'.
> I'd like you to change your local implementation for 'hinawa-utils'.
> Sorry to add further work to you.
>
> [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2015-July/094817.html
> [2] http://mailman.alsa-project.org/pipermail/alsa-devel/2018-September/140051.html
> [3] http://mailman.alsa-project.org/pipermail/alsa-devel/2018-October/140593.html
> [4] http://mailman.alsa-project.org/pipermail/alsa-devel/2018-November/141395.html
> [5] https://github.com/takaswie/snd-firewire-improve/tree/topic/tascam-userspace
> [6] https://github.com/takaswie/snd-firewire-improve/tree/topic/tascam-userspace-take3
> [7] https://github.com/takaswie/snd-firewire-improve/tree/topic/tascam-userspace-pr
> [8] https://github.com/takaswie/libhinawa/tree/topic/tascam-userspace-pr
>
> Regards
>
> Takashi Sakamoto (5):
> ALSA: firewire-tascam: pick up data of state from tx isochronous
> pakcets
> ALSA: firewire-tascam: add new hwdep ioctl command to get state image
> ALSA: firewire-tascam: queue events for change of control surface
> ALSA: firewire-tascam: apply small refactoring to handle several type
> of event for hwdep interface
> ALSA: firewire-tascam: notify events of change of state for userspace
> applications
>
> include/uapi/sound/firewire.h | 20 +++++
> sound/firewire/tascam/amdtp-tascam.c | 51 +++++++++++-
> sound/firewire/tascam/tascam-hwdep.c | 115 +++++++++++++++++++++++----
> sound/firewire/tascam/tascam.h | 9 +++
> 4 files changed, 180 insertions(+), 15 deletions(-)
>
> --
> 2.19.1
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
More information about the Alsa-devel
mailing list