Loading...
Searching...
No Matches
Hardware Dependant Interface

## Macros

#define | SND_HWDEP_DLSYM_VERSION _dlsym_hwdep_001
#define | SND_HWDEP_OPEN_READ (O_RDONLY)
#define | SND_HWDEP_OPEN_WRITE (O_WRONLY)
#define | SND_HWDEP_OPEN_DUPLEX (O_RDWR)
#define | SND_HWDEP_OPEN_NONBLOCK (O_NONBLOCK)
#define | snd_hwdep_info_alloca(ptr)
#define | snd_hwdep_dsp_status_alloca(ptr)
#define | snd_hwdep_dsp_image_alloca(ptr)

## Typedefs

typedef struct _snd_hwdep_info | snd_hwdep_info_t
typedef struct _snd_hwdep_dsp_status | snd_hwdep_dsp_status_t
typedef struct _snd_hwdep_dsp_image | snd_hwdep_dsp_image_t
typedef struct _snd_hwdep | snd_hwdep_t

## Enumerations

enum

snd_hwdep_iface_t {
SND_HWDEP_IFACE_OPL2 = 0 , SND_HWDEP_IFACE_OPL3 , SND_HWDEP_IFACE_OPL4 , SND_HWDEP_IFACE_SB16CSP ,
SND_HWDEP_IFACE_EMU10K1 , SND_HWDEP_IFACE_YSS225 , SND_HWDEP_IFACE_ICS2115 , SND_HWDEP_IFACE_SSCAPE ,
SND_HWDEP_IFACE_VX , SND_HWDEP_IFACE_MIXART , SND_HWDEP_IFACE_USX2Y , SND_HWDEP_IFACE_EMUX_WAVETABLE ,
SND_HWDEP_IFACE_BLUETOOTH , SND_HWDEP_IFACE_USX2Y_PCM , SND_HWDEP_IFACE_PCXHR , SND_HWDEP_IFACE_SB_RC ,
SND_HWDEP_IFACE_HDA , SND_HWDEP_IFACE_USB_STREAM , SND_HWDEP_IFACE_FW_DICE , SND_HWDEP_IFACE_FW_FIREWORKS ,
SND_HWDEP_IFACE_FW_BEBOB , SND_HWDEP_IFACE_FW_OXFW , SND_HWDEP_IFACE_FW_DIGI00X , SND_HWDEP_IFACE_FW_TASCAM ,
SND_HWDEP_IFACE_LINE6 , SND_HWDEP_IFACE_FW_MOTU , SND_HWDEP_IFACE_FW_FIREFACE , SND_HWDEP_IFACE_LAST = SND_HWDEP_IFACE_FW_FIREFACE
}

enum | snd_hwdep_type_t { SND_HWDEP_TYPE_HW , SND_HWDEP_TYPE_SHM , SND_HWDEP_TYPE_INET }

## Functions

