struct vx_rmh {
u16 LgCmd; /* length of the command to send (WORDs) */
u16 LgStat; /* length of the status received (WORDs) */
u32 Cmd[SIZE_MAX_CMD];
u32 Stat[SIZE_MAX_STATUS];
u16 DspStat; /* status type, RMP_SSIZE_XXX */
};
struct vx_ibl_info { int size; /* the current IBL size (0 = query) in bytes */ int max_size; /* max. IBL size in bytes */ int min_size; /* min. IBL size in bytes */ int granularity; /* granularity */
};
int hbuf_size; /* H-buffer size in bytes */ int buffer_bytes; /* the ALSA pcm buffer size in bytes */ int period_bytes; /* the ALSA pcm period size in bytes */ int hw_ptr; /* the current hardware pointer in bytes */ int position; /* the current position in frames (playback only) */ int transferred; /* the transferred size (per period) in frames */ int align; /* size of alignment */
u64 cur_count; /* current sample position (for playback) */
unsignedint references; /* an output pipe may be used for monitoring and/or playback */ struct vx_pipe *monitoring_pipe; /* pointer to the monitoring pipe (capture pipe only)*/
};
struct vx_core;
struct snd_vx_ops { /* low-level i/o */ unsignedchar (*in8)(struct vx_core *chip, int reg); unsignedint (*in32)(struct vx_core *chip, int reg); void (*out8)(struct vx_core *chip, int reg, unsignedchar val); void (*out32)(struct vx_core *chip, int reg, unsignedint val); /* irq */ int (*test_and_ack)(struct vx_core *chip); void (*validate_irq)(struct vx_core *chip, int enable); /* codec */ void (*write_codec)(struct vx_core *chip, int codec, unsignedint data); void (*akm_write)(struct vx_core *chip, int reg, unsignedint data); void (*reset_codec)(struct vx_core *chip); void (*change_audio_source)(struct vx_core *chip, int src); void (*set_clock_source)(struct vx_core *chp, int src); /* chip init */ int (*load_dsp)(struct vx_core *chip, int idx, conststruct firmware *fw); void (*reset_dsp)(struct vx_core *chip); void (*reset_board)(struct vx_core *chip, int cold_reset); int (*add_controls)(struct vx_core *chip); /* pcm */ void (*dma_write)(struct vx_core *chip, struct snd_pcm_runtime *runtime, struct vx_pipe *pipe, int count); void (*dma_read)(struct vx_core *chip, struct snd_pcm_runtime *runtime, struct vx_pipe *pipe, int count);
};
struct snd_vx_hardware { constchar *name; int type; /* VX_TYPE_XXX */
int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh); int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh); int vx_send_rih(struct vx_core *chip, int cmd); int vx_send_rih_nolock(struct vx_core *chip, int cmd);
void vx_reset_codec(struct vx_core *chip, int cold_reset);
/* * check the bit on the specified register * returns zero if a bit matches, or a negative error code. * exported for vxpocket driver
*/ int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time); #define vx_check_isr(chip,mask,bit,time) snd_vx_check_reg_bit(chip, VX_ISR, mask, bit, time) #define vx_wait_isr_bit(chip,bit) vx_check_isr(chip, bit, bit, 200) #define vx_wait_for_rx_full(chip) vx_wait_isr_bit(chip, ISR_RX_FULL)
/* * mixer stuff
*/ int snd_vx_mixer_new(struct vx_core *chip); void vx_toggle_dac_mute(struct vx_core *chip, int mute); int vx_sync_audio_source(struct vx_core *chip); int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active);
/* RMH status type */ enum {
RMH_SSIZE_FIXED = 0, /* status size given by the driver (in LgStat) */
RMH_SSIZE_ARG = 1, /* status size given in the LSB byte */
RMH_SSIZE_MASK = 2, /* status size given in bitmask */
};
/* bits for ICR register */ #define ICR_HF1 0x10 #define ICR_HF0 0x08 #define ICR_TREQ 0x02 /* Interrupt mode + HREQ set on for transfer (->DSP) request */ #define ICR_RREQ 0x01 /* Interrupt mode + RREQ set on for transfer (->PC) request */
/* Is there async. events pending ( IT Source Test ) */ #define ASYNC_EVENTS_PENDING 0x008000 #define HBUFFER_EVENTS_PENDING 0x004000 // Not always accurate #define NOTIF_EVENTS_PENDING 0x002000 #define TIME_CODE_EVENT_PENDING 0x001000 #define FREQUENCY_CHANGE_EVENT_PENDING 0x000800 #define END_OF_BUFFER_EVENTS_PENDING 0x000400 #define FATAL_DSP_ERROR 0xff0000
/* Stream Format Header Defines */ #define HEADER_FMT_BASE 0xFED00000 #define HEADER_FMT_MONO 0x000000C0 #define HEADER_FMT_INTEL 0x00008000 #define HEADER_FMT_16BITS 0x00002000 #define HEADER_FMT_24BITS 0x00004000 #define HEADER_FMT_UPTO11 0x00000200 /* frequency is less or equ. to 11k.*/ #define HEADER_FMT_UPTO32 0x00000100 /* frequency is over 11k and less then 32k.*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.