OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [armnommu/] [drivers/] [sound/] [vidc_synth.c] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1622 jcastillo
/*
2
 * sound/vidc_synth.c
3
 *
4
 * Synthesizer routines for the VIDC
5
 *
6
 * Copyright (C) 1997 Russell King
7
 */
8
#include <linux/config.h>
9
#include "sound_config.h"
10
 
11
#include "vidc.h"
12
 
13
#if defined(CONFIG_VIDC)
14
 
15
static struct synth_info vidc_info =
16
{
17
  "VIDCsound",                  /* name                 */
18
  0,                             /* device               */
19
  SYNTH_TYPE_SAMPLE,            /* synth_type           */
20
  0,                             /* synth_subtype        */
21
  0,                             /* perc_mode            */
22
  16,                           /* nr_voices            */
23
  0,                             /* nr_drums             */
24
  0,                             /* instr_bank_size      */
25
  0,                             /* capabilities         */
26
};
27
 
28
int vidc_sdev;
29
int vidc_synth_volume;
30
 
31
static int
32
vidc_synth_open (int dev, int mode)
33
{
34
  if (vidc_busy)
35
    return -EBUSY;
36
 
37
  vidc_busy = 1;
38
 
39
  return 0;
40
}
41
 
42
static void
43
vidc_synth_close (int dev)
44
{
45
  vidc_busy = 0;
46
}
47
 
48
 
49
static struct synth_operations vidc_synth_operations = {
50
  &vidc_info,                   /* info                 */
51
  0,                             /* midi_dev             */
52
  SYNTH_TYPE_SAMPLE,            /* synth_type           */
53
  /*SAMPLE_TYPE_XXX*/0, /* SAMPLE_TYPE GUS */    /* synth_subtype                */
54
  vidc_synth_open,              /* open                 */
55
  vidc_synth_close,             /* close                */
56
  NULL,                         /* ioctl                */
57
  NULL,                         /* kill_note            */
58
  NULL,                         /* start_note           */
59
  NULL,                         /* set_instr            */
60
  NULL,                         /* reset                */
61
  NULL,                         /* hw_control           */
62
  NULL,                         /* load_patch           */
63
  NULL,                         /* aftertouch           */
64
  NULL,                         /* controller           */
65
  NULL,                         /* panning              */
66
  NULL,                         /* volume_method        */
67
  NULL,                         /* patchmgr             */
68
  NULL,                         /* bender               */
69
  NULL,                         /* alloc                */
70
  NULL,                         /* setup_voice          */
71
  NULL,                         /* send_sysex           */
72
                                /* alloc                */
73
                                /* chn_info[16]         */
74
};
75
 
76
int vidc_synth_get_volume (void)
77
{
78
  return vidc_synth_volume;
79
}
80
 
81
int vidc_synth_set_volume (int newvol)
82
{
83
  return vidc_synth_volume = newvol;
84
}
85
 
86
void vidc_synth_init (struct address_info *hw_config)
87
{
88
  vidc_synth_volume = 100 | (100 << 8);
89
  if (num_synths < MAX_SYNTH_DEV) {
90
    synth_devs[vidc_sdev = num_synths++] = &vidc_synth_operations;
91
  } else
92
    printk ("VIDCsound: Too many synthesizers\n");
93
}
94
 
95
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.