X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fwavfront.c;h=9057edaaab16fd1bc3a0a468aeb50c2f2b5b24d7;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=e0ecd44a3577e12c1fee3e04eaba5c46b88c7e83;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/sound/oss/wavfront.c b/sound/oss/wavfront.c index e0ecd44a3..9057edaaa 100644 --- a/sound/oss/wavfront.c +++ b/sound/oss/wavfront.c @@ -157,14 +157,14 @@ int wf_raw; /* we normally check for "raw state" to firmware board and load the firmware anyway. */ -int fx_raw = 1; /* if this is zero, we'll leave the FX processor in - whatever state it is when the driver is loaded. - The default is to download the microprogram and - associated coefficients to set it up for "default" - operation, whatever that means. - */ - -int debug_default; /* you can set this to control debugging +static int fx_raw = 1; /* if this is zero, we'll leave the FX processor in + whatever state it is when the driver is loaded. + The default is to download the microprogram and + associated coefficients to set it up for "default" + operation, whatever that means. + */ + +static int debug_default; /* you can set this to control debugging during driver loading. it takes any combination of the WF_DEBUG_* flags defined in wavefront.h @@ -172,44 +172,46 @@ int debug_default; /* you can set this to control debugging /* XXX this needs to be made firmware and hardware version dependent */ -char *ospath = "/etc/sound/wavefront.os"; /* where to find a processed - version of the WaveFront OS - */ +static char *ospath = "/etc/sound/wavefront.os"; /* where to find a processed + version of the WaveFront OS + */ -int wait_polls = 2000; /* This is a number of tries we poll the status register - before resorting to sleeping. WaveFront being an ISA - card each poll takes about 1.2us. So before going to - sleep we wait up to 2.4ms in a loop. - */ +static int wait_polls = 2000; /* This is a number of tries we poll the + status register before resorting to sleeping. + WaveFront being an ISA card each poll takes + about 1.2us. So before going to + sleep we wait up to 2.4ms in a loop. + */ -int sleep_length = HZ/100; /* This says how long we're going to sleep between polls. - 10ms sounds reasonable for fast response. - */ +static int sleep_length = HZ/100; /* This says how long we're going to + sleep between polls. + 10ms sounds reasonable for fast response. + */ -int sleep_tries = 50; /* Wait for status 0.5 seconds total. */ +static int sleep_tries = 50; /* Wait for status 0.5 seconds total. */ -int reset_time = 2; /* hundreths of a second we wait after a HW reset for +static int reset_time = 2; /* hundreths of a second we wait after a HW reset for the expected interrupt. */ -int ramcheck_time = 20; /* time in seconds to wait while ROM code - checks on-board RAM. - */ - -int osrun_time = 10; /* time in seconds we wait for the OS to - start running. - */ - -MODULE_PARM(wf_raw,"i"); -MODULE_PARM(fx_raw,"i"); -MODULE_PARM(debug_default,"i"); -MODULE_PARM(wait_polls,"i"); -MODULE_PARM(sleep_length,"i"); -MODULE_PARM(sleep_tries,"i"); -MODULE_PARM(ospath,"s"); -MODULE_PARM(reset_time,"i"); -MODULE_PARM(ramcheck_time,"i"); -MODULE_PARM(osrun_time,"i"); +static int ramcheck_time = 20; /* time in seconds to wait while ROM code + checks on-board RAM. + */ + +static int osrun_time = 10; /* time in seconds we wait for the OS to + start running. + */ + +module_param(wf_raw, int, 0); +module_param(fx_raw, int, 0); +module_param(debug_default, int, 0); +module_param(wait_polls, int, 0); +module_param(sleep_length, int, 0); +module_param(sleep_tries, int, 0); +module_param(ospath, charp, 0); +module_param(reset_time, int, 0); +module_param(ramcheck_time, int, 0); +module_param(osrun_time, int, 0); /***************************************************************************/ @@ -275,7 +277,7 @@ struct wf_config { wait_queue_head_t interrupt_sleeper; } dev; -static spinlock_t lock=SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(lock); static int detect_wffx(void); static int wffx_ioctl (wavefront_fx_info *); static int wffx_init (void); @@ -1402,7 +1404,7 @@ wavefront_fetch_multisample (wavefront_patch_info *header) num_samples = (1 << log_ns[0]); for (i = 0; i < num_samples; i++) { - char d[2]; + s8 d[2]; if ((d[0] = wavefront_read ()) == -1) { printk (KERN_ERR LOGNAME "upload multisample failed " @@ -2036,7 +2038,7 @@ wavefront_oss_ioctl (int devno, unsigned int cmd, void __user * arg) } } -int +static int wavefront_oss_load_patch (int devno, int format, const char __user *addr, int offs, int count, int pmgr_flag) { @@ -2165,7 +2167,7 @@ wavefrontintr(int irq, void *dev_id, struct pt_regs *dummy) 7 Unused */ -int +static int wavefront_interrupt_bits (int irq) { @@ -2193,7 +2195,7 @@ wavefront_interrupt_bits (int irq) return bits; } -void +static void wavefront_should_cause_interrupt (int val, int port, int timeout) { @@ -2895,16 +2897,6 @@ int __init detect_wffx (void) return 0; } -int __init attach_wffx (void) -{ - if ((dev.fx_mididev = sound_alloc_mididev ()) < 0) { - printk (KERN_WARNING LOGNAME "cannot install FX Midi driver\n"); - return -1; - } - - return 0; -} - void wffx_mute (int onoff) @@ -2961,8 +2953,8 @@ wffx_memset (int page, if (i != cnt) { printk (KERN_WARNING LOGNAME "FX memset " - "(0x%x, 0x%x, 0x%x, %d) incomplete\n", - page, addr, (int) data, cnt); + "(0x%x, 0x%x, %p, %d) incomplete\n", + page, addr, data, cnt); return -(EIO); } } @@ -3490,8 +3482,8 @@ static int irq = -1; MODULE_AUTHOR ("Paul Barton-Davis "); MODULE_DESCRIPTION ("Turtle Beach WaveFront Linux Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM (io,"i"); -MODULE_PARM (irq,"i"); +module_param (io, int, 0); +module_param (irq, int, 0); static int __init init_wavfront (void) {