Giter VIP home page Giter VIP logo

alsa-project / libhinawa Goto Github PK

View Code? Open in Web Editor NEW
7.0 9.0 8.0 1.32 MB

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.

License: GNU Lesser General Public License v2.1

C 93.13% Meson 2.24% Python 4.63%
c alsa ieee1394 meson gobject-introspection linux

libhinawa's People

Contributors

kenhys avatar kou avatar lamby avatar takaswie avatar yoshihiro-okada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libhinawa's Issues

debian: needless symbols are nominated.

A commit a122984 adds symbol list. This list includes internal APIs. They're:

hinawa_context_add_src@Base 0.6.0
hinawa_context_remove_src@Base 0.6.0

If possible, I'd like to remove them from out packaging routine.

I: gir1.2-hinawa-1.0: extended-description-is-probably-too-short

This issue is similar to #22

N:    The extended description (the lines after the first line of the
N:    "Description:" field) is only one or two lines long. The extended
N:    description should provide a user with enough information to decide
N:    whether they want to install this package, what it contains, and how it
N:    compares to similar packages. One or two lines is normally not enough to
N:    do this.
N:    
N:    Refer to Debian Developer's Reference section 6.2.1 (General guidelines
N:    for package descriptions) and Debian Developer's Reference section 6.2.3
N:    (The long description) for details.
N:    
N:    Severity: minor, Certainty: possible
N:    

Change versioning scheme for library interface to libtool.

I maintain versioning of this package by a scheme below:

package version = major.minor.micro

so that:

  • major: updated when losing backward compatibility.
  • minor: updated when any new object or property for gobject are added.
  • micro: updated when any changes of code except for the above; e.g. bug fixes.

In libtool fashion, versioning of library interface is decided by this scheme. Practically, this guideline is suggested. The version is described with three parts:

iface version = current:revision:age

so that:

  • current: The most recent interface number that this library implements.
  • revision: The implementation number of the current interface.
  • age: The difference between the newest and oldest interfaces that this library implements.

Then, at present, I maintain versioning of library interface for libtool by a scheme below:

iface version = (minor * 10 + micro):(major):(minor * 10 + micro)

The relationship between versions of package/iface/binary is described in this fugure:

version iface .so.x.x.x
0.3.0 30:0:30 0.30.0
0.4.0 41:0:41 0.41.0
0.5.0 52:0:52 0.52.0
0.6.0 63:0:63 0.63.0
0.7.0 74:0:74 0.74.0
0.8.0 85:0:85 0.85.0
0.8.1 81:0:81 0.81.0
0.8.2 82:0:82 0.82.0

For our information, suffix of binary file might be decided by libtool according to this formula:

.so.x.y.z = .so.(current - age).(age).(revision)

Well, at present, I have a plan to add changes with loss of backward compatibility and I'm working for updating major version to 1. Then, according to my formula, the relationship is described in this fugure:

version iface .so.x.x.x
1.0.0 0:1:0 0.0.1

The current field of iface version declines to zero. This loses convention of library interface because the value of current field should be increased monotonically. I need to fix it.

Debian ITP

Let's try to discuss about Intent To Package.

  • Wait until 0.7.0 release because of lisence issue.

Licensing issue (including GPLv2 file from Linux kernel source)

Currently libhinawa will be shipped under LGPL v2.1, while backport.h comes from Linux kernel userspace application programming interface (UAPI) header and is licensed under GPL v2. (see include/uapi/sound/firewire.h in Linux kernel source.)

Furthermore, this library depends on GLib and GObject, thus runtimes are linked to them automatically. They are licensed under GPL v2. In this case, even if libhinawa is licensed under LGPL v2.1, userspace applications of libhinawa should be licensed under GPL v2. As a result, it seems to have no effectives that libhinawa is licensed under LGPLv2.

Totally, I think it better to change licensing for libhinawa to GPLv2.

sample scripts do not find firewire device

Hi Takashi

I have a Focusrite Saffire PRO 24 which works perfectly with snd-firewire-improve.