int | snd_hwdep_open (snd_hwdep_t **hwdep, const char *name, int mode)
| Opens a new connection to the HwDep interface.
int | snd_hwdep_close (snd_hwdep_t *hwdep)
| close HwDep handle
int | snd_hwdep_poll_descriptors (snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space)
| get poll descriptors
int | snd_hwdep_poll_descriptors_count (snd_hwdep_t *hwdep)
| get count of poll descriptors for HwDep handle
int | snd_hwdep_poll_descriptors_revents (snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
| get returned events from poll descriptors
int | snd_hwdep_nonblock (snd_hwdep_t *hwdep, int nonblock)
| set nonblock mode
int | snd_hwdep_info (snd_hwdep_t *hwdep, snd_hwdep_info_t *info)
| get information about HwDep handle
int | snd_hwdep_dsp_status (snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *status)
| get the DSP status information
int | snd_hwdep_dsp_load (snd_hwdep_t *hwdep, snd_hwdep_dsp_image_t *block)
| load the DSP block
int | snd_hwdep_ioctl (snd_hwdep_t *hwdep, unsigned int request, void *arg)
| do hardware dependent ioctl
ssize_t | snd_hwdep_write (snd_hwdep_t *hwdep, const void *buffer, size_t size)
| write bytes using HwDep handle
ssize_t | snd_hwdep_read (snd_hwdep_t *hwdep, void *buffer, size_t size)
| read bytes using HwDep handle
size_t | snd_hwdep_info_sizeof (void)
| get size of the snd_hwdep_info_t structure in bytes
int | snd_hwdep_info_malloc (snd_hwdep_info_t **ptr)
| allocate a new snd_hwdep_info_t structure
void | snd_hwdep_info_free (snd_hwdep_info_t *obj)
| frees the snd_hwdep_info_t structure
void | snd_hwdep_info_copy (snd_hwdep_info_t *dst, const snd_hwdep_info_t *src)
| copy one snd_hwdep_info_t structure to another
unsigned int | snd_hwdep_info_get_device (const snd_hwdep_info_t *obj)
| get hwdep device number
int | snd_hwdep_info_get_card (const snd_hwdep_info_t *obj)
| get hwdep card number
const char * | snd_hwdep_info_get_id (const snd_hwdep_info_t *obj)
| get hwdep driver identifier
const char * | snd_hwdep_info_get_name (const snd_hwdep_info_t *obj)
| get hwdep driver name
snd_hwdep_iface_t | snd_hwdep_info_get_iface (const snd_hwdep_info_t *obj)
| get hwdep protocol interface
void | snd_hwdep_info_set_device (snd_hwdep_info_t *obj, unsigned int val)
| set hwdep device number
size_t | snd_hwdep_dsp_status_sizeof (void)
| get size of the snd_hwdep_dsp_status_t structure in bytes
int | snd_hwdep_dsp_status_malloc (snd_hwdep_dsp_status_t **ptr)
| allocate a new snd_hwdep_dsp_status_t structure
void | snd_hwdep_dsp_status_free (snd_hwdep_dsp_status_t *obj)
| frees the snd_hwdep_dsp_status_t structure
void | snd_hwdep_dsp_status_copy (snd_hwdep_dsp_status_t *dst, const snd_hwdep_dsp_status_t *src)
| copy one snd_hwdep_dsp_status_t structure to another
unsigned int | snd_hwdep_dsp_status_get_version (const snd_hwdep_dsp_status_t *obj)
| get the driver version of dsp loader
const char * | snd_hwdep_dsp_status_get_id (const snd_hwdep_dsp_status_t *obj)
| get the driver id of dsp loader
unsigned int | snd_hwdep_dsp_status_get_num_dsps (const snd_hwdep_dsp_status_t *obj)
| get number of dsp blocks
unsigned int | snd_hwdep_dsp_status_get_dsp_loaded (const snd_hwdep_dsp_status_t *obj)
| get the bit flags of the loaded dsp blocks
unsigned int | snd_hwdep_dsp_status_get_chip_ready (const snd_hwdep_dsp_status_t *obj)
| get the chip status of dsp loader
size_t | snd_hwdep_dsp_image_sizeof (void)
| get size of the snd_hwdep_dsp_image_t structure in bytes
int | snd_hwdep_dsp_image_malloc (snd_hwdep_dsp_image_t **ptr)
| allocate a new snd_hwdep_dsp_image_t structure
void | snd_hwdep_dsp_image_free (snd_hwdep_dsp_image_t *obj)
| frees the snd_hwdep_dsp_image_t structure
void | snd_hwdep_dsp_image_copy (snd_hwdep_dsp_image_t *dst, const snd_hwdep_dsp_image_t *src)
| copy one snd_hwdep_dsp_image_t structure to another
unsigned int | snd_hwdep_dsp_image_get_index (const snd_hwdep_dsp_image_t *obj)
| get the DSP block index
const char * | snd_hwdep_dsp_image_get_name (const snd_hwdep_dsp_image_t *obj)
| get the name of the DSP block
const void * | snd_hwdep_dsp_image_get_image (const snd_hwdep_dsp_image_t *obj)
| get the image pointer of the DSP block
size_t | snd_hwdep_dsp_image_get_length (const snd_hwdep_dsp_image_t *obj)
| get the length of the DSP block
void | snd_hwdep_dsp_image_set_index (snd_hwdep_dsp_image_t *obj, unsigned int _index)
| set the DSP block index
void | snd_hwdep_dsp_image_set_name (snd_hwdep_dsp_image_t *obj, const char *name)
| set the name of the DSP block
void | snd_hwdep_dsp_image_set_image (snd_hwdep_dsp_image_t *obj, void *buffer)
| set the DSP block image pointer
void | snd_hwdep_dsp_image_set_length (snd_hwdep_dsp_image_t *obj, size_t length)
| set the DSP block length

## Detailed Description

The Hardware Dependant Interface.

## Macro Definition Documentation

## SND_HWDEP_DLSYM_VERSION

#define SND_HWDEP_DLSYM_VERSION _dlsym_hwdep_001

dlsym version for interface entry callback

## snd_hwdep_dsp_image_alloca

#define snd_hwdep_dsp_image_alloca | ( |  | ptr | ) |

Value:
__snd_alloca(ptr, snd_hwdep_dsp_image)
__snd_alloca
#define __snd_alloca(ptr, type)
alloca helper macro.
Definition global.h:110

allocate snd_hwdep_dsp_image_t container on stack

## snd_hwdep_dsp_status_alloca

#define snd_hwdep_dsp_status_alloca | ( |  | ptr | ) |

Value:
__snd_alloca(ptr, snd_hwdep_dsp_status)
snd_hwdep_dsp_status
int snd_hwdep_dsp_status(snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *status)
get the DSP status information
Definition hwdep.c:502

allocate snd_hwdep_dsp_status_t container on stack

## snd_hwdep_info_alloca

#define snd_hwdep_info_alloca | ( |  | ptr | ) |

Value:
__snd_alloca(ptr, snd_hwdep_info)
snd_hwdep_info
int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t *info)
get information about HwDep handle
Definition hwdep.c:448

