asound_fm.h
001: #ifndef __SOUND_ASOUND_FM_H
002: #define __SOUND_ASOUND_FM_H
003: 
004: 
005: 
006: 
007: 
008: <perex@perex.cz>
009: 
010: 
011: 
012: 
013: 
014: 
015: 
016: 
017: 
018: 
019: 
020: 
021: 
022: 
023: 
024: 
025: 
026: 
027: 
028: 
029: #define SNDRV_DM_FM_MODE_OPL2   0x00
030: #define SNDRV_DM_FM_MODE_OPL3   0x01
031: 
032: struct snd_dm_fm_info {
033:         unsigned char fm_mode;          
034:         unsigned char rhythm;           
035: };
036: 
037: 
038: 
039: 
040: 
041: struct snd_dm_fm_voice {
042:         unsigned char op;               
043:         unsigned char voice;            
044: 
045:         unsigned char am;               
046:         unsigned char vibrato;          
047:         unsigned char do_sustain;       
048:         unsigned char kbd_scale;        
049:         unsigned char harmonic;         
050:         unsigned char scale_level;      
051:         unsigned char volume;           
052: 
053:         unsigned char attack;           
054:         unsigned char decay;            
055:         unsigned char sustain;          
056:         unsigned char release;          
057: 
058:         unsigned char feedback;         
059:         unsigned char connection;       
060:         unsigned char left;             
061:         unsigned char right;            
062:         unsigned char waveform;         
063: };
064: 
065: 
066: 
067: 
068: 
069: 
070: struct snd_dm_fm_note {
071:         unsigned char voice;    
072:         unsigned char octave;   
073:         unsigned int fnum;      
074:         unsigned char key_on;   
075: };
076: 
077: 
078: 
079: 
080: 
081: struct snd_dm_fm_params {
082:         unsigned char am_depth;         
083:         unsigned char vib_depth;        
084:         unsigned char kbd_split;        
085:         unsigned char rhythm;           
086: 
087:         
088:         unsigned char bass;
089:         unsigned char snare;
090:         unsigned char tomtom;
091:         unsigned char cymbal;
092:         unsigned char hihat;
093: };
094: 
095: 
096: 
097: 
098: 
099: #define SNDRV_DM_FM_IOCTL_INFO          _IOR('H', 0x20, struct snd_dm_fm_info)
100: #define SNDRV_DM_FM_IOCTL_RESET         _IO ('H', 0x21)
101: #define SNDRV_DM_FM_IOCTL_PLAY_NOTE     _IOW('H', 0x22, struct snd_dm_fm_note)
102: #define SNDRV_DM_FM_IOCTL_SET_VOICE     _IOW('H', 0x23, struct snd_dm_fm_voice)
103: #define SNDRV_DM_FM_IOCTL_SET_PARAMS    _IOW('H', 0x24, struct snd_dm_fm_params)
104: #define SNDRV_DM_FM_IOCTL_SET_MODE      _IOW('H', 0x25, int)
105: 
106: #define SNDRV_DM_FM_IOCTL_SET_CONNECTION        _IOW('H', 0x26, int)
107: 
108: #define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO ('H', 0x40)
109: 
110: #define SNDRV_DM_FM_OSS_IOCTL_RESET             0x20
111: #define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE         0x21
112: #define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE         0x22
113: #define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS        0x23
114: #define SNDRV_DM_FM_OSS_IOCTL_SET_MODE          0x24
115: #define SNDRV_DM_FM_OSS_IOCTL_SET_OPL           0x25
116: 
117: 
118: 
119: 
120: 
121: #define FM_KEY_SBI      "SBI\032"
122: #define FM_KEY_2OP      "2OP\032"
123: #define FM_KEY_4OP      "4OP\032"
124: 
125: struct sbi_patch {
126:         unsigned char prog;
127:         unsigned char bank;
128:         char key[4];
129:         char name[25];
130:         char extension[7];
131:         unsigned char data[32];
132: };
133: 
134: #endif 
135: 
      
      
      
      
   
      
      
         
            
            © Andrew Scott 2006 -
            2025, 
            All Rights Reserved