{"id":22654000,"url":"https://github.com/alsa-project/libhinawa","last_synced_at":"2025-04-12T04:12:23.912Z","repository":{"id":20365499,"uuid":"23640770","full_name":"alsa-project/libhinawa","owner":"alsa-project","description":"Mirror of https://git.kernel.org/pub/scm/libs/ieee1394/libhinawa.git for user support and continuous integration. I/O library for IEEE 1394 asynchronous transactions to/from units on the bus, with GObject Introspection.","archived":false,"fork":false,"pushed_at":"2024-09-28T01:02:46.000Z","size":1363,"stargazers_count":7,"open_issues_count":0,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-12T04:12:16.491Z","etag":null,"topics":["alsa","c","gobject-introspection","ieee1394","linux","meson"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alsa-project.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-03T23:03:01.000Z","updated_at":"2024-09-28T01:02:48.000Z","dependencies_parsed_at":"2023-10-01T09:23:18.218Z","dependency_job_id":"e6266b70-6449-4f90-93dd-ba1ddc72546d","html_url":"https://github.com/alsa-project/libhinawa","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsa-project%2Flibhinawa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsa-project%2Flibhinawa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsa-project%2Flibhinawa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsa-project%2Flibhinawa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alsa-project","download_url":"https://codeload.github.com/alsa-project/libhinawa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514205,"owners_count":21116903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alsa","c","gobject-introspection","ieee1394","linux","meson"],"created_at":"2024-12-09T09:31:57.069Z","updated_at":"2025-04-12T04:12:23.889Z","avatar_url":"https://github.com/alsa-project.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"=====================\nThe libhinawa project\n=====================\n\n2024/04/06\nTakashi Sakamoto\n\nInstruction\n===========\n\nI design the library for userspace application to send asynchronous transaction to node in\nIEEE 1394 bus and to handle asynchronous transaction initiated by the node. The library is\nitself an application of Linux FireWire subsystem,\n`GLib and GObject \u003chttps://gitlab.gnome.org/GNOME/glib\u003e`_.\n\nThe library had originally included some helper object classes for model-specific functions\nvia ALSA HwDep character device added by drivers in ALSA firewire stack. The object classes have\nbeen already obsoleted and deligated the functions to\n`libhitaki \u003chttps://github.com/alsa-project/libhitaki\u003e`_, while are still kept for backward\ncompatibility. They should not be used for applications written newly.\n\nThe latest release is `4.0.2 \u003chttps://git.kernel.org/pub/scm/libs/ieee1394/libhinawa.git/tag/?h=4.0.2\u003e`_.\nThe package archive is available in `\u003chttps://kernel.org/pub/linux/libs/ieee1394/\u003e`_ with detached\nsignature created by `my GnuPG key \u003chttps://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/tree/keys/B5A586C7D66FD341.asc\u003e`_.\nI note that version 3 release is skipped to use the same major version in library itself and\nGObject Introspection (g-i) metadata.\n\nLicense\n=======\n\n- GNU Lesser General Public License version 2.1 or later\n\nDocumentation\n=============\n\n- `\u003chttps://alsa-project.github.io/gobject-introspection-docs/hinawa/\u003e`_\n\nRepository location\n===================\n\n- Upstream is `\u003chttps://git.kernel.org/pub/scm/libs/ieee1394/libhinawa.git/\u003e`_.\n* Mirror at `\u003chttps://github.com/alsa-project/libhinawa\u003e`_ for user support and continuous\n  integration.\n\nDependencies\n============\n\n- Glib 2.44.0 or later\n- GObject Introspection 1.32.1 or later\n- Linux kernel 3.12 or later\n\nRequirements to build\n=====================\n\n- Meson 0.60.0 or later\n- Ninja\n- PyGObject (optional to run unit tests)\n- gi-docgen 2023.1 or later (optional to generate API documentation)\n\nHow to build\n============\n\n::\n\n    $ meson setup (--prefix=directory-to-install) build\n    $ meson compile -C build\n    $ meson install -C build\n    ($ meson test -C build)\n\nWhen working with gobject-introspection, ``Hinawa-4.0.typelib`` should be\ninstalled in your system girepository so that ``libgirepository`` can find\nit. Of course, your system LD should find ELF shared object for libhinawa4.\nBefore installing, it's good to check path of the above and configure\n'--prefix' meson option appropriately. The environment variables,\n``GI_TYPELIB_PATH`` and ``LD_LIBRARY_PATH`` are available for ad-hoc settings\nof the above as well.\n\nHow to generate document\n========================\n\n::\n\n    $ meson configure (--prefix=directory-to-install) -Ddoc=true build\n    $ meson compile -C build\n    $ meson install -C build\n\nYou can see documentation files under ``(directory-to-install)/share/doc/hinawa/``.\n\nSupplemental information for language bindings\n==============================================\n\n* `PyGObject \u003chttps://pygobject.readthedocs.io/\u003e`_ is a dynamic loader in Python 3 language for\n  libraries compatible with g-i.\n* `hinawa-rs \u003chttps://git.kernel.org/pub/scm/libs/ieee1394/hinawa-rs.git\u003e`_ includes crates to\n  use the library in Rust language.\n\nSample scripts\n==============\n\nSome sample scripts are available under ``samples`` directory:\n\n- read-quadlet - demonstration to read quadlet data from node in IEEE 1394 bus\n- read-quadlet-async - demonstration of the above example with asynchronous runtime\n\nExample of Python3 with PyGobject\n=================================\n\n::\n\n    #!/usr/bin/env python3\n\n    import gi\n    gi.require_version('GLib', '2.0')\n    gi.require_version('Hinawa', '4.0')\n    from gi.repository import GLib, Hinawa\n\n    from threading import Thread\n    from struct import unpack\n\n    node = Hinawa.FwNode.new()\n    _ = node.open('/dev/fw1', 0)\n\n    ctx = GLib.MainContext.new()\n    _, src = node.create_source()\n    src.attach(ctx)\n\n    dispatcher = GLib.MainLoop.new(ctx, False)\n    th = Thread(target=lambda d: d.run(), args=(dispatcher, ))\n    th.start()\n\n    addr = 0xfffff0000404\n    req = Hinawa.FwReq.new()\n    frame = [0] * 4\n    _, frame = req.transaction(\n        node,\n        Hinawa.FwTcode.READ_QUADLET_REQUEST,\n        addr,\n        len(frame),\n        frame,\n        50\n    )\n    quad = unpack('\u003eI', frame)[0]\n    print('0x{:012x}: 0x{:02x}'.format(addr, quad))\n\n    dispatcher.quit()\n    th.join()\n\nHow to make DEB package\n=======================\n\n- Please refer to `\u003chttps://salsa.debian.org/debian/libhinawa\u003e`_.\n\nHow to make RPM package\n=======================\n\n- Please refer to `\u003chttps://build.opensuse.org/package/show/openSUSE:Factory/libhinawa\u003e`_.\n\nMeson subproject\n================\n\nThis is a sample of wrap file to satisfy dependency on libhinawa by\n`Meson subprojects \u003chttps://mesonbuild.com/Subprojects.html\u003e`_.\n\n::\n\n    $ cat subprojects/hinawa.wrap\n    [wrap-git]\n    directory = hinawa\n    url = https://git.kernel.org/pub/scm/libs/ieee1394/libhinawa.git\n    revision = 4.0.2\n    depth = 1\n    \n    [provide]\n    dependency_names = hinawa\n\nAfter installation of the wrap file, the dependency can be solved by ``hinawa`` name since it is\ncommon in both pkg-config and the wrap file. The implicit or explicit fallback to subproject is\navailable.\n\n::\n\n    $ cat meson.build\n    hinawa_dependency = dependency('hinawa',\n      version: '\u003e=4.0'\n    )\n\nLoss of backward compatibility with version 1 and version 2 releases\n====================================================================\n\nIn the current version of the library, the focus is on supporting features to operate 1394 OHCI\nhardware for asynchronous communication. However, it originally started by supporting features\nprovided by drivers in ALSA firewire stack.\n\nThe version 0 of library supported the GObject class ``Hinawa.FwUnit``, which was derived by\n``Hinawa.SndUnit`` class. The ``Hinawa.SndUnit`` class was then inherited by other object classes\nfor each driver. However, there was an inconvenience where only some parts of asynchronous\ntransactions (read, write, and lock) were supported by ``Hinawa.SndUnit``.\n\nTo address the inconvenience, the version 1 of library integrated ``Hinawa.FwReq`` GObject class\nwith ``Hinawa.FwTcode`` and ``Hinawa.FwRcode`` GObject enumerations. Nonetheless, another\ninconvenience persisted, as some threads were internally launched to dispatch events in Linux\nFireWire subsystem and Linux Sound subsystem. These threads, running ``GLib.MainLoop``, were\nhidden from the user application.\n\nThe version 2 of library aimed to alleviate this issue by providing ``GLib.Source`` to user\napplications instead of processing it in the internal threads. The application became responsible\nfor processing it using ``GLib.MainContext``. Additionally, ``Hinawa.FwNode`` was introduced to\nobsolete ``Hinawa.FwUnit`` in an aspect of topology in IEEE 1394 bus. Consequently,\n``Hinawa.SndUnit`` directly derived from GObject.\n\nBefore releasing the version 4 of library, `libhitaki \u003chttps://github.com/alsa-project/libhitaki\u003e`_\nwas released. The library provides ``Hitaki.SndUnit`` and its derived object classes to obsolete\nequivalent features in the version 2 of library. Furthermore, with the release of Linux kernel\nversion 6.5, new events were introduced to deliver hardware time stamp for asynchronous\ncommunication. To accommodate this, ``Hinawa.CycleTime`` was added, along with some methods of\n``Hinawa.FwReq``, ``Hinawa.FwResp``, and ``Hinawa.FwFcp``, to facilitating user application\nprocessing of the hardware time stamp.\n\nThe version 4 library is specifically tailored to features in Linux FireWire subsystem, with a\nsole focus on asynchronous communication in IEEE 1394 bus. For isochronous communication,\n`libhinoko \u003chttps://git.kernel.org/pub/scm/libs/ieee1394/libhinoko.git/\u003e`_ provides the\nnecessary features.\n\nAbout Hinawa\n============\n\n``Hinawa`` is a Japanese term for a match cord used to ignite fires for various purposes. For\nexample, twine fuses used for igniting gunpowder weapons are a type of ``Hinawa``. The name\n``Hinawa`` consists of two kanji characters; ``Hi`` (U+2F55 |kanji-hi|) meaning ``fire``, and\n``Nawa`` (U+7E04 |kanji-nawa|) meaning ``cord``.\n\n.. |kanji-hi| unicode:: \u0026#x2f55 .. Hi spelled in Kanji\n.. |kanji-nawa| unicode:: \u0026#x7e04 .. Nawa spelled in Kanji\n\nIn the IEEE 1394 bus, asynchronous communication is the foundational step for operating functions\nwithin nodes. The ``Hinawa`` library is designed specifically to address this aspect.\n\nend\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsa-project%2Flibhinawa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falsa-project%2Flibhinawa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsa-project%2Flibhinawa/lists"}