add support for i386 build job to workflow of Github Actions
In lxd repository for Ubuntu Cloud Images[1], Ubuntu i386 container
is available for applications of Intel386 ABI.
This commit uses the container to test build for Intel386 ABI in
workflow of Github Actions.
I note that no official Fedora i386 container is in dockerhub
registry[2]. It's needed to find the way to build application for
Intel386 ABI on AMD64 architecture (perhaps multiarch) if we are
going to support it.
Takashi Sakamoto [Mon, 10 Feb 2020 12:20:41 +0000 (21:20 +0900)]
timer: user-instance: delegate decision of poll timeout into application
As long as using the created Gsource with GMainContext, the call of poll(2)
system call with infinite timeout surely returns when quit() method is
called for the context. All of GMainContext implements GWakeup with eventfd
and the call of quit() emits event via file descriptor of eventfd. This
brings wakeup from blocking when poll(2) is called with inifinite timeout.
This means that it's necessarily need to have explicit timeout internally.
This commit removes implementation of GSourceFunc.prepare for the reason.
Takashi Sakamoto [Mon, 10 Feb 2020 12:20:17 +0000 (21:20 +0900)]
ctl: card: delegate decision of poll timeout into application
As long as using the created Gsource with GMainContext, the call of poll(2)
system call with infinite timeout surely returns when quit() method is
called for the context. All of GMainContext implements GWakeup with eventfd
and the call of quit() emits event via file descriptor of eventfd. This
brings wakeup from blocking when poll(2) is called with inifinite timeout.
This means that it's necessarily need to have explicit timeout internally.
This commit removes implementation of GSourceFunc.prepare for the reason.
Takashi Sakamoto [Mon, 10 Feb 2020 08:04:09 +0000 (17:04 +0900)]
timer: user-instance: add an argument for open(2) flag into API to open ALSA timer character device
As long as using the created Gsource with GMainContext, the call of poll(2)
system call with infinite timeout surely returns when quit() method is
called for the context. All of GMainContext implements GWakeup with eventfd
and the call of quit() emits event via file descriptor of eventfd. This
brings wakeup from blocking when poll(2) is called with inifinite timeout.
This means that it's safe for event polling without O_NONBLOCK.
On the other hand, there are many options for file descriptors; e.g.
O_APPEND and O_CLOEXEC. For the case, glib framework has no support.
Takashi Sakamoto [Mon, 10 Feb 2020 08:02:03 +0000 (17:02 +0900)]
ctl: card: add an argument for open(2) flag into API to open ALSA control character device
As long as using the created Gsource with GMainContext, the call of poll(2)
system call with infinite timeout surely returns when quit() method is
called for the context. All of GMainContext implements GWakeup with eventfd
and the call of quit() emits event via file descriptor of eventfd. This
brings wakeup from blocking when poll(2) is called with inifinite timeout.
This means that it's safe for event polling without O_NONBLOCK.
On the other hand, there are many options for file descriptors; e.g.
O_APPEND and O_CLOEXEC. For the case, glib framework has no support.
fix workflow of Github Actions to clone requested repository
Even if any pull request is triggered, in 'build_in_ubuntu_on_lxd' job
of 'Build test' workflow, upstream repository is cloned and requested
git hash is checked out. However this fails because the hash is in
requested repository.
This commit fixes the workflow so that requested repository is cloned.
Fixes: 8cb6715aab65 ('Add support workflow of Github Actions') Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Takashi Sakamoto [Fri, 31 Jan 2020 14:05:40 +0000 (23:05 +0900)]
Add support workflow of Github Actions
Github Actions is tool to automate software development workflows for CI/CD.
This tool has a remarkable point to share 'action' in repositories in github,
which is a unit of processing defined by users. The users write and push
'workflow' with the 'action' into repository in github.com. When any workflow
file is added to 'default' branch, the automation runs[2].
The defined actions run on virtual machine in Microsoft Azure (Standard_DS2_v2
as of today[2]). Three types of operating system are available: Windows, MacOS
and Linux (Ubuntu). On the MacOS and Linux machine, 'sudo' is available to
setup host environment for CI/CD, as well as Docker container is supported on
the host.
This commit adds a workflow file to automate build test. In this automation,
Fedora 32 in Docker container and Ubuntu 19.10 in LXD container as build
environments in Linux host. The automation is triggered in each 'push' and
'pull_request' event. The result is available in 'Actions' tab of repository
page in github.com.
Takashi Sakamoto [Sun, 12 Jan 2020 04:33:14 +0000 (13:33 +0900)]
ctl: fix wrong operation for values in enumerated type of element
The 'snd_ctl_elem_value' structure includes union member for values.
Although it includes 'enumerated' member for values in enumerated type
of element, current implementation of alsactl library uses 'integer'
member to pick up the values. As a result, in any 64 bit System V ABI,
the library fails to get/set values for the enumerated type of
element. This commit fixes the bug.
Takashi Sakamoto [Mon, 30 Dec 2019 03:01:55 +0000 (12:01 +0900)]
ctl: simplify event dispatching for element event
Formerly, GSource for card includes the list of ALSACtlElemId instances
since 'snd_ctl_elem_id' structure was wrapped by GObject class object.
However now it's GObject boxed object and emit signals without the class
object.
This commit removes useless list of ALSACtlElemId and dispatch the event
directly.
Takashi Sakamoto [Mon, 30 Dec 2019 00:31:12 +0000 (09:31 +0900)]
ctl: rename element event mask
The 'snd_ctl_event' structure can be defined to deliver several types of
events. One of the event is for element and it includes bitflags of the
kind of event for the element. In this library, the bitflag is named so
that it represents generic event, however it should be something
specific to element event.