HinawaSndDice

HinawaSndDice — A notification listener for Dice models

Functions

Signals

void notified Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── HinawaSndUnit
        ╰── HinawaSndDice

Includes

#include <snd_dice.h>

Description

A HinawaSndDice listen to Dice notification and generates signal when received. This inherits HinawaSndUnit.

Functions

hinawa_snd_dice_error_quark ()

GQuark
hinawa_snd_dice_error_quark ();

Return the GQuark for error domain of GError which has code in HinawaSndDiceError.

Returns

A GQuark.

Since: 2.1


hinawa_snd_dice_new ()

HinawaSndDice *
hinawa_snd_dice_new (void);

Instantiate HinawaSndDice object and return the instance.

Returns

an instance of HinawaSndDice.

Since: 1.3.


hinawa_snd_dice_open ()

void
hinawa_snd_dice_open (HinawaSndDice *self,
                      gchar *path,
                      GError **exception);

Open ALSA hwdep character device and check it for Dice devices.

Parameters

self

A HinawaSndUnit

 

path

A full path of a special file for ALSA hwdep character device

 

exception

A GError. Error can be generated with three domains; g_file_error_quark(), hinawa_fw_node_error_quark(), and hinawa_snd_unit_error_quark().

 

Since: 0.4


hinawa_snd_dice_transaction ()

void
hinawa_snd_dice_transaction (HinawaSndDice *self,
                             guint64 addr,
                             const guint32 *frame,
                             gsize frame_count,
                             guint32 bit_flag,
                             GError **exception);

Execute write transactions to the given address, then wait and check notification.

Parameters

self

A HinawaSndDice

 

addr

A destination address of target device

 

frame

An array with elements for quadlet data to transmit.

[array length=frame_count][in]

frame_count

The number of quadlets in the frame.

 

bit_flag

bit flag to wait

 

exception

A GError. Error can be generated with three domains; hinawa_fw_node_error_quark(), hinawa_fw_req_error_quark(), and hinawa_snd_dice_error_quark().

 

Since: 1.4.

Types and Values

HINAWA_SND_DICE_ERROR

#define HINAWA_SND_DICE_ERROR hinawa_snd_dice_error_quark()

Signal Details

The “notified” signal

void
user_function (HinawaSndDice *self,
               guint          message,
               gpointer       user_data)

When Dice models transfer notification, the “notified” signal is generated.

Parameters

self

A HinawaSndDice

 

message

A notification message

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 0.3