allocate snd_hwdep_info_t container on stack

## SND_HWDEP_OPEN_DUPLEX

#define SND_HWDEP_OPEN_DUPLEX (O_RDWR)

open for reading and writing

## SND_HWDEP_OPEN_NONBLOCK

#define SND_HWDEP_OPEN_NONBLOCK (O_NONBLOCK)

open mode flag: open in nonblock mode

## SND_HWDEP_OPEN_READ

#define SND_HWDEP_OPEN_READ (O_RDONLY)

open for reading

## SND_HWDEP_OPEN_WRITE

#define SND_HWDEP_OPEN_WRITE (O_WRONLY)

open for writing

## Typedef Documentation

## snd_hwdep_dsp_image_t

typedef struct _snd_hwdep_dsp_image snd_hwdep_dsp_image_t

HwDep DSP image container

## snd_hwdep_dsp_status_t

typedef struct _snd_hwdep_dsp_status snd_hwdep_dsp_status_t

HwDep DSP status container

## snd_hwdep_info_t

typedef struct _snd_hwdep_info snd_hwdep_info_t

HwDep information container

## snd_hwdep_t

typedef struct _snd_hwdep snd_hwdep_t

HwDep handle

## Enumeration Type Documentation

## snd_hwdep_iface_t

enum snd_hwdep_iface_t

HwDep interface

