Import 2.3.18pre1
[davej-history.git] / drivers / sound / vidc_synth.c
blobba94f0bc6dbb9a3c7e3c47639a266ff1bca827b0
1 /*
2 * drivers/sound/vidc_synth.c
4 * Synthesizer routines for the VIDC
6 * Copyright (C) 1997 Russell King <rmk@arm.uk.linux.org>
7 */
9 #include "sound_config.h"
10 #include "vidc.h"
11 #if 0
12 static struct synth_info vidc_info =
14 "VIDCsound", /* name */
15 0, /* device */
16 SYNTH_TYPE_SAMPLE, /* synth_type */
17 0, /* synth_subtype */
18 0, /* perc_mode */
19 16, /* nr_voices */
20 0, /* nr_drums */
21 0, /* instr_bank_size */
22 0, /* capabilities */
25 int vidc_sdev;
26 int vidc_synth_volume;
28 static int vidc_synth_open(int dev, int mode)
30 if (vidc_busy)
31 return -EBUSY;
33 vidc_busy = 1;
34 return 0;
37 static void vidc_synth_close(int dev)
39 vidc_busy = 0;
43 static struct synth_operations vidc_synth_operations =
45 "VIDC Synth", /* name */
46 &vidc_info, /* info */
47 0, /* midi_dev */
48 SYNTH_TYPE_SAMPLE, /* synth_type */
49 /*SAMPLE_TYPE_XXX */ 0, /* synth_subtype */
50 vidc_synth_open, /* open */
51 vidc_synth_close, /* close */
52 NULL, /* ioctl */
53 NULL, /* kill_note */
54 NULL, /* start_note */
55 NULL, /* set_instr */
56 NULL, /* reset */
57 NULL, /* hw_control */
58 NULL, /* load_patch */
59 NULL, /* aftertouch */
60 NULL, /* controller */
61 NULL, /* panning */
62 NULL, /* volume_method */
63 NULL, /* bender */
64 NULL, /* alloc_voice */
65 NULL, /* setup_voice */
66 NULL, /* send_sysex */
67 /* alloc */
68 /* chn_info[16] */
69 /* syex_buf */
70 /* syex_ptr */
73 int vidc_synth_get_volume(void)
75 return vidc_synth_volume;
78 int vidc_synth_set_volume(int newvol)
80 return vidc_synth_volume = newvol;
83 void vidc_synth_init(struct address_info *hw_config)
85 vidc_synth_volume = 100 | (100 << 8);
86 if ((vidc_sdev=sound_alloc_synthdev())!=-1)
87 synth_devs[vidc_sdev] = &vidc_synth_operations;
88 else
89 printk(KERN_ERR "VIDCsound: Too many synthesizers\n");
91 #endif