]> git.alsa-project.org Git - alsa-gobject.git/log
alsa-gobject.git
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>
3 years agohwdep: use explicit value for iface type enumeration
Takashi Sakamoto [Fri, 3 Jun 2022 03:36:48 +0000 (12:36 +0900)]
hwdep: use explicit value for iface type enumeration

Current definition for iface type enumeration uses conditional macro. It
brings gir parser warnings.

This commit uses explicit value for them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: queue-timer/queue-timer-data-alsa: remove unused gobject classes
Takashi Sakamoto [Wed, 1 Jun 2022 02:35:44 +0000 (11:35 +0900)]
seq: queue-timer/queue-timer-data-alsa: remove unused gobject classes

The former commit made some gobject classes as unused. This commit deletes
them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: user-client: use QueueTimerCommon interface instead of QueueTimer
Takashi Sakamoto [Wed, 1 Jun 2022 02:35:44 +0000 (11:35 +0900)]
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: queue-timer-alsa: add class for queue timer specialized to ALSA Timer
Takashi Sakamoto [Wed, 1 Jun 2022 02:35:44 +0000 (11:35 +0900)]
seq: queue-timer-alsa: add class for queue timer specialized to ALSA Timer

One of the backend timer for queue is an instance of timer in ALSA Timer.

This commit adds gobject class for the type of queue timer. It has two
properties; the identifier of timer and the count of ticks as resolution.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoseq: queue-timer-common: add common interface for queue timer
Takashi Sakamoto [Wed, 1 Jun 2022 02:35:44 +0000 (11:35 +0900)]
seq: queue-timer-common: add common interface for queue timer

In UAPI of ALSA Sequencer, queue timer is expressed by union to support
several types of backend timer.

This commit adds common interface for the timer. It should implements
two properties; the identifier of queue and the type of timer.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agodoc: seq: fix URL to document for ALSATimer
Takashi Sakamoto [Wed, 1 Jun 2022 02:35:44 +0000 (11:35 +0900)]
doc: seq: fix URL to document for ALSATimer

Fixes: ed3138613655 ("doc: change URL for help pages")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-info: remove unused classes
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
ctl: elem-info: remove unused classes

Some gobject classes are now unused. This commit deletes them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: card: use ALSACtl.ElemInfoCommon instead of ElemInfo
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-info-enumerated: add class for element information of enumerated type
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
ctl: elem-info-enumerated: add class for element information of enumerated type

The element information of enumerated type delivers an additional property
for indexed string labels.

This commit adds gobject class for the information.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-info-integer64: add class for element information of integer64 type
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-info-integer: add class for element information of integer type
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-info-bytes: add class for element information of bytes type
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
ctl: elem-info-bytes: add class for element information of bytes type

Nothing specific.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-info-boolean: add class for element information of boolean type
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
ctl: elem-info-boolean: add class for element information of boolean type

Nothing specific.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-info-single-array: add interface for single array element information
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
ctl: elem-info-single-array: add interface for single array element information

The most type of element has value array. The count of elements in the
array is expressed as count in structure.

This commit adds gobject interface for the type of information. It should
implements one property; the count of elements.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-info-iec60958: add class for element information of IEC60958 type
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: elem-info-common: add common interface for element information
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agoctl: card: add error path when generating name list at element addition
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
ctl: card: add error path when generating name list at element addition

Current implementation of ALSA control core has limitation of name list
when adding or replacing element set.

This commit adds error path when being over the limitation

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
3 years agofix missing usage of declaration macro
Takashi Sakamoto [Thu, 2 Jun 2022 09:26:26 +0000 (18:26 +0900)]
fix missing usage of declaration macro

The header for enumerations should include declaration macro.

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