Enumerator
SND_HWDEP_IFACE_OPL2 | OPL2 raw driver
SND_HWDEP_IFACE_OPL3 | OPL3 raw driver
SND_HWDEP_IFACE_OPL4 | OPL4 raw driver
SND_HWDEP_IFACE_SB16CSP | SB16CSP driver
SND_HWDEP_IFACE_EMU10K1 | EMU10K1 driver
SND_HWDEP_IFACE_YSS225 | YSS225 driver
SND_HWDEP_IFACE_ICS2115 | ICS2115 driver
SND_HWDEP_IFACE_SSCAPE | Ensoniq SoundScape ISA card (MC68EC000)
SND_HWDEP_IFACE_VX | Digigram VX cards
SND_HWDEP_IFACE_MIXART | Digigram miXart cards
SND_HWDEP_IFACE_USX2Y | Tascam US122, US224 & US428 usb
SND_HWDEP_IFACE_EMUX_WAVETABLE | EmuX wavetable
SND_HWDEP_IFACE_BLUETOOTH | Bluetooth audio
SND_HWDEP_IFACE_USX2Y_PCM | Tascam US122, US224 & US428 raw USB PCM
SND_HWDEP_IFACE_PCXHR | Digigram PCXHR
SND_HWDEP_IFACE_SB_RC | SB Extigy/Audigy2NX remote control
SND_HWDEP_IFACE_HDA | HD-audio
SND_HWDEP_IFACE_USB_STREAM | direct access to usb stream
SND_HWDEP_IFACE_FW_DICE | TC DICE FireWire device
SND_HWDEP_IFACE_FW_FIREWORKS | Echo Audio Fireworks based device
SND_HWDEP_IFACE_FW_BEBOB | BridgeCo BeBoB based device
SND_HWDEP_IFACE_FW_OXFW | Oxford OXFW970/971 based device
SND_HWDEP_IFACE_LAST | last known hwdep interface

## snd_hwdep_type_t

enum snd_hwdep_type_t

HwDep handle type

Enumerator
SND_HWDEP_TYPE_HW | Kernel level HwDep
SND_HWDEP_TYPE_SHM | Shared memory client HwDep (not yet implemented)
SND_HWDEP_TYPE_INET | INET client HwDep (not yet implemented)

## Function Documentation

## snd_hwdep_close()

int snd_hwdep_close | ( | snd_hwdep_t * | hwdep | ) |

close HwDep handle

Parameters

  hwdep | HwDep handle

Returns
  0 on success otherwise a negative error code

Closes the specified HwDep handle and frees all associated resources.

## snd_hwdep_dsp_image_copy()

void snd_hwdep_dsp_image_copy | ( | snd_hwdep_dsp_image_t * | dst,
|  | const snd_hwdep_dsp_image_t * | src )

copy one snd_hwdep_dsp_image_t structure to another

Parameters

  dst | destination snd_hwdep_dsp_image_t structure
  src | source snd_hwdep_dsp_image_t structure

## snd_hwdep_dsp_image_free()

void snd_hwdep_dsp_image_free | ( | snd_hwdep_dsp_image_t * | info | ) |

frees the snd_hwdep_dsp_image_t structure

Parameters

  info | pointer to the snd_hwdep_dsp_image_t structure to free

Frees the given snd_hwdep_dsp_image_t structure using the standard free C library function.

## snd_hwdep_dsp_image_get_image()

const void * snd_hwdep_dsp_image_get_image | ( | const snd_hwdep_dsp_image_t * | obj | ) |

get the image pointer of the DSP block

Parameters

  obj | pointer to a snd_hwdep_dsp_image_t structure

Returns
  the image pointer of the DSP block

## snd_hwdep_dsp_image_get_index()

unsigned int snd_hwdep_dsp_image_get_index | ( | const snd_hwdep_dsp_image_t * | obj | ) |

get the DSP block index

Parameters

  obj | pointer to a snd_hwdep_dsp_image_t structure

Returns
  the index of the DSP block

## snd_hwdep_dsp_image_get_length()

size_t snd_hwdep_dsp_image_get_length | ( | const snd_hwdep_dsp_image_t * | obj | ) |

get the length of the DSP block

Parameters

  obj | pointer to a snd_hwdep_dsp_image_t structure

Returns
  the length of the DSP block in bytes

## snd_hwdep_dsp_image_get_name()

const char * snd_hwdep_dsp_image_get_name | ( | const snd_hwdep_dsp_image_t * | obj | ) |

get the name of the DSP block

Parameters

  obj | pointer to a snd_hwdep_dsp_image_t structure

Returns
  the name string of the DSP block

