diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 08:16:23 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 08:16:23 +0000 |
commit | c86f0c7a71e7ade3e38b325c186a9cf374e0411e (patch) | |
tree | 176f04f674860c7cfae9ac5d2ff4d4e1d73cb2b7 /sys/i386/isa/sound | |
parent | 423ba8f9bc23d93bfc244aca9b12563b1c9de90d (diff) | |
download | FreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.zip FreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.tar.gz |
Remove trailing whitespace.
Diffstat (limited to 'sys/i386/isa/sound')
-rw-r--r-- | sys/i386/isa/sound/dev_table.h | 18 | ||||
-rw-r--r-- | sys/i386/isa/sound/dmabuf.c | 12 | ||||
-rw-r--r-- | sys/i386/isa/sound/finetune.h | 30 | ||||
-rw-r--r-- | sys/i386/isa/sound/midi_ctrl.h | 2 | ||||
-rw-r--r-- | sys/i386/isa/sound/opl3.h | 8 | ||||
-rw-r--r-- | sys/i386/isa/sound/os.h | 28 | ||||
-rw-r--r-- | sys/i386/isa/sound/pas.h | 10 | ||||
-rw-r--r-- | sys/i386/isa/sound/pas2_card.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/sound/sb_mixer.h | 16 | ||||
-rw-r--r-- | sys/i386/isa/sound/sound_calls.h | 4 | ||||
-rw-r--r-- | sys/i386/isa/sound/sound_config.h | 10 | ||||
-rw-r--r-- | sys/i386/isa/sound/soundcard.c | 12 | ||||
-rw-r--r-- | sys/i386/isa/sound/tuning.h | 30 | ||||
-rw-r--r-- | sys/i386/isa/sound/ulaw.h | 128 | ||||
-rw-r--r-- | sys/i386/isa/sound/vat_audio.c | 6 |
15 files changed, 158 insertions, 158 deletions
diff --git a/sys/i386/isa/sound/dev_table.h b/sys/i386/isa/sound/dev_table.h index 91df56e..f278223 100644 --- a/sys/i386/isa/sound/dev_table.h +++ b/sys/i386/isa/sound/dev_table.h @@ -2,7 +2,7 @@ * dev_table.h * * Global definitions for device call tables - * + * * Copyright by Hannu Savolainen 1993 * * Redistribution and use in source and binary forms, with or without @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: dev_table.h,v 1.12 1995/03/12 23:33:50 swallace Exp $ + * $Id: dev_table.h,v 1.13 1995/03/28 07:56:11 bde Exp $ */ #ifndef _DEV_TABLE_H_ @@ -117,9 +117,9 @@ struct audio_operations { void *devc; /* Driver specific info */ int (*open) (int dev, int mode); void (*close) (int dev); - void (*output_block) (int dev, unsigned long buf, + void (*output_block) (int dev, unsigned long buf, int count, int intrflag, int dma_restart); - void (*start_input) (int dev, unsigned long buf, + void (*start_input) (int dev, unsigned long buf, int count, int intrflag, int dma_restart); int (*ioctl) (int dev, unsigned int cmd, unsigned int arg, int local); int (*prepare_for_input) (int dev, int bufsize, int nbufs); @@ -197,7 +197,7 @@ struct sound_timer_operations { void (*arm_timer)(int dev, long time); }; -#ifdef _DEV_TABLE_C_ +#ifdef _DEV_TABLE_C_ struct audio_operations *audio_devs[MAX_AUDIO_DEV] = {NULL}; int num_audiodevs = 0; struct mixer_operations *mixer_devs[MAX_MIXER_DEV] = {NULL}; int num_mixers = 0; struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV] = {NULL}; int num_synths = 0; @@ -205,12 +205,12 @@ struct sound_timer_operations { #ifndef EXCLUDE_SEQUENCER extern struct sound_timer_operations default_sound_timer; - struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = - {&default_sound_timer, NULL}; + struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = + {&default_sound_timer, NULL}; int num_sound_timers = 1; #else - struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = - {NULL}; + struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = + {NULL}; int num_sound_timers = 0; #endif diff --git a/sys/i386/isa/sound/dmabuf.c b/sys/i386/isa/sound/dmabuf.c index aaf57a6..e7d8216 100644 --- a/sys/i386/isa/sound/dmabuf.c +++ b/sys/i386/isa/sound/dmabuf.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: dmabuf.c,v 1.14 1995/03/18 20:01:10 swallace Exp $ + * $Id: dmabuf.c,v 1.15 1995/05/07 06:38:47 pst Exp $ */ #include "sound_config.h" @@ -435,7 +435,7 @@ DMAbuf_ioctl (int dev, unsigned int cmd, unsigned int arg, int local) break; case SNDCTL_DSP_SETBLKSIZE: - { + { int size = IOCTL_IN (arg); if(!(dmap->flags & DMA_ALLOC_DONE) && size) @@ -921,7 +921,7 @@ DMAbuf_input_ready(int dev) { int h,i,r; struct dma_buffparms *dmap = audio_devs[dev]->dmap; - + r = 0; if(dmap->qlen) { @@ -931,13 +931,13 @@ DMAbuf_input_ready(int dev) { h = (dmap->qhead + i) % dmap->nbufs; r += dmap->fragment_size - dmap->counts[h]; - if(r >= dmap->fragment_size) + if(r >= dmap->fragment_size) break; - } + } if(r < dmap->fragment_size) r = 0; else - r = 1; + r = 1; } else r = 1; diff --git a/sys/i386/isa/sound/finetune.h b/sys/i386/isa/sound/finetune.h index 6c17d74..00085f9 100644 --- a/sys/i386/isa/sound/finetune.h +++ b/sys/i386/isa/sound/finetune.h @@ -28,21 +28,21 @@ unsigned short finetune_table[128] = { -/* 0 */ 9439, 9447, 9456, 9464, 9473, 9481, 9490, 9499, -/* 8 */ 9507, 9516, 9524, 9533, 9542, 9550, 9559, 9567, -/* 16 */ 9576, 9585, 9593, 9602, 9611, 9619, 9628, 9637, -/* 24 */ 9645, 9654, 9663, 9672, 9680, 9689, 9698, 9707, -/* 32 */ 9715, 9724, 9733, 9742, 9750, 9759, 9768, 9777, -/* 40 */ 9786, 9795, 9803, 9812, 9821, 9830, 9839, 9848, -/* 48 */ 9857, 9866, 9874, 9883, 9892, 9901, 9910, 9919, -/* 56 */ 9928, 9937, 9946, 9955, 9964, 9973, 9982, 9991, -/* 64 */ 10000, 10009, 10018, 10027, 10036, 10045, 10054, 10063, -/* 72 */ 10072, 10082, 10091, 10100, 10109, 10118, 10127, 10136, -/* 80 */ 10145, 10155, 10164, 10173, 10182, 10191, 10201, 10210, -/* 88 */ 10219, 10228, 10237, 10247, 10256, 10265, 10274, 10284, -/* 96 */ 10293, 10302, 10312, 10321, 10330, 10340, 10349, 10358, -/* 104 */ 10368, 10377, 10386, 10396, 10405, 10415, 10424, 10433, -/* 112 */ 10443, 10452, 10462, 10471, 10481, 10490, 10499, 10509, +/* 0 */ 9439, 9447, 9456, 9464, 9473, 9481, 9490, 9499, +/* 8 */ 9507, 9516, 9524, 9533, 9542, 9550, 9559, 9567, +/* 16 */ 9576, 9585, 9593, 9602, 9611, 9619, 9628, 9637, +/* 24 */ 9645, 9654, 9663, 9672, 9680, 9689, 9698, 9707, +/* 32 */ 9715, 9724, 9733, 9742, 9750, 9759, 9768, 9777, +/* 40 */ 9786, 9795, 9803, 9812, 9821, 9830, 9839, 9848, +/* 48 */ 9857, 9866, 9874, 9883, 9892, 9901, 9910, 9919, +/* 56 */ 9928, 9937, 9946, 9955, 9964, 9973, 9982, 9991, +/* 64 */ 10000, 10009, 10018, 10027, 10036, 10045, 10054, 10063, +/* 72 */ 10072, 10082, 10091, 10100, 10109, 10118, 10127, 10136, +/* 80 */ 10145, 10155, 10164, 10173, 10182, 10191, 10201, 10210, +/* 88 */ 10219, 10228, 10237, 10247, 10256, 10265, 10274, 10284, +/* 96 */ 10293, 10302, 10312, 10321, 10330, 10340, 10349, 10358, +/* 104 */ 10368, 10377, 10386, 10396, 10405, 10415, 10424, 10433, +/* 112 */ 10443, 10452, 10462, 10471, 10481, 10490, 10499, 10509, /* 120 */ 10518, 10528, 10537, 10547, 10556, 10566, 10576, 10585 }; #else diff --git a/sys/i386/isa/sound/midi_ctrl.h b/sys/i386/isa/sound/midi_ctrl.h index 75b6fd8..3aa0f17 100644 --- a/sys/i386/isa/sound/midi_ctrl.h +++ b/sys/i386/isa/sound/midi_ctrl.h @@ -12,7 +12,7 @@ static unsigned char ctrl_def_values[128] = 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 40 to 47 */ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 48 to 55 */ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 56 to 63 */ - + 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 64 to 71 */ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 72 to 79 */ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 80 to 87 */ diff --git a/sys/i386/isa/sound/opl3.h b/sys/i386/isa/sound/opl3.h index 5fa6aa5..d5101cd 100644 --- a/sys/i386/isa/sound/opl3.h +++ b/sys/i386/isa/sound/opl3.h @@ -37,7 +37,7 @@ * The percussive mode is implemented in the left side only. * * With the above exceptions the both sides can be operated independently. - * + * * A 4 OP voice can be created by setting the corresponding * bit at offset 4 of the right side. * @@ -46,7 +46,7 @@ * voice is made inaccessible. * * If a voice is set to the 2 OP mode, it works like 2 OP modes - * of the original YM3812 (AdLib). In addition the voice can + * of the original YM3812 (AdLib). In addition the voice can * be connected the left, right or both stereo channels. It can * even be left unconnected. This works with 4 OP voices also. * @@ -179,13 +179,13 @@ * 0 0 >+-1-+--2--3--4--> * * - * + * * +---+ * | | * 0 1 >+-1-+--2-+ * |-> * >--3----4-+ - * + * * +---+ * | | * 1 0 >+-1-+-----+ diff --git a/sys/i386/isa/sound/os.h b/sys/i386/isa/sound/os.h index 2e888c0..6076065 100644 --- a/sys/i386/isa/sound/os.h +++ b/sys/i386/isa/sound/os.h @@ -35,7 +35,7 @@ * * If you have to make changes to other than these two files, please contact me * before making the changes. It's possible that I have already made the - * change. + * change. * * os.h,v 1.13 1994/10/01 02:16:53 swallace Exp */ @@ -64,7 +64,7 @@ */ #ifdef CONFIGURE_SOUNDCARD -/* +/* * select() is currently implemented in Linux specific way. Don't enable. * I don't remember what the SHORT_BANNERS means so forget it. */ @@ -79,18 +79,18 @@ * Here is the first portability problem. Every OS has it's own way to * pass a pointer to the buffer in read() and write() calls. In Linux it's * just a char*. In BSD it's struct uio. This parameter is passed to - * all functions called from read() or write(). Since nothing can be + * all functions called from read() or write(). Since nothing can be * assumed about this structure, the driver uses set of macros for - * accessing the user buffer. + * accessing the user buffer. * * The driver reads/writes bytes in the user buffer sequentially which * means that calls like uiomove() can be used. * * snd_rw_buf is the type which is passed to the device file specific * read() and write() calls. - * + * * The following macros are used to move date to and from the - * user buffer. These macros should be used only when the + * user buffer. These macros should be used only when the * target or source parameter has snd_rw_buf type. * The offs parameter is a offset relative to the beginning of * the user buffer. In Linux the offset is required but for example @@ -115,7 +115,7 @@ typedef struct uio snd_rw_buf; do { if (uiomove(source, count, (struct uio *)target)) { \ printf ("sb: Bad copyout()!\n"); \ } } while(0) -/* +/* * The following macros are like COPY_*_USER but work just with one byte (8bit), * short (16 bit) or long (32 bit) at a time. * The same restrictions apply than for COPY_*_USER @@ -194,7 +194,7 @@ struct snd_wait { * the process is resumed if it receives a signal. The following is propably * not the way how it should be done on 386bsd. * The on_what parameter is a wait_queue defined with DEFINE_WAIT_QUEUE(), - * and the second is a workarea parameter. The third is a timeout + * and the second is a workarea parameter. The third is a timeout * in ticks. Zero means no timeout. */ #define DO_SLEEP(q, f, time_limit) \ @@ -220,10 +220,10 @@ struct snd_wait { #define HZ hz #endif -/* +/* * GET_TIME() returns current value of the counter incremented at timer * ticks. This can overflow, so the timeout might be real big... - * + * */ extern unsigned long get_time(void); #define GET_TIME() get_time() @@ -250,7 +250,7 @@ extern unsigned long get_time(void); */ #define INB inb -/* +/* * The outb(0, 0x80) is just for slowdown. It's bit unsafe since * this address could be used for something usefull. */ @@ -267,9 +267,9 @@ extern unsigned long get_time(void); #define RET_ERROR(err) -(err) -/* - KERNEL_MALLOC() allocates requested number of memory and - KERNEL_FREE is used to free it. +/* + KERNEL_MALLOC() allocates requested number of memory and + KERNEL_FREE is used to free it. These macros are never called from interrupt, in addition the nbytes will never be more than 4096 bytes. Generally the driver will allocate memory in blocks of 4k. If the kernel has just a diff --git a/sys/i386/isa/sound/pas.h b/sys/i386/isa/sound/pas.h index bdb9c56..78e90bf 100644 --- a/sys/i386/isa/sound/pas.h +++ b/sys/i386/isa/sound/pas.h @@ -47,7 +47,7 @@ #define SYSTEM_CONFIGURATION_1 0x8388 /* R W Control */ #define S_C_1_PCS_ENABLE 0x01 /* R W PC speaker 1=enable, 0=disable PC speaker emulation */ - #define S_C_1_PCM_CLOCK_SELECT 0x02 /* R W PCM 1=14.31818Mhz/12, 0=28.224Mhz master clock */ + #define S_C_1_PCM_CLOCK_SELECT 0x02 /* R W PCM 1=14.31818Mhz/12, 0=28.224Mhz master clock */ #define S_C_1_FM_EMULATE_CLOCK 0x04 /* R W FM 1=use 28.224Mhz/2, 0=use 14.31818Mhz clock */ #define S_C_1_PCS_STEREO 0x10 /* R W PC speaker 1=enable PC speaker stereo effect, 0=disable */ #define S_C_1_PCS_REALSOUND 0x20 /* R W PC speaker 1=enable RealSound enhancement, 0=disable */ @@ -114,7 +114,7 @@ struct { /* R W Mixer Filter translation */ unsigned int freq:24; unsigned int value:8; - } F_F_FILTER_translate[] = + } F_F_FILTER_translate[] = { { 73500, 0x01 }, /* 73500Hz - divide by 16 */ { 65333, 0x02 }, /* 65333Hz - divide by 18 */ { 49000, 0x09 }, /* 49000Hz - divide by 24 */ @@ -142,7 +142,7 @@ unsigned char I_C_2_PCM_DMA_translate[] = /* R W PCM PCM DMA channel value translations */ { 4, 1, 2, 3, 0, 5, 6, 7 }; unsigned char I_C_3_PCM_IRQ_translate[] = /* R W PCM PCM IRQ level value translation */ - { 0, 0, 1, 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 0, 10, 11 }; + { 0, 0, 1, 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 0, 10, 11 }; unsigned char E_C_MPU401_IRQ_translate[] = /* R W MIDI MPU401 emulation IRQ value translation */ { 0x00, 0x00, 0x01, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x01, 0x05, 0x06, 0x07 }; unsigned char E_C_SB_IRQ_translate[] = /* R W PCM SB emulation IRQ translate */ @@ -150,7 +150,7 @@ unsigned char E_C_SB_DMA_translate[] = /* R W PCM SB emulation DMA translate */ { 0x00, 0x40, 0x80, 0xC0, 0, 0, 0, 0 }; unsigned char O_M_1_to_card[] = /* R W Control Translate (OM1 & 0x0f) to card type */ - { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 0, 2, 3 }; + { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 0, 2, 3 }; #else extern unsigned char I_C_2_PCM_DMA_translate[]; /* R W PCM PCM DMA channel value translations */ extern unsigned char I_C_3_PCM_IRQ_translate[]; /* R W PCM PCM IRQ level value translation */ @@ -251,4 +251,4 @@ #define MIDI_FIFO_STATUS 0x1B89 /* R W MIDI Midi fifo status */ #define MIDI_DATA 0x178A /* R W MIDI Midi data register */ -#define MIDI_INPUT_AVAILABLE 0x0f /* RW MIDI */ +#define MIDI_INPUT_AVAILABLE 0x0f /* RW MIDI */ diff --git a/sys/i386/isa/sound/pas2_card.c b/sys/i386/isa/sound/pas2_card.c index 204946e..13f2efc 100644 --- a/sys/i386/isa/sound/pas2_card.c +++ b/sys/i386/isa/sound/pas2_card.c @@ -380,7 +380,7 @@ attach_pas_card (long mem_start, struct address_info *hw_config) if (detect_pas_hw (hw_config)) { - board_rev_id = pas_read (BOARD_REV_ID); + board_rev_id = pas_read (BOARD_REV_ID); if (pas_model = pas_read (CHIP_REV)) { #ifdef __FreeBSD__ diff --git a/sys/i386/isa/sound/sb_mixer.h b/sys/i386/isa/sound/sb_mixer.h index 495b040..e605e79 100644 --- a/sys/i386/isa/sound/sb_mixer.h +++ b/sys/i386/isa/sound/sb_mixer.h @@ -1,10 +1,10 @@ /* * sound/sb_mixer.h - * + * * Definitions for the SB Pro and SB16 mixers - * + * * Copyright by Hannu Savolainen 1993 - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: 1. Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -28,7 +28,7 @@ * Modified: * Hunyue Yau Jan 6 1994 * Added defines for the Sound Galaxy NX Pro mixer. - * + * * sb_mixer.h,v 1.4 1994/10/01 02:17:08 swallace Exp */ @@ -57,11 +57,11 @@ /* * Mixer registers - * + * * NOTE! RECORD_SRC == IN_FILTER */ -/* +/* * Mixer registers of SB Pro */ #define VOC_VOL 0x04 @@ -80,7 +80,7 @@ #define OPSW 0x3c /* - * Additional registers on the SG NX Pro + * Additional registers on the SG NX Pro */ #define COVOX_VOL 0x42 #define TREBLE_LVL 0x44 diff --git a/sys/i386/isa/sound/sound_calls.h b/sys/i386/isa/sound/sound_calls.h index dea28e3..ed00975 100644 --- a/sys/i386/isa/sound/sound_calls.h +++ b/sys/i386/isa/sound/sound_calls.h @@ -1,7 +1,7 @@ /* * DMA buffer calls * - * $Id: sound_calls.h,v 1.11 1995/03/28 07:56:13 bde Exp $ + * $Id: sound_calls.h,v 1.12 1995/05/07 06:38:48 pst Exp $ */ #ifndef _MACHINE_ISA_SOUND_H_ @@ -87,7 +87,7 @@ long CMIDI_init (long mem_start); int CMIDI_open (int dev, struct fileinfo *file); int CMIDI_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); int CMIDI_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); -int CMIDI_close (int dev, struct fileinfo *file); +int CMIDI_close (int dev, struct fileinfo *file); /* * diff --git a/sys/i386/isa/sound/sound_config.h b/sys/i386/isa/sound/sound_config.h index 470bc01..c3732d5 100644 --- a/sys/i386/isa/sound/sound_config.h +++ b/sys/i386/isa/sound/sound_config.h @@ -2,7 +2,7 @@ * * A driver for Soundcards, misc configuration parameters. * - * + * * Copyright by Hannu Savolainen 1993 * * Redistribution and use in source and binary forms, with or without @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sound_config.h,v 1.6 1994/10/01 02:17:11 swallace Exp $ + * $Id: sound_config.h,v 1.9 1995/03/12 23:34:07 swallace Exp $ */ #include "local.h" @@ -118,7 +118,7 @@ If your card has nonstandard I/O address or IRQ number, change defines #endif #ifndef GUS16_BASE -#define GUS16_BASE 0x530 +#define GUS16_BASE 0x530 #endif #ifndef GUS16_IRQ @@ -158,7 +158,7 @@ If your card has nonstandard I/O address or IRQ number, change defines #define MSS_BASE 0x530 #endif -#ifndef MSS_IRQ +#ifndef MSS_IRQ #define MSS_IRQ 10 #endif @@ -170,7 +170,7 @@ If your card has nonstandard I/O address or IRQ number, change defines #define U6850_BASE 0x330 #endif -#ifndef U6850_IRQ +#ifndef U6850_IRQ #define U6850_IRQ 5 #endif diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c index 254f49f..a396727 100644 --- a/sys/i386/isa/sound/soundcard.c +++ b/sys/i386/isa/sound/soundcard.c @@ -1,8 +1,8 @@ /* * sound/386bsd/soundcard.c - * + * * Soundcard driver for FreeBSD. - * + * * Copyright by Hannu Savolainen 1993 * * Redistribution and use in source and binary forms, with or without @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: soundcard.c,v 1.24 1995/03/12 23:34:10 swallace Exp $ + * $Id: soundcard.c,v 1.25 1995/05/11 19:26:24 rgrimes Exp $ */ #include "sound_config.h" @@ -91,7 +91,7 @@ int x; return timecopy.tv_usec/(1000000/HZ) + (unsigned long)timecopy.tv_sec*HZ; } - + int sndread (int dev, struct uio *buf) @@ -243,7 +243,7 @@ sndprobe (struct isa_device *dev) hw_config.io_base = dev->id_iobase; hw_config.irq = ipri_to_irq (dev->id_irq); hw_config.dma = dev->id_drq; - + if(unit) return sndtable_probe (unit, &hw_config); else @@ -256,7 +256,7 @@ sndattach (struct isa_device *dev) int i, unit; static int midi_initialized = 0; static int seq_initialized = 0; - static int generic_midi_initialized = 0; + static int generic_midi_initialized = 0; unsigned long mem_start = 0xefffffffUL; struct address_info hw_config; diff --git a/sys/i386/isa/sound/tuning.h b/sys/i386/isa/sound/tuning.h index 936ff6a..0d1d6bb 100644 --- a/sys/i386/isa/sound/tuning.h +++ b/sys/i386/isa/sound/tuning.h @@ -3,27 +3,27 @@ */ #ifdef SEQUENCER_C -unsigned short semitone_tuning[24] = +unsigned short semitone_tuning[24] = { -/* 0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983, -/* 8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784, +/* 0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983, +/* 8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784, /* 16 */ 25198, 26697, 28284, 29966, 31748, 33636, 35636, 37755 }; unsigned short cent_tuning[100] = { -/* 0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041, -/* 8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087, -/* 16 */ 10093, 10099, 10105, 10110, 10116, 10122, 10128, 10134, -/* 24 */ 10140, 10145, 10151, 10157, 10163, 10169, 10175, 10181, -/* 32 */ 10187, 10192, 10198, 10204, 10210, 10216, 10222, 10228, -/* 40 */ 10234, 10240, 10246, 10251, 10257, 10263, 10269, 10275, -/* 48 */ 10281, 10287, 10293, 10299, 10305, 10311, 10317, 10323, -/* 56 */ 10329, 10335, 10341, 10347, 10353, 10359, 10365, 10371, -/* 64 */ 10377, 10383, 10389, 10395, 10401, 10407, 10413, 10419, -/* 72 */ 10425, 10431, 10437, 10443, 10449, 10455, 10461, 10467, -/* 80 */ 10473, 10479, 10485, 10491, 10497, 10503, 10509, 10515, -/* 88 */ 10521, 10528, 10534, 10540, 10546, 10552, 10558, 10564, +/* 0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041, +/* 8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087, +/* 16 */ 10093, 10099, 10105, 10110, 10116, 10122, 10128, 10134, +/* 24 */ 10140, 10145, 10151, 10157, 10163, 10169, 10175, 10181, +/* 32 */ 10187, 10192, 10198, 10204, 10210, 10216, 10222, 10228, +/* 40 */ 10234, 10240, 10246, 10251, 10257, 10263, 10269, 10275, +/* 48 */ 10281, 10287, 10293, 10299, 10305, 10311, 10317, 10323, +/* 56 */ 10329, 10335, 10341, 10347, 10353, 10359, 10365, 10371, +/* 64 */ 10377, 10383, 10389, 10395, 10401, 10407, 10413, 10419, +/* 72 */ 10425, 10431, 10437, 10443, 10449, 10455, 10461, 10467, +/* 80 */ 10473, 10479, 10485, 10491, 10497, 10503, 10509, 10515, +/* 88 */ 10521, 10528, 10534, 10540, 10546, 10552, 10558, 10564, /* 96 */ 10570, 10576, 10582, 10589 }; #else diff --git a/sys/i386/isa/sound/ulaw.h b/sys/i386/isa/sound/ulaw.h index be9f92d..f60d5b6 100644 --- a/sys/i386/isa/sound/ulaw.h +++ b/sys/i386/isa/sound/ulaw.h @@ -1,69 +1,69 @@ static unsigned char ulaw_dsp[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, - 5, 9, 13, 17, 21, 25, 29, 33, - 37, 41, 45, 49, 53, 57, 61, 65, - 68, 70, 72, 74, 76, 78, 80, 82, - 84, 86, 88, 90, 92, 94, 96, 98, - 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, - 115, 116, 116, 117, 117, 118, 118, 119, - 119, 120, 120, 121, 121, 122, 122, 123, - 123, 123, 124, 124, 124, 124, 125, 125, - 125, 125, 126, 126, 126, 126, 127, 127, - 127, 127, 127, 127, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, - 252, 248, 244, 240, 236, 232, 228, 224, - 220, 216, 212, 208, 204, 200, 196, 192, - 189, 187, 185, 183, 181, 179, 177, 175, - 173, 171, 169, 167, 165, 163, 161, 159, - 157, 156, 155, 154, 153, 152, 151, 150, - 149, 148, 147, 146, 145, 144, 143, 142, - 142, 141, 141, 140, 140, 139, 139, 138, - 138, 137, 137, 136, 136, 135, 135, 134, - 134, 134, 133, 133, 133, 133, 132, 132, - 132, 132, 131, 131, 131, 131, 130, 130, - 130, 130, 130, 130, 129, 129, 129, 129, - 129, 129, 129, 129, 128, 128, 128, 128, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 5, 9, 13, 17, 21, 25, 29, 33, + 37, 41, 45, 49, 53, 57, 61, 65, + 68, 70, 72, 74, 76, 78, 80, 82, + 84, 86, 88, 90, 92, 94, 96, 98, + 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, + 115, 116, 116, 117, 117, 118, 118, 119, + 119, 120, 120, 121, 121, 122, 122, 123, + 123, 123, 124, 124, 124, 124, 125, 125, + 125, 125, 126, 126, 126, 126, 127, 127, + 127, 127, 127, 127, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 252, 248, 244, 240, 236, 232, 228, 224, + 220, 216, 212, 208, 204, 200, 196, 192, + 189, 187, 185, 183, 181, 179, 177, 175, + 173, 171, 169, 167, 165, 163, 161, 159, + 157, 156, 155, 154, 153, 152, 151, 150, + 149, 148, 147, 146, 145, 144, 143, 142, + 142, 141, 141, 140, 140, 139, 139, 138, + 138, 137, 137, 136, 136, 135, 135, 134, + 134, 134, 133, 133, 133, 133, 132, 132, + 132, 132, 131, 131, 131, 131, 130, 130, + 130, 130, 130, 130, 129, 129, 129, 129, + 129, 129, 129, 129, 128, 128, 128, 128, }; static unsigned char dsp_ulaw[] = { - 31, 31, 31, 32, 32, 32, 32, 33, - 33, 33, 33, 34, 34, 34, 34, 35, - 35, 35, 35, 36, 36, 36, 36, 37, - 37, 37, 37, 38, 38, 38, 38, 39, - 39, 39, 39, 40, 40, 40, 40, 41, - 41, 41, 41, 42, 42, 42, 42, 43, - 43, 43, 43, 44, 44, 44, 44, 45, - 45, 45, 45, 46, 46, 46, 46, 47, - 47, 47, 47, 48, 48, 49, 49, 50, - 50, 51, 51, 52, 52, 53, 53, 54, - 54, 55, 55, 56, 56, 57, 57, 58, - 58, 59, 59, 60, 60, 61, 61, 62, - 62, 63, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 81, 83, 85, 87, 89, - 91, 93, 95, 99, 103, 107, 111, 119, - 255, 247, 239, 235, 231, 227, 223, 221, - 219, 217, 215, 213, 211, 209, 207, 206, - 205, 204, 203, 202, 201, 200, 199, 198, - 197, 196, 195, 194, 193, 192, 191, 191, - 190, 190, 189, 189, 188, 188, 187, 187, - 186, 186, 185, 185, 184, 184, 183, 183, - 182, 182, 181, 181, 180, 180, 179, 179, - 178, 178, 177, 177, 176, 176, 175, 175, - 175, 175, 174, 174, 174, 174, 173, 173, - 173, 173, 172, 172, 172, 172, 171, 171, - 171, 171, 170, 170, 170, 170, 169, 169, - 169, 169, 168, 168, 168, 168, 167, 167, - 167, 167, 166, 166, 166, 166, 165, 165, - 165, 165, 164, 164, 164, 164, 163, 163, - 163, 163, 162, 162, 162, 162, 161, 161, - 161, 161, 160, 160, 160, 160, 159, 159, + 31, 31, 31, 32, 32, 32, 32, 33, + 33, 33, 33, 34, 34, 34, 34, 35, + 35, 35, 35, 36, 36, 36, 36, 37, + 37, 37, 37, 38, 38, 38, 38, 39, + 39, 39, 39, 40, 40, 40, 40, 41, + 41, 41, 41, 42, 42, 42, 42, 43, + 43, 43, 43, 44, 44, 44, 44, 45, + 45, 45, 45, 46, 46, 46, 46, 47, + 47, 47, 47, 48, 48, 49, 49, 50, + 50, 51, 51, 52, 52, 53, 53, 54, + 54, 55, 55, 56, 56, 57, 57, 58, + 58, 59, 59, 60, 60, 61, 61, 62, + 62, 63, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 81, 83, 85, 87, 89, + 91, 93, 95, 99, 103, 107, 111, 119, + 255, 247, 239, 235, 231, 227, 223, 221, + 219, 217, 215, 213, 211, 209, 207, 206, + 205, 204, 203, 202, 201, 200, 199, 198, + 197, 196, 195, 194, 193, 192, 191, 191, + 190, 190, 189, 189, 188, 188, 187, 187, + 186, 186, 185, 185, 184, 184, 183, 183, + 182, 182, 181, 181, 180, 180, 179, 179, + 178, 178, 177, 177, 176, 176, 175, 175, + 175, 175, 174, 174, 174, 174, 173, 173, + 173, 173, 172, 172, 172, 172, 171, 171, + 171, 171, 170, 170, 170, 170, 169, 169, + 169, 169, 168, 168, 168, 168, 167, 167, + 167, 167, 166, 166, 166, 166, 165, 165, + 165, 165, 164, 164, 164, 164, 163, 163, + 163, 163, 162, 162, 162, 162, 161, 161, + 161, 161, 160, 160, 160, 160, 159, 159, }; diff --git a/sys/i386/isa/sound/vat_audio.c b/sys/i386/isa/sound/vat_audio.c index 255ed2a..74f0bdd 100644 --- a/sys/i386/isa/sound/vat_audio.c +++ b/sys/i386/isa/sound/vat_audio.c @@ -47,9 +47,9 @@ #define splaudio splclock extern int sndopen (dev_t dev, int flags); -extern int sndclose (dev_t dev, int flags); +extern int sndclose (dev_t dev, int flags); extern int sndioctl (dev_t dev, int cmd, void *arg, int mode); -extern int sndread (int dev, struct uio *uio); +extern int sndread (int dev, struct uio *uio); extern int sndwrite (int dev, struct uio *uio); struct va_softc { @@ -195,7 +195,7 @@ vaopen(dev_t dev, int flags) if (flags & FREAD) /* start the read process */ DMAbuf_start_input(va->rdev>>4); - + return(0); } |