linux/kernel/chr_drv/sound/dev_table.h
Global definitions for device call tables
(C) Hannu Savolainen 1992
See COPYING for further details. Should be distributed with this file.
* NOTE! NOTE! NOTE! NOTE!
* If you modify this file, please check the dev_table.c also.
* NOTE! NOTE! NOTE! NOTE!
int card_type
; /* From soundcard.c */
long (*attach
) (long mem_start
, struct address_info
*hw_config
);
int (*probe
) (struct address_info
*hw_config
);
struct address_info config
;
/** UWM -- new MIDI structure here.. **/
struct generic_midi_info
{
char *name
; /* Name of the MIDI device.. */
long (*attach
) (long mem_start
);
struct audio_operations
{
int (*open
) (int dev
, int mode
);
void (*output_block
) (int dev
, unsigned long buf
, int count
, int intrflag
);
void (*start_input
) (int dev
, unsigned long buf
, int count
, int intrflag
);
int (*ioctl
) (int dev
, unsigned int cmd
, unsigned int arg
, int local
);
int (*prepare_for_input
) (int dev
, int bufsize
, int nbufs
);
int (*prepare_for_output
) (int dev
, int bufsize
, int nbufs
);
void (*halt_xfer
) (int dev
);
int (*has_output_drained
)(int dev
);
void (*copy_from_user
)(int dev
, char *localbuf
, int localoffs
,
snd_rw_buf
*userbuf
, int useroffs
, int len
);
struct mixer_operations
{
int (*ioctl
) (int dev
, unsigned int cmd
, unsigned int arg
);
struct synth_operations
{
int (*open
) (int dev
, int mode
);
int (*ioctl
) (int dev
, unsigned int cmd
, unsigned int arg
);
int (*kill_note
) (int dev
, int voice
, int velocity
);
int (*start_note
) (int dev
, int voice
, int note
, int velocity
);
int (*set_instr
) (int dev
, int voice
, int instr
);
void (*hw_control
) (int dev
, unsigned char *event
);
int (*load_patch
) (int dev
, int format
, snd_rw_buf
*addr
,
int offs
, int count
, int pmgr_flag
);
void (*aftertouch
) (int dev
, int voice
, int pressure
);
void (*controller
) (int dev
, int voice
, int ctrl_num
, int value
);
void (*panning
) (int dev
, int voice
, int value
);
int (*pmgr_interface
) (int dev
, struct patmgr_info
*info
);
int (*open
) (int dev
, int mode
);
int (*ioctl
) (int dev
, unsigned int cmd
, unsigned int arg
);
int (*putc
) (int dev
, unsigned char data
);
int (*start_read
) (int dev
);
int (*end_read
) (int dev
);
int (*command
) (int dev
, unsigned char data
);
int (*buffer_status
) (int dev
);
/** UWM -- new structure for MIDI **/
struct generic_midi_operations
{
int (*open
) (int dev
, int mode
);
int (*write
) (int dev
, struct uio
*data
);
int (*read
) (int dev
, struct uio
*data
);
#ifndef ALL_EXTERNAL_TO_ME
struct generic_midi_operations
* generic_midi_devs
[MAX_MIDI_DEV
] = {NULL
};
int num_generic_midis
= 0, pro_midi_dev
= 0;
struct generic_midi_info midi_supported
[] = {
{"ProAudioSpectrum MV101",pro_midi_attach
}
sizeof (midi_supported
) / sizeof(struct generic_midi_info
);
struct audio_operations
* dsp_devs
[MAX_DSP_DEV
] = {NULL
}; int num_dspdevs
= 0;
struct mixer_operations
* mixer_devs
[MAX_MIXER_DEV
] = {NULL
}; int num_mixers
= 0;
struct synth_operations
* synth_devs
[MAX_SYNTH_DEV
] = {NULL
}; int num_synths
= 0;
struct midi_operations
* midi_devs
[MAX_MIDI_DEV
] = {NULL
}; int num_midis
= 0;
* Note! The detection order is significant. Don't change it.
struct card_info supported_drivers
[] = {
{SNDCARD_MPU401
,"Roland MPU-401", attach_mpu401
, probe_mpu401
,
{SNDCARD_GUS
, "Gravis Ultrasound", attach_gus_card
, probe_gus
,
{GUS_BASE
, GUS_IRQ
, GUS_DMA
}},
{SNDCARD_PAS
, "ProAudioSpectrum", attach_pas_card
, probe_pas
,
{PAS_BASE
, PAS_IRQ
, PAS_DMA
}},
{SNDCARD_SB
, "SoundBlaster", attach_sb_card
, probe_sb
,
{SBC_BASE
, SBC_IRQ
, SBC_DMA
}},
{SNDCARD_ADLIB
, "AdLib", attach_adlib_card
, probe_adlib
,
sizeof(supported_drivers
) / sizeof (struct card_info
);
int sound_buffcounts
[MAX_DSP_DEV
] = {0};
long sound_buffsizes
[MAX_DSP_DEV
] = {0};
int sound_dsp_dmachan
[MAX_DSP_DEV
] = {0};
int sound_dma_automode
[MAX_DSP_DEV
] = {0};
extern struct audio_operations
* dsp_devs
[MAX_DSP_DEV
]; int num_dspdevs
;
extern struct mixer_operations
* mixer_devs
[MAX_MIXER_DEV
]; extern int num_mixers
;
extern struct synth_operations
* synth_devs
[MAX_SYNTH_DEV
]; extern int num_synths
;
extern struct midi_operations
* midi_devs
[MAX_MIDI_DEV
]; extern int num_midis
;
extern struct card_info supported_drivers
[];
extern int num_sound_drivers
;
extern int sound_buffcounts
[MAX_DSP_DEV
];
extern long sound_buffsizes
[MAX_DSP_DEV
];
extern int sound_dsp_dmachan
[MAX_DSP_DEV
];
extern int sound_dma_automode
[MAX_DSP_DEV
];
long sndtable_init(long mem_start
);
int sndtable_get_cardcount (void);
long CMIDI_init(long mem_start
); /* */
/* If external to me.... :) */
#ifdef ALL_EXTERNAL_TO_ME
extern struct audio_operations
* dsp_devs
[MAX_DSP_DEV
]; int num_dspdevs
;
extern struct mixer_operations
* mixer_devs
[MAX_MIXER_DEV
]; extern int num_mixers
;
extern struct synth_operations
* synth_devs
[MAX_SYNTH_DEV
]; extern int num_synths
;
extern struct midi_operations
* midi_devs
[MAX_MIDI_DEV
]; extern int num_midis
;
extern struct generic_midi_operations
*generic_midi_devs
[];
extern int num_generic_midis
, pro_midi_dev
;
extern struct generic_midi_info midi_supported
[];
extern struct card_info supported_drivers
[];
extern int num_sound_drivers
;
extern int num_midi_drivers
;
extern int sound_buffcounts
[MAX_DSP_DEV
];
extern long sound_buffsizes
[MAX_DSP_DEV
];
extern int sound_dsp_dmachan
[MAX_DSP_DEV
];
extern int sound_dma_automode
[MAX_DSP_DEV
];