## snd_hwdep_dsp_image_malloc()

int snd_hwdep_dsp_image_malloc | ( | snd_hwdep_dsp_image_t ** | info | ) |

allocate a new snd_hwdep_dsp_image_t structure

Parameters

  info | returned pointer

Returns
  0 on success otherwise a negative error code if fails

Allocates a new snd_hwdep_dsp_image_t structure using the standard malloc C library function.

## snd_hwdep_dsp_image_set_image()

void snd_hwdep_dsp_image_set_image | ( | snd_hwdep_dsp_image_t * | obj,
|  | void * | image )

set the DSP block image pointer

Parameters

  obj | pointer to a snd_hwdep_dsp_image_t structure
  image | the DSP image pointer

## snd_hwdep_dsp_image_set_index()

void snd_hwdep_dsp_image_set_index | ( | snd_hwdep_dsp_image_t * | obj,
|  | unsigned int | index )

set the DSP block index

Parameters

  obj | pointer to a snd_hwdep_dsp_image_t structure
  index | the index value to set

## snd_hwdep_dsp_image_set_length()

void snd_hwdep_dsp_image_set_length | ( | snd_hwdep_dsp_image_t * | obj,
|  | size_t | length )

set the DSP block length

Parameters

  obj | pointer to a snd_hwdep_dsp_image_t structure
  length | the length of the DSP block

## snd_hwdep_dsp_image_set_name()

void snd_hwdep_dsp_image_set_name | ( | snd_hwdep_dsp_image_t * | obj,
|  | const char * | name )

set the name of the DSP block

Parameters

  obj | pointer to a snd_hwdep_dsp_image_t structure
  name | the name string

## snd_hwdep_dsp_image_sizeof()

size_t snd_hwdep_dsp_image_sizeof | ( | void |  | ) |

get size of the snd_hwdep_dsp_image_t structure in bytes

Returns
  size of the snd_hwdep_dsp_image_t structure in bytes

## snd_hwdep_dsp_load()

int snd_hwdep_dsp_load | ( | snd_hwdep_t * | hwdep,
|  | snd_hwdep_dsp_image_t * | block )

load the DSP block

Parameters

  hwdep | HwDep handle
  block | pointer to a snd_hwdep_dsp_image_t structure to transfer

Returns
  0 on success otherwise a negative error code

## snd_hwdep_dsp_status()

int snd_hwdep_dsp_status | ( | snd_hwdep_t * | hwdep,
|  | snd_hwdep_dsp_status_t * | info )

get the DSP status information

Parameters

  hwdep | HwDep handle
  info | pointer to a snd_hwdep_dsp_status_t structure to be filled

Returns
  0 on success otherwise a negative error code

## snd_hwdep_dsp_status_copy()

void snd_hwdep_dsp_status_copy | ( | snd_hwdep_dsp_status_t * | dst,
|  | const snd_hwdep_dsp_status_t * | src )

copy one snd_hwdep_dsp_status_t structure to another

Parameters

  dst | destination snd_hwdep_dsp_status_t structure
  src | source snd_hwdep_dsp_status_t structure

## snd_hwdep_dsp_status_free()

void snd_hwdep_dsp_status_free | ( | snd_hwdep_dsp_status_t * | info | ) |

frees the snd_hwdep_dsp_status_t structure

Parameters

  info | pointer to the snd_hwdep_dsp_status_t structure to free

Frees the given snd_hwdep_dsp_status_t structure using the standard free C library function.

## snd_hwdep_dsp_status_get_chip_ready()

unsigned int snd_hwdep_dsp_status_get_chip_ready | ( | const snd_hwdep_dsp_status_t * | obj | ) |

get the chip status of dsp loader

Parameters

  obj | pointer to a snd_hwdep_dsp_status_t structure

Returns
  non-zero if all DSP blocks are loaded and the chip is ready

## snd_hwdep_dsp_status_get_dsp_loaded()

unsigned int snd_hwdep_dsp_status_get_dsp_loaded | ( | const snd_hwdep_dsp_status_t * | info | ) |

