[alsa-devel] Restart alsa-gi project as alsa-gobject project
Hi Jaroslav,
Since Audio Mini Conference 2018, I continued to work for alsa-gi[1] in my local to integrate toward better I/O libraries. However I realized that its basic design includes some disadvantages to produce useful APIs.
I rethink the design and realize it better to wrap each of structures in <sound/asound.h> simply. Then, I restart it as alsa-gobject[2]. At present, master branch includes a library, `libalsactl0` for the most of I/O features in ALSA control interface, which is compatible with GObject mechanism and GObject introspection.
Jaroslav, would you please delete the alsa-gi repository and fork the master branch from my alsa-gobject repository, then apply enough configurations to the new repository?
My repository includes four branches as well for ALSA hwdep/rawmidi/timer/seq interfaces. The most of features in each interface is already available via included libraries but under heavy development.
I already start to test them with Python 3 (PyGObject) and they seem work well. I also test them with Rust bindings generated by gtk-rs/gir[3] tool. Near future I also publish Rust crates for further convenience.
For your interests, this Python 3 script is a sample to listen one event from ALSA control character device. This simple program is not terminated voluntarily or by sending UNIX signal, thus please generate control event by alsamixer or amixer:
``` #!/usr/bin/env python3
import gi gi.require_version('GLib', '2.0') gi.require_version('ALSACtl', '0.0') from gi.repository import GLib, ALSACtl
class MyCard(ALSACtl.Card): def __init__(self, card_id, ctx, dispatcher): super().__init__() self.open(card_id)
self.create_source().attach(ctx)
self.__dispatcher = dispatcher
def do_handle_disconnection(self): self.__dispatcher.quit()
def do_handle_elem_event(self, elem_id, events): # Print the first event and quit event loop. print(elem_id.get_iface().value_nick, elem_id.get_device_id(), elem_id.get_subdevice_id(), elem_id.get_name(), elem_id.get_index(), events.value_nicks) self.__dispatcher.quit()
ctx = GLib.MainContext.new() dispatcher = GLib.MainLoop.new(ctx, False) card = MyCard(0, ctx, dispatcher)
dispatcher.run() ```
[1] https://github.com/alsa-project/alsa-gi [2] https://github.com/takaswie/alsa-gobject [3] https://github.com/gtk-rs/gir
Regards
Takashi Sakamoto
Hi Jaroslav,
On Sun, Dec 01, 2019 at 05:04:50PM +0900, Takashi Sakamoto wrote:
Since Audio Mini Conference 2018, I continued to work for alsa-gi[1] in my local to integrate toward better I/O libraries. However I realized that its basic design includes some disadvantages to produce useful APIs.
I rethink the design and realize it better to wrap each of structures in <sound/asound.h> simply. Then, I restart it as alsa-gobject[2]. At present, master branch includes a library, `libalsactl0` for the most of I/O features in ALSA control interface, which is compatible with GObject mechanism and GObject introspection.
Jaroslav, would you please delete the alsa-gi repository and fork the master branch from my alsa-gobject repository, then apply enough configurations to the new repository?
My repository includes four branches as well for ALSA hwdep/rawmidi/timer/seq interfaces. The most of features in each interface is already available via included libraries but under heavy development.
I already start to test them with Python 3 (PyGObject) and they seem work well. I also test them with Rust bindings generated by gtk-rs/gir[3] tool. Near future I also publish Rust crates for further convenience.
For your interests, this Python 3 script is a sample to listen one event from ALSA control character device. This simple program is not terminated voluntarily or by sending UNIX signal, thus please generate control event by alsamixer or amixer:
#!/usr/bin/env python3 import gi gi.require_version('GLib', '2.0') gi.require_version('ALSACtl', '0.0') from gi.repository import GLib, ALSACtl class MyCard(ALSACtl.Card): def __init__(self, card_id, ctx, dispatcher): super().__init__() self.open(card_id) self.create_source().attach(ctx) self.__dispatcher = dispatcher def do_handle_disconnection(self): self.__dispatcher.quit() def do_handle_elem_event(self, elem_id, events): # Print the first event and quit event loop. print(elem_id.get_iface().value_nick, elem_id.get_device_id(), elem_id.get_subdevice_id(), elem_id.get_name(), elem_id.get_index(), events.value_nicks) self.__dispatcher.quit() ctx = GLib.MainContext.new() dispatcher = GLib.MainLoop.new(ctx, False) card = MyCard(0, ctx, dispatcher) dispatcher.run()
[1] https://github.com/alsa-project/alsa-gi [2] https://github.com/takaswie/alsa-gobject [3] https://github.com/gtk-rs/gir
Would I expect your arrangement for this project, or should I continue to develop it apart from alsa-project?
Regards
Takashi Sakamoto
Dne 04. 12. 19 v 1:33 Takashi Sakamoto napsal(a):
Hi Jaroslav,
On Sun, Dec 01, 2019 at 05:04:50PM +0900, Takashi Sakamoto wrote:
Since Audio Mini Conference 2018, I continued to work for alsa-gi[1] in my local to integrate toward better I/O libraries. However I realized that its basic design includes some disadvantages to produce useful APIs.
I rethink the design and realize it better to wrap each of structures in <sound/asound.h> simply. Then, I restart it as alsa-gobject[2]. At present, master branch includes a library, `libalsactl0` for the most of I/O features in ALSA control interface, which is compatible with GObject mechanism and GObject introspection.
Jaroslav, would you please delete the alsa-gi repository and fork the master branch from my alsa-gobject repository, then apply enough configurations to the new repository?
My repository includes four branches as well for ALSA hwdep/rawmidi/timer/seq interfaces. The most of features in each interface is already available via included libraries but under heavy development.
I already start to test them with Python 3 (PyGObject) and they seem work well. I also test them with Rust bindings generated by gtk-rs/gir[3] tool. Near future I also publish Rust crates for further convenience.
For your interests, this Python 3 script is a sample to listen one event from ALSA control character device. This simple program is not terminated voluntarily or by sending UNIX signal, thus please generate control event by alsamixer or amixer:
#!/usr/bin/env python3 import gi gi.require_version('GLib', '2.0') gi.require_version('ALSACtl', '0.0') from gi.repository import GLib, ALSACtl class MyCard(ALSACtl.Card): def __init__(self, card_id, ctx, dispatcher): super().__init__() self.open(card_id) self.create_source().attach(ctx) self.__dispatcher = dispatcher def do_handle_disconnection(self): self.__dispatcher.quit() def do_handle_elem_event(self, elem_id, events): # Print the first event and quit event loop. print(elem_id.get_iface().value_nick, elem_id.get_device_id(), elem_id.get_subdevice_id(), elem_id.get_name(), elem_id.get_index(), events.value_nicks) self.__dispatcher.quit() ctx = GLib.MainContext.new() dispatcher = GLib.MainLoop.new(ctx, False) card = MyCard(0, ctx, dispatcher) dispatcher.run()
[1] https://github.com/alsa-project/alsa-gi [2] https://github.com/takaswie/alsa-gobject [3] https://github.com/gtk-rs/gir
Would I expect your arrangement for this project, or should I continue to develop it apart from alsa-project?
You're the only developer for this thus I'll shift the repos in the ALSA project on github. You should also write to README that this project is not using alsa-lib, thus the extra abstraction interfaces from alsa-lib cannot be used. Or do you plan to build gobjects on top of alsa-lib, too?
Thanks, Jaroslav
Regards
Takashi Sakamoto
Hi Jaroslav,
On Wed, Dec 04, 2019 at 10:10:49AM +0100, Jaroslav Kysela wrote:
Dne 04. 12. 19 v 1:33 Takashi Sakamoto napsal(a):
Would I expect your arrangement for this project, or should I continue to develop it apart from alsa-project?
You're the only developer for this thus I'll shift the repos in the ALSA project on github. You should also write to README that this project is not using alsa-lib, thus the extra abstraction interfaces from alsa-lib cannot be used. Or do you plan to build gobjects on top of alsa-lib, too?
Mmm. I guess that there's miscommunication about the design of alsa-gi project at first place. I remember you were not at the same room in the audio mini conf.
The original alsa-gi is independent of alsa-lib[1]. This has been immutable since I mentioned about the project in the audio miniconf[2], thus alsa-gobject is just on <sound/asound.h> and <sound/asequencer.h> as well. The project is thin layer between produced API and character devices for applications to execute I/O as easy as possible. This point is important to write tests and to implement some ctl/sequencer drivers in userland.
For the design, at present, I have no plan to be on alsa-lib. Especially, the combination of configuration space and domain specific language is not surely supported. The below features of alsa-lib are not supported by alsa-gobject:
* text files for configuration space * parser of domain specific language * plug-in mechanism for all interfaces * hctrl interface * mixer interface and sctl plug-in mechanism * plug-in SDK for pcm/ctl interfaces
I think it possible to implement the equivalents by high-level programming languages as well as the below features:
* Parser/builder for Type-Length-Value array for ctl interface * Converter between MIDI messages and ALSA sequencer events * topology interface * ucm interface
But at present my concern is I/O between user/kernel space, thus I have no plan to work for the above items now, except for TLV parser/builder.
[1] You can find no strings for 'alsa-lib' in meson.build. https://github.com/takaswie/alsa-gi/blob/master/src/meson.build [2] https://github.com/takaswie/presentations/blob/master/20181021/contents.md#m...
Regards
Takashi Sakamoto
Dne 01. 12. 19 v 9:04 Takashi Sakamoto napsal(a):
Hi Jaroslav,
Since Audio Mini Conference 2018, I continued to work for alsa-gi[1] in my local to integrate toward better I/O libraries. However I realized that its basic design includes some disadvantages to produce useful APIs.
I rethink the design and realize it better to wrap each of structures in <sound/asound.h> simply. Then, I restart it as alsa-gobject[2]. At present, master branch includes a library, `libalsactl0` for the most of I/O features in ALSA control interface, which is compatible with GObject mechanism and GObject introspection.
Jaroslav, would you please delete the alsa-gi repository and fork the master branch from my alsa-gobject repository, then apply enough configurations to the new repository?
Hi Takashi,
I am sorry that it took so long but I was really busy with other things. The alsa-gobject repository is set, synced with git.alsa-project.org now like other repos. The settings should be similar to alsa-gi, so you should have write permissions. If you hit any issue, just let me know.
The original alsa-gi repository was archived and I will remove it later.
There is only one difference - I did not clone this repo from yours via github. It might make sense, if you fork the alsa-project repo to your github repository and push your changes back (alsa-project/alsa-gobject -> takaswie/alsa-gobject), so the fork link system on github will be updated properly.
Thank you, Jaroslav
Hi Jaroslav,
On Fri, Dec 13, 2019 at 12:17:12PM +0100, Jaroslav Kysela wrote:
Dne 01. 12. 19 v 9:04 Takashi Sakamoto napsal(a):
Hi Jaroslav,
Since Audio Mini Conference 2018, I continued to work for alsa-gi[1] in my local to integrate toward better I/O libraries. However I realized that its basic design includes some disadvantages to produce useful APIs.
I rethink the design and realize it better to wrap each of structures in <sound/asound.h> simply. Then, I restart it as alsa-gobject[2]. At present, master branch includes a library, `libalsactl0` for the most of I/O features in ALSA control interface, which is compatible with GObject mechanism and GObject introspection.
Jaroslav, would you please delete the alsa-gi repository and fork the master branch from my alsa-gobject repository, then apply enough configurations to the new repository?
Hi Takashi,
I am sorry that it took so long but I was really busy with other things. The alsa-gobject repository is set, synced with git.alsa-project.org now like other repos. The settings should be similar to alsa-gi, so you should have write permissions. If you hit any issue, just let me know.
The original alsa-gi repository was archived and I will remove it later.
There is only one difference - I did not clone this repo from yours via github. It might make sense, if you fork the alsa-project repo to your github repository and push your changes back (alsa-project/alsa-gobject -> takaswie/alsa-gobject), so the fork link system on github will be updated properly.
Thanks for your arrangement against the busy week ;) According to your instruction, I update my remote repository for the link system. My remote alsa-gi repository is also private now and will be removed enough later.
Here excuse me for request you another work for documentation of alsa-gobject. I utilize glib/gobject architecture developed by GNOME project for gtk+. Documentation can be automatically generated by gtk-doc. I'd like to publish the documentation in github pages[1]. I'd like you to add another repository to maintain the publish the documentation.
You can see an actual example of documentation for libhinawa. The documentation is available in URL of github.io, and published documents are maintained in my remote repository[3].
But this is not a kind of urgent work. I'm OK that you make it enough later ;)
[1] https://pages.github.com/ [2] https://takaswie.github.io/libhinawa-docs/ [3] https://github.com/takaswie/libhinawa-docs
Thanks
Takashi Sakamoto
Dne 14. 12. 19 v 17:52 Takashi Sakamoto napsal(a):
Hi Jaroslav,
On Fri, Dec 13, 2019 at 12:17:12PM +0100, Jaroslav Kysela wrote:
Dne 01. 12. 19 v 9:04 Takashi Sakamoto napsal(a):
Hi Jaroslav,
Since Audio Mini Conference 2018, I continued to work for alsa-gi[1] in my local to integrate toward better I/O libraries. However I realized that its basic design includes some disadvantages to produce useful APIs.
I rethink the design and realize it better to wrap each of structures in <sound/asound.h> simply. Then, I restart it as alsa-gobject[2]. At present, master branch includes a library, `libalsactl0` for the most of I/O features in ALSA control interface, which is compatible with GObject mechanism and GObject introspection.
Jaroslav, would you please delete the alsa-gi repository and fork the master branch from my alsa-gobject repository, then apply enough configurations to the new repository?
Hi Takashi,
I am sorry that it took so long but I was really busy with other things. The alsa-gobject repository is set, synced with git.alsa-project.org now like other repos. The settings should be similar to alsa-gi, so you should have write permissions. If you hit any issue, just let me know.
The original alsa-gi repository was archived and I will remove it later.
There is only one difference - I did not clone this repo from yours via github. It might make sense, if you fork the alsa-project repo to your github repository and push your changes back (alsa-project/alsa-gobject -> takaswie/alsa-gobject), so the fork link system on github will be updated properly.
Thanks for your arrangement against the busy week ;) According to your instruction, I update my remote repository for the link system. My remote alsa-gi repository is also private now and will be removed enough later.
Here excuse me for request you another work for documentation of alsa-gobject. I utilize glib/gobject architecture developed by GNOME project for gtk+. Documentation can be automatically generated by gtk-doc. I'd like to publish the documentation in github pages[1]. I'd like you to add another repository to maintain the publish the documentation.
You can see an actual example of documentation for libhinawa. The documentation is available in URL of github.io, and published documents are maintained in my remote repository[3].
But this is not a kind of urgent work. I'm OK that you make it enough later ;)
I created the new docs repo:
https://github.com/alsa-project/alsa-gobject-docs
You should have the admin access for this repository, too.
Thanks, Jaroslav
Hi Jaroslav,
On Wed, Dec 18, 2019 at 08:20:44PM +0100, Jaroslav Kysela wrote:
Here excuse me for request you another work for documentation of alsa-gobject. I utilize glib/gobject architecture developed by GNOME project for gtk+. Documentation can be automatically generated by gtk-doc. I'd like to publish the documentation in github pages[1]. I'd like you to add another repository to maintain the publish the documentation.
You can see an actual example of documentation for libhinawa. The documentation is available in URL of github.io, and published documents are maintained in my remote repository[3].
But this is not a kind of urgent work. I'm OK that you make it enough later ;)
I created the new docs repo:
https://github.com/alsa-project/alsa-gobject-docs
You should have the admin access for this repository, too.
Thanks for your addition of the above repository. I upload generated documentation and it's available in URL below:
https://alsa-project.github.io/alsa-gobject-docs/
For alsa-gobject repository, I file two PRs for improvements: * https://github.com/alsa-project/alsa-gobject/pull/1 * https://github.com/alsa-project/alsa-gobject/pull/2
I'm glad if you grant these requests and merge. Or would I merge them by myself? I think that we have no concrete policy to maintain the repository.
Regards
Takashi Sakamoto
Dne 22. 12. 19 v 9:04 Takashi Sakamoto napsal(a):
Hi Jaroslav,
On Wed, Dec 18, 2019 at 08:20:44PM +0100, Jaroslav Kysela wrote:
Here excuse me for request you another work for documentation of alsa-gobject. I utilize glib/gobject architecture developed by GNOME project for gtk+. Documentation can be automatically generated by gtk-doc. I'd like to publish the documentation in github pages[1]. I'd like you to add another repository to maintain the publish the documentation.
You can see an actual example of documentation for libhinawa. The documentation is available in URL of github.io, and published documents are maintained in my remote repository[3].
But this is not a kind of urgent work. I'm OK that you make it enough later ;)
I created the new docs repo:
https://github.com/alsa-project/alsa-gobject-docs
You should have the admin access for this repository, too.
Thanks for your addition of the above repository. I upload generated documentation and it's available in URL below:
https://alsa-project.github.io/alsa-gobject-docs/
For alsa-gobject repository, I file two PRs for improvements:
- https://github.com/alsa-project/alsa-gobject/pull/1
- https://github.com/alsa-project/alsa-gobject/pull/2
I'm glad if you grant these requests and merge. Or would I merge them by myself? I think that we have no concrete policy to maintain the repository.
Could you keep to maintain this repository? You should have all rights set on github.
Thank you, Jaroslav
Hi Jaroslav,
On Wed, Dec 25, 2019 at 12:11:29PM +0100, Jaroslav Kysela wrote:
For alsa-gobject repository, I file two PRs for improvements:
- https://github.com/alsa-project/alsa-gobject/pull/1
- https://github.com/alsa-project/alsa-gobject/pull/2
I'm glad if you grant these requests and merge. Or would I merge them by myself? I think that we have no concrete policy to maintain the repository.
Could you keep to maintain this repository? You should have all rights set on github.
Thanks for your arrangement. I merged the PRs.
Well, now I'm working for userspace services to add/maintain control elements for sound cards bound to audio and music units on IEEE 1394 bus. The services listen application's events from ALSA control character device to control internal DSP on the units. The services are programmed with libraries of alsa-gobject and libhinawa by Rust languages. For this work, I generate Rust crates for these libraries by gtk-rs/gir[1].
Next year, I'd like to add repositories for the crates, listed below:
* alsa-gobject-rs-sys * sys crates for libraries in alsa-gobject * alsactl-rs * safe API crate for libalsactl0 * alsaseq-rs * safe API crate for libalsaseq0
Additionally, I'll push libhinawa v2 release to GObject Introspection team of github.com/alsa-project and corresponding Rust crates. Thus below repositories will be added:
* libhinawa * hinawa-rs-sys * sys crate for libhinawa2 * hinawa-rs * safe API crate for libhinawa2
I'm glad if you accept my proposal for the above repositories next year. Have a great holidays.
[1] https://github.com/gtk-rs/gir
Takashi Sakamoto
participants (2)
-
Jaroslav Kysela
-
Takashi Sakamoto