timer: optimize to gi-docgen 2024.1 or later, approximately
As long as building with gi-docgen 2025.3.1 in Ubuntu 25.04, some
annotations for SlaveClass become invalid and causes some warnings.
/usr/bin/gi-docgen generate --no-namespace-dir --config=doc/timer/alsatimer.toml --output-dir=doc/timer/alsatimer --content-dir=/home/mocchi/git/alsa-project.org/alsa-gobject/doc/timer src/timer/ALSATimer-0.0.gir
WARNING: Unknown namespace SlaveClass
slave_id. If the slave_class is [enum@SlaveClass.APPLICATION], the slave_id is for the PID of
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING: Unknown namespace SlaveClass
[enum@SlaveClass.SEQUENCER], the slave_id is the numeric ID of queue bound for timer device.
^~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING: Unknown namespace SlaveClass
slave_id. If the slave_class is [enum@SlaveClass.APPLICATION], the slave_id is for the PID of
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING: Unknown namespace SlaveClass
[enum@SlaveClass.SEQUENCER], the slave_id is the numeric ID of queue bound for timer device.
^~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING: Unknown namespace SlaveClass
slave_id. If the slave_class is [enum@SlaveClass.APPLICATION], the slave_id is for the PID of
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING: Unknown namespace SlaveClass
[enum@SlaveClass.SEQUENCER], the slave_id is the numeric ID of queue bound for timer device.
^~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit suppresses the warnings by using the pattern of enum@class.
seq: fix return value when failing devnode detection of ALSA Sequencer character device
When failing detecting devnode of ALSA Sequencer character device, the
helper function returns negative value to the callers. This is overlooked
in the previous code refactoring. It should return FALSE.
This bug brings the following compiler warnings:
../src/seq/query.c: In function ‘alsaseq_get_system_info’:
../src/seq/query.c:113:9: warning: ‘fd’ may be used uninitialized [-Wmaybe-uninitialized]
113 | if (ioctl(fd, SNDRV_SEQ_IOCTL_SYSTEM_INFO, info) < 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/seq/query.c:101:9: note: ‘fd’ was declared here
101 | int fd;
|
This commit fixes the bug.
Fixes: 31eb1a62345c ("seq: query: rewrite public API to return gboolean according to GNOME convention") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
timer: fix return value when failing devnode detection of ALSA Timer character device
When failing detecting devnode of ALSA Timer character device, the helper
function returns negative value to the callers. This is overlooked in the
previous code refactoring. It should return FALSE.
This bug brings the following compiler warnings:
../src/timer/query.c: In function ‘alsatimer_get_device_id_list’:
../src/timer/query.c:122:13: warning: ‘fd’ may be used uninitialized [-Wmaybe-uninitialized]
122 | if (ioctl(fd, SNDRV_TIMER_IOCTL_NEXT_DEVICE, &id) < 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/timer/query.c:109:9: note: ‘fd’ was declared here
109 | int fd;
| ^~
This commit fixes the bug.
Fixes: 487c67a62e99 ("timer: query: rewrite public API to return gboolean according to GNOME convention") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Takashi Sakamoto [Fri, 15 Mar 2024 06:15:36 +0000 (15:15 +0900)]
seq: optimize to gi-docgen 2023.3
The version of gi-docgen applies the restrict rule for the version
expression. In the rule, the dot following to the number causes failure.
This commit fixes the failure.
Takashi Sakamoto [Fri, 15 Mar 2024 06:15:20 +0000 (15:15 +0900)]
hwdep: optimize to gi-docgen 2023.3
The version of gi-docgen applies the restrict rule for the version
expression. In the rule, the dot following to the number causes failure.
This commit fixes the failure.
Takashi Sakamoto [Fri, 15 Mar 2024 06:14:53 +0000 (15:14 +0900)]
ctl: optimize to gi-docgen 2023.3
The version of gi-docgen applies the restrict rule for the version
expression. In the rule, the dot following to the number causes failure.
This commit fixes the failure.
Takashi Sakamoto [Fri, 15 Mar 2024 06:01:53 +0000 (15:01 +0900)]
ci: use actions/checkout@v4
To suppress the following warning in github actions:
Node.js 16 actions are deprecated. Please update the following actions to
use Node.js 20: actions/checkout@v3. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Michele Perrone [Thu, 17 Aug 2023 11:13:04 +0000 (13:13 +0200)]
Fix 'errno undeclared' compile error with older gcc versions
It looks like errno.h has to be included explicitly when compiling with older
gcc versions. This issue was encountered on the following system:
- Ubuntu 20.04 LTS
- Linux 5.4.0-156
- gcc 10.5.0
- Meson 0.53.2
Takashi Sakamoto [Mon, 12 Dec 2022 07:39:12 +0000 (16:39 +0900)]
all: remove annotation from error domain
As I fixed gi-docgen at 6c690567b6b ("utils: fix failure to generate
link to error domain"), gi-docgen release of 2022.2 brings loss of
backward compatibility about annotation for error domain.
This commit is a workaround for successful build either in 2022.1 or
former releases and in 2022.2 or later releases of gi-docgen. When
gi-docgen 2022.2 disseminates vastly, the annotation will be back.
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.
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.
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.
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.