Hitaki.AlsaFirewire

g GObject.GInterface GObject.GInterface Hitaki.AlsaFirewire Hitaki.AlsaFirewire GObject.GInterface->Hitaki.AlsaFirewire

Implementations:

Hitaki.SndDice, Hitaki.SndDigi00x, Hitaki.SndEfw, Hitaki.SndFireface, Hitaki.SndMotu, Hitaki.SndTascam, Hitaki.SndUnit

Methods

create_source ()

lock ()

open (path, open_flag)

unlock ()

Virtual Methods

do_create_source ()

do_lock ()

do_open (path, open_flag)

do_unlock ()

Properties

Name

Type

Flags

Short Description

card-id

int

r

The numeric identifier for sound card

guid

int

r

Global unique identifier for the node in IEEE 1394 bus.

is-disconnected

bool

r/w/en

Whether the sound card is unavailable

is-locked

bool

r/w/en

Whether the associated unit is locked or not

node-device

str

r

The name of node device in Linux FireWire subsystem

unit-type

Hitaki.AlsaFirewireType

r

The type of sound unit

Signals

None

Fields

None

Class Details

class Hitaki.AlsaFirewire
Bases:

GObject.GInterface

Structure:

Hitaki.AlsaFirewireInterface

An interface to operate ALSA HwDep character device for Audio and Music unit in IEEE 1394 bus. All of driver in ALSA firewire stack allow userspace application to use specific function via ALSA HwDep character device. The function includes common and specific parts. The [iface`AlsaFirewire`] is an object interface to operate the character device for the common functions.

create_source()
Raises:

GLib.Error

Returns:

True if the overall operation finished successfully, else False.

source:

A [struct`GLib`.Source] to handle events from ALSA HwDep character device.

Return type:

(bool, source: GLib.Source)

Allocate [struct`GLib`.Source] to handle events from ALSA HwDep character device.

lock()
Raises:

GLib.Error

Returns:

True if the overall operation finished successfully, else False.

Return type:

bool

Lock kernel driver bound to the associated ALSA HwDep character device so that it is prohibited to start packet streaming.

open(path, open_flag)
Parameters:
  • path (str) – A path to special file for ALSA HwDep character device.

  • open_flag (int) – The flag of open(2) system call.

Raises:

GLib.Error

Returns:

True if the overall operation finished successfully, else False.

Return type:

bool

Open the special file for ALSA HwDep character device.

unlock()
Raises:

GLib.Error

Returns:

True if the overall operation finished successfully, else False.

Return type:

bool

Unlock kernel driver bound to the associated ALSA HwDep character device so that it can start packet streaming.

do_create_source() virtual
Returns:

True if the overall operation finished successfully, else False.

source:

A [struct`GLib`.Source] to handle events from ALSA HwDep character device.

Return type:

(bool, source: GLib.Source)

Allocate [struct`GLib`.Source] to handle events from ALSA HwDep character device.

do_lock() virtual
Returns:

True if the overall operation finished successfully, else False.

Return type:

bool

Lock kernel driver bound to the associated ALSA HwDep character device so that it is prohibited to start packet streaming.

do_open(path, open_flag) virtual
Parameters:
  • path (str) – A path to special file for ALSA HwDep character device.

  • open_flag (int) – The flag of open(2) system call.

Returns:

True if the overall operation finished successfully, else False.

Return type:

bool

Open the special file for ALSA HwDep character device.

do_unlock() virtual
Returns:

True if the overall operation finished successfully, else False.

Return type:

bool

Unlock kernel driver bound to the associated ALSA HwDep character device so that it can start packet streaming.

Property Details

Hitaki.AlsaFirewire.props.card_id
Name:

card-id

Type:

int

Default Value:

0

Flags:

READABLE

The numeric identifier for sound card.

Hitaki.AlsaFirewire.props.guid
Name:

guid

Type:

int

Default Value:

0

Flags:

READABLE

Global unique identifier for the node in IEEE 1394 bus.

Hitaki.AlsaFirewire.props.is_disconnected
Name:

is-disconnected

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the sound card is unavailable. It becomes False when the sound card is removed or driver is unbound to it. Then the owner of this object should call [method`GObject`.Object.unref] as quickly as possible to release ALSA hwdep character device.

Hitaki.AlsaFirewire.props.is_locked
Name:

is-locked

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the associated unit is locked or not to start packet streaming.

Hitaki.AlsaFirewire.props.node_device
Name:

node-device

Type:

str

Default Value:

None

Flags:

READABLE

The name of node device in Linux FireWire subsystem which owns the unit; e.g. fw1.

Hitaki.AlsaFirewire.props.unit_type
Name:

unit-type

Type:

Hitaki.AlsaFirewireType

Default Value:

Hitaki.AlsaFirewireType.DICE

Flags:

READABLE

The type of sound unit.