Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: refine helper function to test object
When implementing GObject interface, available properties, virtual
methods, and signals are not referred by attributes of object, while
available methods are available.
This commit expands current helper function to test object interface.
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:22 +0000 (19:23 +0900)]
seq: event: add boxed structure for event
Current implementation has ALSASeq.EventCntr for user applications to
handle batch of events. The properties of event is directly retrieved
from it by index number, however it's necessarily useful.
This commit adds boxed structure specific to each event.
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:21 +0000 (19:23 +0900)]
seq: remove-filter: remove unused error arguments
ALSASeq.RemoveFilter class has some constructors according to
the filter condition. These are defined as throw function, however error
argument is not used at all.
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:21 +0000 (19:23 +0900)]
seq: event-cntr/event-data-queue: obsolete timestamp functions by adding alternatives
In UAPI of ALSA Sequencer, time stamp is defined as union which has
tick time member and real time member. There is no tag to select two
members, thus user applications should judge which member is used. In
this meaning, exposing the union is not necessarily useful.
This commit is a preparation to obsolete the union. The methods to
retrieve the union are rewrite to retrieve either tick time or real time
explicitly.
timer: user_instance: use two signals to dispatch events explicitly
Current implementation uses one signal to dispatch events. The user
application should distinguish actual type of event when handling the
evet. Nevertheless the type of event is decided by call of choose API,
before starting timer instance, therefore the application knows the
type of event in advance.
This commit adds two signals to dispatch the events to obsolete the
existent one signal.
hwdep: device-info: allow to set property at instantiation
ALSAHwdep.DeviceCommon interface allows subclass to implement
get_device_info() virtual function. In the function, DeviceInfo should
be instantiated with correct properties for device information. However,
current implementation of DeviceInfo doesn't have setter function for
the properties.
This commit adds setter function for the purpose. It's allowed to set
them at construction only.
hwdep: add error domain for implementators of DeviceCommon interface
The implementator of DeviceCommon interface should operate character
device for ALSA HwDep interface, thus it can receive any type of error
as a result of system call. Some of the error may be common.
hwdep: device-common: add interface for common feature of ALSA HwDep device
The protocol in ALSA HwDep character device has common feature. It's
suitable for userspace implementation to have GObject interface for such
features.
This commit adds the interface. The implementation of interface should
have four methods; open, get_protocol_version, get_device_info, and
create_source. Additionally, it should emit handle-disconnection signal
when detecting ENODEV error in the interation of source. It requires to
notify userspace application since the application should release
character device immediately.
seq: user-client: use QueueTimerCommon interface instead of QueueTimer
Current implementation to handle queue timer is by ALSASeq.QueueTimer
gobject class, and uses boxed object (=structure) to express actual data
of the timer. The implementation is not necessarily convenient to add
more type of queue timer since it requires to add getter/setter of data
to the class.
This commit uses ALSASeq.QueueTimerCommon interface to handle any type
of queue timer in ALSASeq.UserInstance for system call.
ctl: card: use ALSACtl.ElemInfoCommon instead of ElemInfo
Current implementation to handle element information is by ALSACtl.ElemInfo
gobject class, and uses some helper functions for setter/getter properties
of information. The implementation is not necessarily convenient to add
more type of element information since it requires to add such helper
functions per each.
This commit uses ALSACtl.ElemInfoCommon interface to handle any type of
element information in ALSACtl.Card for system call.
ctl: elem-info-integer64: add class for element information of integer64 type
The element information of integer64 type delivers additional three
properties; the minimum, maximum, and step of value for element of
value array. The value of property is 64 bit signed integer.
This commit adds gobject class for the information.
ctl: elem-info-integer: add class for element information of integer type
The element information of integer type delivers additional three
properties; the minimum, maximum, and step of value for element of
value array. The value of property is 32 bit integer.
This commit adds gobject class for the information.
ctl: elem-info-iec60958: add class for element information of IEC60958 type
The element information of IEC60958 type doesn't deliver the count of
value since the element has two types of data array according to IEC60958;
channel status and user data.
This commit adds gobject class for the information.
ctl: elem-info-common: add common interface for element information
In UAPI of ALSA, element information is expressed with union to support
several types of element.
This commit adds common interface for the information. It should
implements four properties; the identifier, the type, the set of access
flags, and PID of owner.
Fixes: b298bc9afe11 ("ctl: card: rewrite public API to return gboolean according to GNOME convention") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Takashi Sakamoto [Tue, 31 May 2022 01:41:31 +0000 (10:41 +0900)]
seq: event_cntr: rewrite public API to return gboolean according to GNOME convention
In GNOME convention, the throw function to report error at GError argument
should return gboolean value to report the overall operation finishes
successfully or not.
This commit rewrite such public APIs with loss of backward compatibility.
Takashi Sakamoto [Tue, 31 May 2022 01:41:31 +0000 (10:41 +0900)]
seq: client_info: rewrite public API to return gboolean according to GNOME convention
In GNOME convention, the throw function to report error at GError argument
should return gboolean value to report the overall operation finishes
successfully or not.
This commit rewrite such public APIs with loss of backward compatibility.
Takashi Sakamoto [Tue, 31 May 2022 01:41:31 +0000 (10:41 +0900)]
seq: user_client: rewrite public API to return gboolean according to GNOME convention
In GNOME convention, the throw function to report error at GError argument
should return gboolean value to report the overall operation finishes
successfully or not.
This commit rewrite such public APIs with loss of backward compatibility.
Takashi Sakamoto [Tue, 31 May 2022 01:41:31 +0000 (10:41 +0900)]
seq: query: rewrite public API to return gboolean according to GNOME convention
In GNOME convention, the throw function to report error at GError argument
should return gboolean value to report the overall operation finishes
successfully or not.
This commit rewrite such public APIs with loss of backward compatibility.
Takashi Sakamoto [Tue, 31 May 2022 01:41:31 +0000 (10:41 +0900)]
timer: instance-params: rewrite public API to return gboolean according to GNOME convention
In GNOME convention, the throw function to report error at GError argument
should return gboolean value to report the overall operation finishes
successfully or not.
This commit rewrite such public APIs with loss of backward compatibility.
Takashi Sakamoto [Tue, 31 May 2022 01:41:31 +0000 (10:41 +0900)]
timer: user_instance: rewrite public API to return gboolean according to GNOME convention
In GNOME convention, the throw function to report error at GError argument
should return gboolean value to report the overall operation finishes
successfully or not.
This commit rewrite such public APIs with loss of backward compatibility.
Takashi Sakamoto [Tue, 31 May 2022 01:41:31 +0000 (10:41 +0900)]
timer: query: rewrite public API to return gboolean according to GNOME convention
In GNOME convention, the throw function to report error at GError argument
should return gboolean value to report the overall operation finishes
successfully or not.
This commit rewrite such public APIs with loss of backward compatibility.
Takashi Sakamoto [Tue, 31 May 2022 01:41:31 +0000 (10:41 +0900)]
hwdep: query: rewrite public API to return gboolean according to GNOME convention
In GNOME convention, the throw function to report error at GError argument
should return gboolean value to report the overall operation finishes
successfully or not.
This commit rewrite such public APIs with loss of backward compatibility.
Takashi Sakamoto [Tue, 31 May 2022 01:41:31 +0000 (10:41 +0900)]
rawmidi: stream_pair: rewrite public API to return gboolean according to GNOME convention
In GNOME convention, the throw function to report error at GError argument
should return gboolean value to report the overall operation finishes
successfully or not.
This commit rewrite such public APIs with loss of backward compatibility.