Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef __SOUND_ASOUND_FM_H |
| 8 | #define __SOUND_ASOUND_FM_H |
| 9 | #define SNDRV_DM_FM_MODE_OPL2 0x00 |
| 10 | #define SNDRV_DM_FM_MODE_OPL3 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | struct snd_dm_fm_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 12 | unsigned char fm_mode; |
| 13 | unsigned char rhythm; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 14 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 15 | struct snd_dm_fm_voice { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 16 | unsigned char op; |
| 17 | unsigned char voice; |
| 18 | unsigned char am; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | unsigned char vibrato; |
| 20 | unsigned char do_sustain; |
| 21 | unsigned char kbd_scale; |
| 22 | unsigned char harmonic; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 23 | unsigned char scale_level; |
| 24 | unsigned char volume; |
| 25 | unsigned char attack; |
| 26 | unsigned char decay; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | unsigned char sustain; |
| 28 | unsigned char release; |
| 29 | unsigned char feedback; |
| 30 | unsigned char connection; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | unsigned char left; |
| 32 | unsigned char right; |
| 33 | unsigned char waveform; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | struct snd_dm_fm_note { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 36 | unsigned char voice; |
| 37 | unsigned char octave; |
| 38 | unsigned int fnum; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | unsigned char key_on; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | }; |
| 41 | struct snd_dm_fm_params { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 42 | unsigned char am_depth; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | unsigned char vib_depth; |
| 44 | unsigned char kbd_split; |
| 45 | unsigned char rhythm; |
| 46 | unsigned char bass; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | unsigned char snare; |
| 48 | unsigned char tomtom; |
| 49 | unsigned char cymbal; |
| 50 | unsigned char hihat; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | }; |
| 52 | #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] | 53 | #define SNDRV_DM_FM_IOCTL_RESET _IO('H', 0x21) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 54 | #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] | 55 | #define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, struct snd_dm_fm_voice) |
| 56 | #define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, struct snd_dm_fm_params) |
| 57 | #define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int) |
| 58 | #define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | #define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO('H', 0x40) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 60 | #define SNDRV_DM_FM_OSS_IOCTL_RESET 0x20 |
| 61 | #define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE 0x21 |
| 62 | #define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE 0x22 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS 0x23 |
| 64 | #define SNDRV_DM_FM_OSS_IOCTL_SET_MODE 0x24 |
| 65 | #define SNDRV_DM_FM_OSS_IOCTL_SET_OPL 0x25 |
| 66 | #define FM_KEY_SBI "SBI\032" |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | #define FM_KEY_2OP "2OP\032" |
| 68 | #define FM_KEY_4OP "4OP\032" |
| 69 | struct sbi_patch { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 70 | unsigned char prog; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | unsigned char bank; |
| 72 | char key[4]; |
| 73 | char name[25]; |
| 74 | char extension[7]; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | unsigned char data[32]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 76 | }; |
| 77 | #endif |