get the bit flags of the loaded dsp blocks

Parameters

  info | pointer to a snd_hwdep_dsp_status_t structure

Returns
  the big flags of the loaded dsp blocks

## snd_hwdep_dsp_status_get_id()

const char * snd_hwdep_dsp_status_get_id | ( | const snd_hwdep_dsp_status_t * | obj | ) |

get the driver id of dsp loader

Parameters

  obj | pointer to a snd_hwdep_dsp_status_t structure

Returns
  the driver id string

## snd_hwdep_dsp_status_get_num_dsps()

unsigned int snd_hwdep_dsp_status_get_num_dsps | ( | const snd_hwdep_dsp_status_t * | obj | ) |

get number of dsp blocks

Parameters

  obj | pointer to a snd_hwdep_dsp_status_t structure

Returns
  number of dsp blocks

## snd_hwdep_dsp_status_get_version()

unsigned int snd_hwdep_dsp_status_get_version | ( | const snd_hwdep_dsp_status_t * | obj | ) |

get the driver version of dsp loader

Parameters

  obj | pointer to a snd_hwdep_dsp_status_t structure

Returns
  the driver version

## snd_hwdep_dsp_status_malloc()

int snd_hwdep_dsp_status_malloc | ( | snd_hwdep_dsp_status_t ** | info | ) |

allocate a new snd_hwdep_dsp_status_t structure

Parameters

  info | returned pointer

Returns
  0 on success otherwise a negative error code if fails

Allocates a new snd_hwdep_dsp_status_t structure using the standard malloc C library function.

## snd_hwdep_dsp_status_sizeof()

size_t snd_hwdep_dsp_status_sizeof | ( | void |  | ) |

get size of the snd_hwdep_dsp_status_t structure in bytes

Returns
  size of the snd_hwdep_dsp_status_t structure in bytes

## snd_hwdep_info()

int snd_hwdep_info | ( | snd_hwdep_t * | hwdep,
|  | snd_hwdep_info_t * | info )

get information about HwDep handle

Parameters

  hwdep | HwDep handle
  info | pointer to a snd_hwdep_info_t structure to be filled

Returns
  0 on success otherwise a negative error code

## snd_hwdep_info_copy()

void snd_hwdep_info_copy | ( | snd_hwdep_info_t * | dst,
|  | const snd_hwdep_info_t * | src )

copy one snd_hwdep_info_t structure to another

Parameters

  dst | destination snd_hwdep_info_t structure
  src | source snd_hwdep_info_t structure

## snd_hwdep_info_free()

void snd_hwdep_info_free | ( | snd_hwdep_info_t * | info | ) |

frees the snd_hwdep_info_t structure

Parameters

  info | pointer to the snd_hwdep_info_t structure to free

Frees the given snd_hwdep_info_t structure using the standard free C library function.

## snd_hwdep_info_get_card()

int snd_hwdep_info_get_card | ( | const snd_hwdep_info_t * | obj | ) |

get hwdep card number

Parameters

  obj | pointer to a snd_hwdep_info_t structure

Returns
  hwdep card number

## snd_hwdep_info_get_device()

unsigned int snd_hwdep_info_get_device | ( | const snd_hwdep_info_t * | info | ) |

get hwdep device number

Parameters

  info | pointer to a snd_hwdep_info_t structure

Returns
  hwdep device number

## snd_hwdep_info_get_id()

const char * snd_hwdep_info_get_id | ( | const snd_hwdep_info_t * | obj | ) |

get hwdep driver identifier

Parameters

  obj | pointer to a snd_hwdep_info_t structure

Returns
  hwdep driver identifier

## snd_hwdep_info_get_iface()

snd_hwdep_iface_t snd_hwdep_info_get_iface | ( | const snd_hwdep_info_t * | obj | ) |

get hwdep protocol interface

Parameters

  obj | pointer to a snd_hwdep_info_t structure

Returns
  hwdep protocol interface

## snd_hwdep_info_get_name()

const char * snd_hwdep_info_get_name | ( | const snd_hwdep_info_t * | obj | ) |

get hwdep driver name

Parameters

  obj | pointer to a snd_hwdep_info_t structure

Returns
  hwdep driver name

## snd_hwdep_info_malloc()

int snd_hwdep_info_malloc | ( | snd_hwdep_info_t ** | info | ) |

allocate a new snd_hwdep_info_t structure

Parameters

  info | returned pointer

Returns
  0 on success otherwise a negative error code if fails

Allocates a new snd_hwdep_info_t structure using the standard malloc C library function.

## snd_hwdep_info_set_device()

void snd_hwdep_info_set_device | ( | snd_hwdep_info_t * | obj,
|  | unsigned int | val )

set hwdep device number

Parameters

  obj | pointer to a snd_hwdep_info_t structure
  val | hwdep device

## snd_hwdep_info_sizeof()

size_t snd_hwdep_info_sizeof | ( | void |  | ) |

get size of the snd_hwdep_info_t structure in bytes

Returns
  size of the snd_hwdep_info_t structure in bytes

## snd_hwdep_ioctl()

int snd_hwdep_ioctl | ( | snd_hwdep_t * | hwdep,
|  | unsigned int | request,
|  | void * | arg )

do hardware dependent ioctl

Parameters

  hwdep | HwDep handle
  request | ioctl command
  arg | ioctl argument

Returns
  0 on success otherwise a negative error code

## snd_hwdep_nonblock()

int snd_hwdep_nonblock | ( | snd_hwdep_t * | hwdep,
|  | int | nonblock )

set nonblock mode

Parameters

  hwdep | HwDep handle
  nonblock | 0 = block, 1 = nonblock mode

Returns
  0 on success otherwise a negative error code

## snd_hwdep_open()

int snd_hwdep_open | ( | snd_hwdep_t ** | hwdep,
|  | const char * | name,
|  | int | mode )

Opens a new connection to the HwDep interface.

Parameters

  hwdep | Returned handle (NULL if not wanted)
  name | ASCII identifier of the HwDep handle
  mode | Open mode

Returns
  0 on success otherwise a negative error code

Opens a new connection to the HwDep interface specified with an ASCII identifier and mode.

## snd_hwdep_poll_descriptors()

int snd_hwdep_poll_descriptors | ( | snd_hwdep_t * | hwdep,
|  | struct pollfd * | pfds,
|  | unsigned int | space )

get poll descriptors

Parameters

  hwdep | HwDep handle
  pfds | array of poll descriptors
  space | space in the poll descriptor array

Returns
  count of filled descriptors

## snd_hwdep_poll_descriptors_count()

int snd_hwdep_poll_descriptors_count | ( | snd_hwdep_t * | hwdep | ) |

get count of poll descriptors for HwDep handle

Parameters

  hwdep | HwDep handle

Returns
  count of poll descriptors

## snd_hwdep_poll_descriptors_revents()

int snd_hwdep_poll_descriptors_revents | ( | snd_hwdep_t * | hwdep,
|  | struct pollfd * | pfds,
|  | unsigned int | nfds,
|  | unsigned short * | revents )

get returned events from poll descriptors

Parameters

  hwdep | HwDep handle
  pfds | array of poll descriptors
  nfds | count of poll descriptors
  revents | returned events

Returns
  zero if success, otherwise a negative error code

## snd_hwdep_read()

ssize_t snd_hwdep_read | ( | snd_hwdep_t * | hwdep,
|  | void * | buffer,
|  | size_t | size )

read bytes using HwDep handle

Parameters

  hwdep | HwDep handle
  buffer | buffer to store the input bytes
  size | input buffer size in bytes

## snd_hwdep_write()

ssize_t snd_hwdep_write | ( | snd_hwdep_t * | hwdep,
|  | const void * | buffer,
|  | size_t | size )

write bytes using HwDep handle

Parameters

  hwdep | HwDep handle
  buffer | buffer containing bytes to write
  size | output buffer size in bytes