I have built and installed libhinawa, no problem.

When I run the scripts, for example using "$ python qt5" or going up one level "$ ./samples/run.sh qt5" the script returns: No sound FireWire devices found.

How to fault find?

Cheers, Simon

Split debian/* maintainance to salsa.d.o

Suggestion

I'm planning about moving maintainance under salsa.d.o. [1]
Salsa is a service instance of gitlab.
After migration, libhinawa debian package will be maintained at https://salsa.debian.org/debian/libhinawa.
[1] https://wiki.debian.org/Salsa

Comparison

Pros.

  • upstream (github/libhinawa) need not to care how to maintain debian packages (Sure, you can maintain and coordinate package with )
  • other DD also may be able to maintain libhinawa because DD can access to salsa.d.o/debian/libhinawa by default.

Cons.

  • repository is split into two parts. mainline and debian specific one.
  • need to create salsa.d.o account to contribute debian package. (if contributor is not DD)

Migration

upstream ( @takaswie ):

  • just remove debian/*. It's all.

maintainer( @kenhys ):

  • create repository for libhinawa debian package
  • move it to salsa.d.o (ask DD to import that one)
  • hack package under salsa.d.o, do regular maintainance task

Any thourght? @takaswie

provide CycleTime structure to libhinoko

The sister project of libhinawa, libhinoko, provides Hinoko.CycleTimer structure for the content of CYCLE_TIMER register. The structure can be obsoleted by new Hinawa.CycleTime structure.

It requires libhinoko to have a new dependency to libhinawa. It means that libhinoko needs new stable version of libhinawa as soon.

'rpmbuild -bb libhinawa.spec' fails

Hi, I've just tried to build an rpm but with no luck. I have the following errors:
$
...
RPM build errors:
line 15: Possible unexpanded macro in: Requires: glib2(x86-64) >= %{glib2_version}
bogus date in %changelog: Thu Aug 24 2020 Takashi Sakamoto [email protected] - 2.2.0
bogus date in %changelog: Thu Aug 18 2020 Takashi Sakamoto [email protected] - 2.1.0
bogus date in %changelog: Thu May 20 2020 Takashi Sakamoto [email protected] - 2.0.0
bogus date in %changelog: Thu May 11 2020 Takashi Sakamoto [email protected] - 1.4.5
bogus date in %changelog: Thu Jan 20 2020 Takashi Sakamoto [email protected] - 1.4.4
bogus date in %changelog: Sun Mar 21 2019 Takashi Sakamoto [email protected] - 1.2.0
bogus date in %changelog: Sun Mar 5 2019 Takashi Sakamoto [email protected] - 1.1.2
bogus date in %changelog: Sun Feb 25 2019 Takashi Sakamoto [email protected] - 1.1.1
bogus date in %changelog: Tue Jun 20 2018 Takashi Sakamoto [email protected] - 1.0.0
bogus date in %changelog: Fri May 7 2017 Takashi Sakamoto [email protected] - 0.8.1-1
File not found: /home/admin/rpmbuild/BUILDROOT/libhinawa-2.2.0-1.el8.x86_64/usr/share/gtk-doc/html/hinawa/*
$

With 'File not found' seemingly fatal - nothing built.
Attached is the full output of the rpmbuild command:
libhinawa_rpm-build_fail.txt

Any fix/ work-around you can offer would be great. Thanks for your help.
Morgan.

autopkgtest support

This library is essentially for actual units on IEEE 1394 bus. Thus, it seems to be difficult to support autopkgtest for whole functionalities because it requires package maintainers to work with actual devices.

On the other hand, simple testing for linking is possible by instantiating or un-referring to object classes in the library.

Let's discuss about how to achieve it.

Use 'guint32 *' instead of 'GArray' for 32 bit array.

In IEEE 1394 bus, data is aligned to 4 bytes unit (quadlet) in packet payload. According to this specification, libhinawa requires to handle quadlet array for applications.

Currently, this quadlet array is represented by GArray. This is mainly due to GObject signal argument. It's 'requested' signal of FwResp object, and the other objects use the same representation.

But this may not be a better idea. GArray is a bit complicated type of GLib. If possible, they're represented by 'guint32 *' and length argument.

Obsolete transaction methods on HinawaSndUnit

At present, HinawaSndUnit has some methods for transaction, however this has an issue of mutual exclusives.

In this issue, below methods becomes to be deprecated. Users and developers should use HinawaFwReq object instead.

  • hinawa_snd_unit_read_transact()
  • hinawa_snd_unit_write_transact()
  • hinawa_snd_unit_lock_transact()

Port to meson for build system

Meson is a build system recently developed for better velocity of build processing.
http://mesonbuild.com/

I prepare for topic/meson-build branch and compare time to build for two cases.

With GNU autotools:

$ cat autotools.sh
#!/bin/bash

cd /tmp
git clone ~/git/libhinawa
cd libhinawa
./autogen.sh
./configure --enable-gtk-doc --prefix=/tmp/test
make -j10
make install

With meson:

$ cat meson.sh
#!/bin/bash

cd /tmp
git clone ~/git/libhinawa
cd libhinawa
meson -Dgtk_doc=true --prefix=/tmp/test . build
cd build
ninja
ninja install

As a result:

$ time ./autotools.sh
...
real	0m11.922s
user	0m12.955s
sys	0m1.294s
$ time ./meson.sh
...
real	0m2.035s
user	0m2.447s
sys	0m0.402s

Oh, fast.

I: libhinawa-dev: extended-description-is-probably-too-short

lintian recommends to write down enough information for this package.
(This is not W: warning, but is is better to provide more information about this package)

N: 
N:    The extended description (the lines after the first line of the
N:    "Description:" field) is only one or two lines long. The extended
N:    description should provide a user with enough information to decide
N:    whether they want to install this package, what it contains, and how it
N:    compares to similar packages. One or two lines is normally not enough to
N:    do this.
N:    
N:    Refer to Debian Developer's Reference section 6.2.1 (General guidelines
N:    for package descriptions) and Debian Developer's Reference section 6.2.3
N:    (The long description) for details.
N:    
N:    Severity: minor, Certainty: possible
N:    
N:    Check: description, Type: binary, udeb
N: 

Obsolete usage of GArray for 32bit data with GByteArray on some HinawaFw* objects

At present, most objects in this library utilize GArray to handle requests from caller with 32bit data. However, this brings some disadvantages. Especially, in any transactions on IEEE 1394 bus, originator can requests the transactions in byte unit. Current design of HinawaFwReq is not good for this type of requests.

In this issue, for HinawaFw* objects, use GByteArray for the data and change library interface. This corresponds to loss of backward compatibility, thus I create new release with updated major version.

obsolete usage of keywords related to asynchronous I/O in GLib convention

The suffixes of method, sync and async, are related to asynchronous I/O in GLib convention. The method with async works with GLib.Task and GLib.Cancellation for asynchronous I/O API, and the method with sync is for blocking I/O API.

Current libhinawa implements Hinawa.FwReq.transaction_sync() and Hinawa.FwReq.transaction_async(), while they acts differently from the above convention. The former blocks running user process for blocking, and the act follows the above convention. But the latter expects that user application operates GLib.MainContext to dispatch any event, and it is not an application of GLib.Task and GLib.Cancellation.

They should be renamed until libhinawa 3.0 release.

GQuark is not exported.

Although GQuark is used to propagate error information for each GObject-derived object, the symbols are not exported yet. This issue brings inconvenience for Rust bindings to implement glib::error::ErrorDomain for the GQuark. The glib::error::ErrorDomain trait requires domain function implementation to return GQuark itself, however it's not exported and unable to access.

public headers includes syntax for local header file even if they are system headers

In GNU Compiler Collection, CPP has include syntax for #include directive. In the syntax, a file with angle brackets is for system header file, and a file with double quotes is for local header file:
https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html

In libhinawa, some public headers for applications include the directive with double quotes. This is not better because it's intended to include system header file installed with the public headers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.