liso_subdev_t Struct Reference
[Sub-devices]

#include <lisodsp.h>


Detailed Description

Sub-Device info.

A sub-device is common part for any opened devices liso_reader_t and liso_writer_t. This structure must be in the first position (offset 0) in these strutures because of the chained-list mechasnisme.


Data Fields

liso_tlisodsp
 Attached lisodsp device.

int status
 Current status.

semaphore lock
 Lock semaphore.

wait_queue_head_t * sleepyq
 Wait queue for sleeping.

wait_queue_head_t * wakeupq
 Wait queue for waking up.

int channel
 Channel Id.

task_struct * owner
 Owner task (device opener).

struct {
   int   ok
 bit#0 clear: format needs update

   liso_fmt_desc_t   desc
 Current PCM format description.

   const liso_convertor_t *   convertor
 Current PCM convertor.

   liso_topcm_t   topcm
 to internal convertor

   liso_tofmt_t   tofmt
 from internal convertor

   unsigned int   sampling
 Current sampling rate (in Hz).

   int   stereo
 Current Mono/Stereo flag.

   int   log2pcm
 log2 number of byte per PCM

fmt
 Current PCM format informations.

struct {
   int   frag_siz
 PCM per frag.

   int   log2pcm
 Log2 pcm size.

   liso_topcm_t   topcm
 to internal convertor

   liso_tofmt_t   tofmt
 from internal convertor

cur_frag
 Current frag info.

struct {
   int   format
 Requested PCM format.

   int   stereo
 Requested mono/stereo.

   unsigned int   sampling
 Requested smpling rate in Hz.

req_fmt
 Requested PCM format changes.

struct {
   int   cnt
 Current bytes in buf.

   int   idx
 Current index (reader only).

   void *   data
 Temporary buffer.

buf
 Temporary buffer for kernel/user-space memory transfert.

int frag_cnt
 Frag read or write so far.

int lost_cnt
 Frag lost so far.

liso_frags_t frags
 Fragments.


Field Documentation

int liso_subdev_t::channel
 

Channel Id.

For writers : the channel number the writer is binded to.

For readers : always liso_MAX_CHN

struct task_struct* liso_subdev_t::owner
 

Owner task (device opener).

Currently not for real used only to display task name in procfs info. Anyway may be we could use it later to force sheduler running a task when it really needs it.

struct { ... } liso_subdev_t::req_fmt
 

Requested PCM format changes.

Actually format changes committed at next read/write operation.


The documentation for this struct was generated from the following file:

lisodsp logo lisodsp developer documentation
version 0.5.0
Generated on June 2004
by doxygen 1.3.7