Skip to content

Releases: alsa-project/libhinawa

Version 1.4.3 release

16 Jan 01:34
Compare
Choose a tag to compare

In this maintenance release, two bugs are fixed.

An instance of HinawaFwFcp class has a 'timeout' property for the
timeout for FCP response transaction, however it doesn't work well.
The release includes fixes for the bug.

Additionally, an instance of HinawaSndUnit class has a 'streaming'
property to check whether packet streaming runs by kernel driver,
however it doesn't work well. The release includes fixes for the bug.

Version 1.4.2 release

05 Dec 02:32
Compare
Choose a tag to compare

In this release, a bug is fixed to avoid null pointer dereference.

An API of hinawa_snd_efw_transact() has an argument for a pointer to
GArray as 'args'. This is annotated with '(nullable)'. Although null
pointer can be passed by callers, structure members of the GArray are
accessed without any check.

Version 1.4.1 release

02 Dec 08:33
Compare
Choose a tag to compare

In this release, a bug is fixed to avoid memory corruption.

The bug appears to run with PyGObject v3.32.1 or later. A commit
35f97a68763 ("pygi-array: fix leak of transfer-full/container C arrays.
Fixes #322")[0] was merged to PyGObject to avoid memory leak for a
pointer for array. This commit strictly handles '(transfer)' annotation
to maintain ownership for pointer of array. However HinawaFwNode and
HinawaFwResp in libhinawa v1.4.0 or former don't have the annotation
for pointer to constant value. Although the ownership is still kept by
libhinawa, PyGObject attempts to free it and brings memory corruption.

[0] https://gitlab.gnome.org/GNOME/pygobject/merge_requests/117/commits

version 1.4.0 release

12 Oct 11:56
Compare
Choose a tag to compare

In this release, the minor part of version number is incremented to introduce some new symbols for additional APIs. This is a preparation for future major version up.

HinawaFwNode is newly added

In specification of IEEE 1394 bus, a node corresponds to each physical device to communicate each other. A unit corresponding to each functionality of the device. HinawaSndUnit is for the unit with audio and music functionalities. On the other hand, Linux FireWire character device is for the node.
HinawaFwNode is newly added for the node. HinawaFwUnit is an object to maintain a reference to an instance of HinawaFwNode. The object is planned to be an abstract object in future release. Userspace applications should be rewritten to instantiate derived classes such as HinawaSndUnit.
Some APIs in HinawaFwReq, HinawaFwResp and HinawaFwFcp objects with arguments of HinawaFwUnit are deprecated now. Userspace applications should use alternative APIs with arguments of HinawaFwNode, retrieved by hinawa_fw_unit_get_node().

GArray is deprecated for buffer argument

Some APIs in HinawSndEfw and HinawaSndDice are still with arguments of GArray, however GArray is inconvenient for development of language bindings such as Rust. Some alternative APIs are newly added to these GObject classes to deprecate old APIs. The backward compatibility is kept during v1 period.

Calles are responsible for buffer to store response frame of transaction

Some APIs in HinawaFwReq, HinawaFwFcp and HinawaSndEfw have arguments for buffer to store response frame of transaction. This buffer should be allocated by callers for enough space to the response. The backward compatibility is kept during v1 period.

Callers are responsible for threading

For convenience to userspace applications, some threads are launched internally for I/O dispatcher and signal notifier. These functionalities are now deprecated and userspace applications are responsible for threading. HinawaFwNode and HinawaSndUnit returns GSource and userspace applications can use GMainContext to run event dispatcher. The backward compatibility is kept during v1 period.

version 1.3.1 release

10 May 00:34
Compare
Choose a tag to compare

This release includes some minor bugs of HinawaSndTscm object.

version 1.3.0 release

22 Apr 09:20
Compare
Choose a tag to compare

In this release, the minor part of version number is incremented to introduce some symbols for additional APIs.

Additional APIs

All of the additional APIs are to instantiate each objects. Some languages have neither the feature corresponding to <stdarg.h> and interpretor for macro in C language. They hardly instantiate GObject-derived objects in this library and require some convenience APIs for it as long as GObject introspection is used. This is a list of the additional APIs:

  • hinawa_fw_unit_new()
  • hinawa_fw_req_new()
  • hinawa_fw_resp_new()
  • hinawa_fw_fcp_new()
  • hinawa_snd_unit_new()
  • hinawa_snd_dice_new()
  • hinawa_snd_efw_new()
  • hinawa_snd_dg00x_new()
  • hinawa_snd_motu_new()
  • hinawa_snd_tscm_new()

Change of thread usage

This library launched two threads internally to dispatch asynchronous events from opened character devices. One thread was for Linux FireWire character devices and another was for ALSA HwDep character device.

Until version 1.1.0 release, one thread had been used for both of them. This was for an use case that a handler for a signal of object associated to an ALSA HwDep character device executes asynchronous transaction to a Linux FireWire character device. The transaction requires timeout to wait for an event however the event is not dispatched during the timeout because the dispatcher thread itself is used for the timeout. For an easy workaround, two threads were used since then.

In this release, two threads are still used but for different purposes; One is for event dispatcher and another is for signal notifier. The behaviour of dispatcher thread is back to v1.1.0 release, however the event dispatcher schedules notification to the notifier, then continues to dispatch the other events. The notifier executes signal handlers in its own thread asynchronously. This is not a perfect solution because the notifier can be prevented to emit next signals when a handler goes to sleep or waits for another event. But I believe that the solution works well at the most use cases of this library.

Code refactoring to create GSource

Internally, code refactoring is done in respect of creation of GSource. As a result, the infinite timeout is available again for a call of poll(2) to reduce CPU usage. A wakeup mechanism of GMainContext has an effect to release blocked call.

version 1.2.0 release

21 Mar 15:20
Compare
Choose a tag to compare

In this release, the minor part of version number is incremented to submit changes of class structure. The change is just for support of virtual method, corresponding to GObject signals. As a result, applications can override the virtual signal with own implementation of derived classes to handle emitted signal instead of signal handlers, according to a fashion of GLib/GObject.

A list of the virtual methods newly added:

  • HinawaFwUnitClass
    • bus_update()
  • HinawaFwUnitClass
    • disconnected()
  • HinawaFwRespClass
    • requested()
  • HinawaSndUnitClass
    • lock_status()
  • HinawaSndDg00xClass
    • message()
  • HinawaSndDiceClass
    • notified()
  • HinawaSndMotuClass
    • notified()
  • HinawaSndTscmClass
    • control()

For example, with PyGObject, these virtual methods are overridden with class methods prefixed do_.

class MyClass(Hinawa.FwUnit):
    def do_bus_update(self):
        pass

Additionally, in this release, templates for gtk-doc are improved to generate better documentation. The generated documentation is maintained in https://github.com/takaswie/libhinawa-docs to publish them at https://takaswie.github.io/libhinawa-docs/.

version 1.1.2 release

05 Mar 13:15
Compare
Choose a tag to compare

In this release, a bug is fixed for HinawaFwReqClass and HinawaFwRespClass. This fix is important in a point of design of GObject (sigh...).

version 1.1.1 release

24 Feb 15:07
Compare
Choose a tag to compare

In this release, some minor bugs are fixed. The important fix is to correct symbol name for control event of HinawaSndTscm class. It's not good to change symbol names once released, but in this time it's OK because the bug brings handler compilation, thus it's not available for applications yet.

Another point is for test scripts to fix some minor issues.

version 1.1.0 release

30 Dec 01:24
Compare
Choose a tag to compare

In this release, a minor part of version number is incremented from 0 to 1
to submit an addition of new GObject object; HinawaSndTscm.

This object corresponds to a work in ALSA firewire stack in Linux sound
subsystem[1]. In a development period toward v4.21, a new feature was added
into ALSA firewire-tascam driver to support userspace interface for status and
control information demultiplexed from isochronous packet from target device.

The new object supports two features:

  • 'control' GObject signal to handle events of control surface on target device
  • 'hinawa_snd_tscm_get_state()' to read the latest status of target device

Additionally, in this release, thread model is changed. Till former releases,
this library internally starts a thread to handle both of Linux firewire
character device (/dev/fw*) and ALSA hwdep character device (/dev/snd/hw*).
Nowadays I recognize a need to poll /dev/fw* during operating /dev/snd/hw*
for asynchronous transactions on IEEE 1394 bus. To achieve this, this library
is changed to start two threads for the both.

Finally, I note that this series of work for ALSA firewire-tascam driver was
assisted by Scott Bahling. Without his help to investigate content of status and
control information on transferred image, we might not have handled events of
control surface. For detail, please refer to archived messages for Sep. 2018 to
Nov. 2018 in [email protected][2]. I greatly appreciate his help.

[1] [GIT PULL] sound updates for 4.21
http://lkml.iu.edu/hypermail/linux/kernel/1812.2/04303.html
[2] Alsa-devel Info Page
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel