]> git.alsa-project.org Git - alsa-gobject.git/log
alsa-gobject.git
3 years agoctl: elem-value: retrieve fixed-sized array by getter method for integer values
Takashi Sakamoto [Wed, 29 Jun 2022 02:49:00 +0000 (11:49 +0900)]
ctl: elem-value: retrieve fixed-sized array by getter method for integer values

In UAPI of Linux sound subsystem, 'struct snd_ctl_elem_values' has
fixed-sized array. It's natural to retrieve the array as is.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: retrieve fixed-sized array by getter method for boolean values
Takashi Sakamoto [Wed, 29 Jun 2022 02:49:00 +0000 (11:49 +0900)]
ctl: elem-value: retrieve fixed-sized array by getter method for boolean values

In UAPI of Linux sound subsystem, 'struct snd_ctl_elem_values' has
fixed-sized array. It's natural to retrieve the array as is.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: fix casting for byte data
Takashi Sakamoto [Wed, 29 Jun 2022 02:49:00 +0000 (11:49 +0900)]
ctl: elem-value: fix casting for byte data

Fixed: 0fa1e17e3f96 ("ctl: elem_value: add APIs to set/get values of bytes type")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoupdate README
Takashi Sakamoto [Tue, 28 Jun 2022 21:45:49 +0000 (06:45 +0900)]
update README

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: remove-filter: rewrite as GObject-derived object
Takashi Sakamoto [Tue, 28 Jun 2022 21:45:49 +0000 (06:45 +0900)]
seq: remove-filter: rewrite as GObject-derived object

In UAPI of ALSA Sequencer, 'struct snd_seq_remove_events' has reserved
member for future use. In the case, the convention of this project lets
us to use class instead of structure.

Additionally, current implementation of ALSASeq.RemoveFilter doesn't
support multiple condition to query events for removal. It's not
necessarily convenient.

This commit rewrites ALSASeq.RemoveFilter.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: enums: add rest of entries for remove filter flags
Takashi Sakamoto [Tue, 28 Jun 2022 21:45:49 +0000 (06:45 +0900)]
seq: enums: add rest of entries for remove filter flags

It's planned to rewrite ALSASeq.RemoveFilter for flexible configuration of
filter condition.

This commit adds the reset of entries for the flags.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: event-cntr: remove obsoleted internal function
Takashi Sakamoto [Tue, 28 Jun 2022 21:45:49 +0000 (06:45 +0900)]
seq: event-cntr: remove obsoleted internal function

Fixes: 4bc8ea4b91d2 ("seq: event-cntr: rewrite as boxed structure")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoci: separate libudev-dev installation from the other
Takashi Sakamoto [Mon, 27 Jun 2022 08:46:54 +0000 (17:46 +0900)]
ci: separate libudev-dev installation from the other

The dependency on libudev-dev is specific to alsa-gobject libraries apart
from the other libraries under alsa gobject-introspection team.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoall: replace 'represent' with 'express' in comments
Takashi Sakamoto [Mon, 27 Jun 2022 08:46:54 +0000 (17:46 +0900)]
all: replace 'represent' with 'express' in comments

For better text.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agouser-client/client-pool: update function comments about event scheduling
Takashi Sakamoto [Mon, 27 Jun 2022 08:46:54 +0000 (17:46 +0900)]
user-client/client-pool: update function comments about event scheduling

When scheduling events, the user client should take care of free cells in
own output memory pool. The number of free cells is available via property
of ClientPool class. The number of cells consumed by event is available
via method of Event boxed structure.

This commit adds comments about it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoclient-pool: change signedness for size properties
Takashi Sakamoto [Mon, 27 Jun 2022 08:46:54 +0000 (17:46 +0900)]
client-pool: change signedness for size properties

The properties for size of pool and cells always have positive value.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoevent: add public API to compute pool consumption when scheduling event
Takashi Sakamoto [Mon, 27 Jun 2022 08:46:54 +0000 (17:46 +0900)]
event: add public API to compute pool consumption when scheduling event

In design of ALSA Sequencer, delivery of event consumes cell in client
pool. For usual event, it's one cell. For variable length of event, it's
multiple cells including the total length of event.

ALSASeq.ClientPool class has properties to express the number of cells
and free cells in client pool. When comparing to the properties,
applications get to know whether the scheduling operation is blocked or
not.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoupdate README with compatibility note
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
update README with compatibility note

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: update class description
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
ctl: elem-value: update class description

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: rewrite getter for 64 bit signed integer values
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
ctl: elem-value: rewrite getter for 64 bit signed integer values

This commit rewrites the getter method so that it returns a pointer to
internal storage for 64 bit signed integer values.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: rewrite getter for IEC 60958 user data
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
ctl: elem-value: rewrite getter for IEC 60958 user data

This commit rewrites the getter method so that it returns a pointer to
internal storage for IEC 60958 user data.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: rewrite getter for IEC 60958 channel status
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
ctl: elem-value: rewrite getter for IEC 60958 channel status

This commit rewrites the getter method so that it returns a pointer to
internal storage for IEC 60958 channel status.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: rewrite getter for 8 bit unsigned integer values
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
ctl: elem-value: rewrite getter for 8 bit unsigned integer values

This commit rewrites the getter method so that it returns a pointer to
internal storage for 8 bit unsigned integer values.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: rewrite getter for enumeration index values
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
ctl: elem-value: rewrite getter for enumeration index values

This commit rewrites the getter method so that it returns a pointer to
internal storage for enumeration index values.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: rewrite getter for 32 bit signed integer values
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
ctl: elem-value: rewrite getter for 32 bit signed integer values

This commit rewrites the getter method so that it returns a pointer to
internal storage for 32 bit signed integer values.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: rewrite getter for boolean values
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
ctl: elem-value: rewrite getter for boolean values

This commit rewrites the getter method so that it returns a pointer to
internal storage for boolean values.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-value: clear value field at setter method
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
ctl: elem-value: clear value field at setter method

For safe at reuse of the boxed structure.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: fix entry in exported symbol map
Takashi Sakamoto [Sat, 25 Jun 2022 02:00:43 +0000 (11:00 +0900)]
timer: fix entry in exported symbol map

Fixes: b4e62cdc0eac ("timer: instance-status: rename method with real time")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: event: fix description about methods relevant to time stamp
Takashi Sakamoto [Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)]
seq: event: fix description about methods relevant to time stamp

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: query: rename to ALSATimer.get_real_time_clock_id()
Takashi Sakamoto [Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)]
timer: query: rename to ALSATimer.get_real_time_clock_id()

For friendly name.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: instance-status: rename method with real time
Takashi Sakamoto [Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)]
timer: instance-status: rename method with real time

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: enums: rename to ALSATimer.RealTimeEventType
Takashi Sakamoto [Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)]
timer: enums: rename to ALSATimer.RealTimeEventType

The set of events is used only for ALSATimer.RealTimeEvent.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: enums: rename to ALSATimer.EventType.TICK_TIME and REAL_TIME
Takashi Sakamoto [Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)]
timer: enums: rename to ALSATimer.EventType.TICK_TIME and REAL_TIME

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: real-time-event: rename boxed structure
Takashi Sakamoto [Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)]
timer: real-time-event: rename boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: tick-time-event: rename boxed structure
Takashi Sakamoto [Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)]
timer: tick-time-event: rename boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: move ALSATimer.TstampEvent files for future rename
Takashi Sakamoto [Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)]
timer: move ALSATimer.TstampEvent files for future rename

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: move ALSATimer.TickEvent files for future rename
Takashi Sakamoto [Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)]
timer: move ALSATimer.TickEvent files for future rename

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoutils: successfully parse the string teminated by '\n'
Takashi Sakamoto [Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)]
utils: successfully parse the string teminated by '\n'

It requires to parse the literal from sysfs node.

Fixes: cc92f5ca9478 ("utils: add utility to compute integer value from string literal")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: user-client: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
seq: user-client: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: system-info: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
seq: system-info: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: queue-tempo: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
seq: queue-tempo: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: queue-status: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
seq: queue-status: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: queue-info: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
seq: queue-info: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: port-info: fix tag indentation
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
seq: port-info: fix tag indentation

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: client-pool: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
seq: client-pool: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: client-info: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
seq: client-info: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: fix description of object properties in which enumerations are available
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
seq: fix description of object properties in which enumerations are available

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: instance-status: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
timer: instance-status: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: instance-params: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
timer: instance-params: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: instance-info: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
timer: instance-info: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: device-status: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
timer: device-status: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: device-params: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
timer: device-params: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: device-info: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
timer: device-info: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agohwdep: device-info: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
hwdep: device-info: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agorawmidi: substream-status: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
rawmidi: substream-status: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agorawmidi: substream-params: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
rawmidi: substream-params: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agorawmidi: substream-info: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
rawmidi: substream-info: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agorawmidi: stream-pair: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
rawmidi: stream-pair: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agocard: elem-value: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
card: elem-value: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: card-info: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
ctl: card-info: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: card: add annotation to object properties
Takashi Sakamoto [Mon, 20 Jun 2022 09:44:49 +0000 (18:44 +0900)]
ctl: card: add annotation to object properties

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test scripts for namespace functions
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test scripts for namespace functions

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSASeq.QueueTimerCommon interface
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSASeq.QueueTimerCommon interface

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSAHwdep.DeviceCommon interface
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSAHwdep.DeviceCommon interface

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSACtl.ElemInfoSingleArray interface
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSACtl.ElemInfoSingleArray interface

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSACtl.ElemInfoCommon interface
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSACtl.ElemInfoCommon interface

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: test virtual functions in object
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: test virtual functions in object

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: refine helper function to test object
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: test object type instead of its instance
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: test object type instead of its instance

No need to instantiate object to test.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSASeq.RemoveFilter boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSASeq.RemoveFilter boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSASeq.EventDataResult boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSASeq.EventDataResult boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSASeq.EventDataQueue boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSASeq.EventDataQueue boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSASeq.EventDataNote boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSASeq.EventDataNote boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSASeq.EventDataCtl boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSASeq.EventDataCtl boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSASeq.EventDataConnect boxed object
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSASeq.EventDataConnect boxed object

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSASeq.Event boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSASeq.Event boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSASeq.EventCntr boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSASeq.EventCntr boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSASeq.Addr boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSASeq.Addr boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSATimer.TstampEvent boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSATimer.TstampEvent boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSATimer.TickEvent boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSATimer.TickEvent boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSATimer.DeviceId boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSATimer.DeviceId boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add test script for ALSACtl.ElemId boxed structure
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add test script for ALSACtl.ElemId boxed structure

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: add helper function to test enumerations and flags
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: add helper function to test enumerations and flags

This commit adds helper function for enumerations and flags. All of
available enumerations and flags are available via object attributes.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotests: rename helper function to test object interface
Takashi Sakamoto [Sun, 19 Jun 2022 11:38:51 +0000 (20:38 +0900)]
tests: rename helper function to test object interface

It appears that some helper functions are required to test GObject
interface, enumerations, and flags.

This commit renames current helper function for objects.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: event-cntr: add internal API to serialize list of events
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:22 +0000 (19:23 +0900)]
seq: event-cntr: add internal API to serialize list of events

ALSASeq.EventCntr still handles batch of events, therefore it's good to
put serialization code into it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: event-cntr: rewrite as boxed structure
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:22 +0000 (19:23 +0900)]
seq: event-cntr: rewrite as boxed structure

The addition of ALSASeq.Event boxed structure obsoletes many methods of
ALSASeq.EventCntr.

This commit rewrite it for convenience.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: user-client: rewrite public API to schedule single event
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:22 +0000 (19:23 +0900)]
seq: user-client: rewrite public API to schedule single event

This commit rewrite ALSASeq.schedule_event() to get an instance of
ALSASeq.Event.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: user-client: add public API to schedule list of events
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:22 +0000 (19:23 +0900)]
seq: user-client: add public API to schedule list of events

This commit adds ALSASeq.schedule_events() to schedule the list of
events.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: event: add boxed structure for event
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: enums: obsolete ALSASeqSubscribeFlag enumerations
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:21 +0000 (19:23 +0900)]
seq: enums: obsolete ALSASeqSubscribeFlag enumerations

ALSASeq.SubscribeFlag is defined but it's more convenient to add the
flags as properties in ALSASeq.SubscribeData.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: port-info: rename properties for time stamp
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:21 +0000 (19:23 +0900)]
seq: port-info: rename properties for time stamp

ALSASeq.PortInfo has :timestamp-overwrite and :timestamp-mode.

This commit renames them according to convention. Additionally, property
annotations are added as well.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: enums: rename to tstamp mode
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:21 +0000 (19:23 +0900)]
seq: enums: rename to tstamp mode

Some stuffs are named with 'timestamp', however 'tstamp' seems to be
preferable for consistency.

This commit renames them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: remove-filter: remove unused error arguments
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.

This commit removes the unused argument.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: tstamp: remove unused boxed structure
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:21 +0000 (19:23 +0900)]
seq: tstamp: remove unused boxed structure

The boxed structure for time stamp union is not used anymore.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: event-cntr/event-data-queue: obsolete timestamp functions by adding alternatives
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoupdate README
Takashi Sakamoto [Tue, 14 Jun 2022 10:23:21 +0000 (19:23 +0900)]
update README

The command line examples are updated to use '-c' option of meson
instead of cd command.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: tstamp-event: rename from event-data-tstamp
Takashi Sakamoto [Sun, 5 Jun 2022 03:39:24 +0000 (12:39 +0900)]
timer: tstamp-event: rename from event-data-tstamp

The name of EventDataTstamp is redundant.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: tick-event: rename from event-data-tick
Takashi Sakamoto [Sun, 5 Jun 2022 03:39:24 +0000 (12:39 +0900)]
timer: tick-event: rename from event-data-tick

The name of EventDataTick is a bit redundant.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: enum: rename EventType from EventDataType
Takashi Sakamoto [Sun, 5 Jun 2022 03:39:24 +0000 (12:39 +0900)]
timer: enum: rename EventType from EventDataType

ALSATimer.EventDataType is used to distinguish the type of event from
either tick or timestamp.

This commit renames the enumerations with explicit name.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: enums: rename TstampEventType from EventType
Takashi Sakamoto [Sun, 5 Jun 2022 03:39:24 +0000 (12:39 +0900)]
timer: enums: rename TstampEventType from EventType

ALSATimer.EventType is for the type of tstamp event, thus it's not for
tick event.

This commit renames the enumerations with explicit name.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: event: remove unused structure
Takashi Sakamoto [Sun, 5 Jun 2022 03:39:24 +0000 (12:39 +0900)]
timer: event: remove unused structure

ALSATimer.Event is obsoleted and unused now.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agotimer: user_instance: use two signals to dispatch events explicitly
Takashi Sakamoto [Sun, 5 Jun 2022 03:39:24 +0000 (12:39 +0900)]
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agohwdep: device-info: allow to set property at instantiation
Takashi Sakamoto [Fri, 3 Jun 2022 03:36:48 +0000 (12:36 +0900)]
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agohwdep: add error domain for implementators of DeviceCommon interface
Takashi Sakamoto [Fri, 3 Jun 2022 03:36:48 +0000 (12:36 +0900)]
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.

This commit adds error domain for the case.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agohwdep: device-common: add interface for common feature of ALSA HwDep device
Takashi Sakamoto [Fri, 3 Jun 2022 03:36:48 +0000 (12:36 +0900)]
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>