Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH 0/5] seq: add interface for queue timer #72

Merged
merged 5 commits into from
Jun 2, 2022

Conversation

takaswie
Copy link
Member

@takaswie takaswie commented Jun 1, 2022

Current implementation uses function of QueueTimer to retrieve data for variants of
queue timer, however it's not enough convenient in the case of language bindings.
The usage of GObject.Value in object property is expected to be supported widely
instead.

This patchset uses object classes derived from GObject to express the variants.
The common properties are expressed by QueueTimerCommon interface. The
ALSATimer variant is currently supported to implement the interface.

Takashi Sakamoto (5):
  doc: seq: fix URL to document for ALSATimer
  seq: queue-timer-common: add common interface for queue timer
  seq: queue-timer-alsa: add class for queue timer specialized to ALSA Timer
  seq: user-client: use QueueTimerCommon interface instead of QueueTimer
  seq: queue-timer/queue-timer-data-alsa: remove unused gobject classes

 doc/seq/alsaseq.toml.in                       |   2 +-
 doc/seq/urlmap.js                             |   2 +-
 src/seq/alsaseq.h                             |   5 +-
 src/seq/alsaseq.map                           |  16 +-
 src/seq/meson.build                           |   8 +-
 src/seq/privates.h                            |  21 ++-
 src/seq/queue-timer-alsa.c                    | 134 +++++++++++++++++
 src/seq/queue-timer-alsa.h                    |  22 +++
 src/seq/queue-timer-common.c                  |  87 +++++++++++
 src/seq/queue-timer-common.h                  |  20 +++
 src/seq/queue-timer-data-alsa.c               |  76 ----------
 src/seq/queue-timer-data-alsa.h               |  32 ----
 src/seq/queue-timer.c                         | 138 ------------------
 src/seq/queue-timer.h                         |  26 ----
 src/seq/user-client.c                         |  42 +++---
 src/seq/user-client.h                         |   4 +-
 ...q-queue-timer => alsaseq-queue-timer-alsa} |   8 +-
 tests/meson.build                             |   2 +-
 18 files changed, 325 insertions(+), 320 deletions(-)
 create mode 100644 src/seq/queue-timer-alsa.c
 create mode 100644 src/seq/queue-timer-alsa.h
 create mode 100644 src/seq/queue-timer-common.c
 create mode 100644 src/seq/queue-timer-common.h
 delete mode 100644 src/seq/queue-timer-data-alsa.c
 delete mode 100644 src/seq/queue-timer-data-alsa.h
 delete mode 100644 src/seq/queue-timer.c
 delete mode 100644 src/seq/queue-timer.h
 rename tests/{alsaseq-queue-timer => alsaseq-queue-timer-alsa} (76%)

Fixes: ed31386 ("doc: change URL for help pages")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
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>
…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>
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>
The former commit made some gobject classes as unused. This commit deletes
them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
@takaswie takaswie added the enhancement New feature or request label Jun 1, 2022
@takaswie takaswie requested a review from a team June 1, 2022 03:07
@takaswie takaswie self-assigned this Jun 1, 2022
@takaswie takaswie merged commit 3a0aab0 into master Jun 2, 2022
@takaswie takaswie deleted the topic/seq-queue-timer-iface branch June 2, 2022 09:33
@takaswie
Copy link
Member Author

takaswie commented Jun 2, 2022

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant