1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef __SOUND_ASOUND_FM_H
20 #define __SOUND_ASOUND_FM_H
21 #define SNDRV_DM_FM_MODE_OPL2 0x00
22 #define SNDRV_DM_FM_MODE_OPL3 0x01
23 struct snd_dm_fm_info {
24   unsigned char fm_mode;
25   unsigned char rhythm;
26 };
27 struct snd_dm_fm_voice {
28   unsigned char op;
29   unsigned char voice;
30   unsigned char am;
31   unsigned char vibrato;
32   unsigned char do_sustain;
33   unsigned char kbd_scale;
34   unsigned char harmonic;
35   unsigned char scale_level;
36   unsigned char volume;
37   unsigned char attack;
38   unsigned char decay;
39   unsigned char sustain;
40   unsigned char release;
41   unsigned char feedback;
42   unsigned char connection;
43   unsigned char left;
44   unsigned char right;
45   unsigned char waveform;
46 };
47 struct snd_dm_fm_note {
48   unsigned char voice;
49   unsigned char octave;
50   unsigned int fnum;
51   unsigned char key_on;
52 };
53 struct snd_dm_fm_params {
54   unsigned char am_depth;
55   unsigned char vib_depth;
56   unsigned char kbd_split;
57   unsigned char rhythm;
58   unsigned char bass;
59   unsigned char snare;
60   unsigned char tomtom;
61   unsigned char cymbal;
62   unsigned char hihat;
63 };
64 #define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, struct snd_dm_fm_info)
65 #define SNDRV_DM_FM_IOCTL_RESET _IO('H', 0x21)
66 #define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, struct snd_dm_fm_note)
67 #define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, struct snd_dm_fm_voice)
68 #define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, struct snd_dm_fm_params)
69 #define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int)
70 #define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int)
71 #define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO('H', 0x40)
72 #define SNDRV_DM_FM_OSS_IOCTL_RESET 0x20
73 #define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE 0x21
74 #define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE 0x22
75 #define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS 0x23
76 #define SNDRV_DM_FM_OSS_IOCTL_SET_MODE 0x24
77 #define SNDRV_DM_FM_OSS_IOCTL_SET_OPL 0x25
78 #define FM_KEY_SBI "SBI\032"
79 #define FM_KEY_2OP "2OP\032"
80 #define FM_KEY_4OP "4OP\032"
81 struct sbi_patch {
82   unsigned char prog;
83   unsigned char bank;
84   char key[4];
85   char name[25];
86   char extension[7];
87   unsigned char data[32];
88 };
89 #endif
90