| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | struct snd_dm_fm_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 24 |   unsigned char fm_mode; | 
 | 25 |   unsigned char rhythm; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 26 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | struct snd_dm_fm_voice { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 28 |   unsigned char op; | 
 | 29 |   unsigned char voice; | 
 | 30 |   unsigned char am; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 |   unsigned char vibrato; | 
 | 32 |   unsigned char do_sustain; | 
 | 33 |   unsigned char kbd_scale; | 
 | 34 |   unsigned char harmonic; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 |   unsigned char scale_level; | 
 | 36 |   unsigned char volume; | 
 | 37 |   unsigned char attack; | 
 | 38 |   unsigned char decay; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 |   unsigned char sustain; | 
 | 40 |   unsigned char release; | 
 | 41 |   unsigned char feedback; | 
 | 42 |   unsigned char connection; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 |   unsigned char left; | 
 | 44 |   unsigned char right; | 
 | 45 |   unsigned char waveform; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 46 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | struct snd_dm_fm_note { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 48 |   unsigned char voice; | 
 | 49 |   unsigned char octave; | 
 | 50 |   unsigned int fnum; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 |   unsigned char key_on; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | }; | 
 | 53 | struct snd_dm_fm_params { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 54 |   unsigned char am_depth; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 |   unsigned char vib_depth; | 
 | 56 |   unsigned char kbd_split; | 
 | 57 |   unsigned char rhythm; | 
 | 58 |   unsigned char bass; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 |   unsigned char snare; | 
 | 60 |   unsigned char tomtom; | 
 | 61 |   unsigned char cymbal; | 
 | 62 |   unsigned char hihat; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | }; | 
 | 64 | #define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, struct snd_dm_fm_info) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 65 | #define SNDRV_DM_FM_IOCTL_RESET _IO('H', 0x21) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 66 | #define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, struct snd_dm_fm_note) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | #define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO('H', 0x40) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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" | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 79 | #define FM_KEY_2OP "2OP\032" | 
 | 80 | #define FM_KEY_4OP "4OP\032" | 
 | 81 | struct sbi_patch { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 82 |   unsigned char prog; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 |   unsigned char bank; | 
 | 84 |   char key[4]; | 
 | 85 |   char name[25]; | 
 | 86 |   char extension[7]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 |   unsigned char data[32]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 88 | }; | 
 | 89 | #endif |