~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/sound/asound_fm.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/sound/asound_fm.h (Architecture alpha) and /include/uapi/sound/asound_fm.h (Architecture sparc)


  1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linu      1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2 #ifndef __SOUND_ASOUND_FM_H                         2 #ifndef __SOUND_ASOUND_FM_H
  3 #define __SOUND_ASOUND_FM_H                         3 #define __SOUND_ASOUND_FM_H
  4                                                     4 
  5 /*                                                  5 /*
  6  *  Advanced Linux Sound Architecture - ALSA        6  *  Advanced Linux Sound Architecture - ALSA
  7  *                                                  7  *
  8  *  Interface file between ALSA driver & user       8  *  Interface file between ALSA driver & user space
  9  *  Copyright (c) 1994-98 by Jaroslav Kysela <      9  *  Copyright (c) 1994-98 by Jaroslav Kysela <perex@perex.cz>,
 10  *                           4Front Technologi     10  *                           4Front Technologies
 11  *                                                 11  *
 12  *  Direct FM control                              12  *  Direct FM control
 13  */                                                13  */
 14                                                    14 
 15 #define SNDRV_DM_FM_MODE_OPL2   0x00               15 #define SNDRV_DM_FM_MODE_OPL2   0x00
 16 #define SNDRV_DM_FM_MODE_OPL3   0x01               16 #define SNDRV_DM_FM_MODE_OPL3   0x01
 17                                                    17 
 18 struct snd_dm_fm_info {                            18 struct snd_dm_fm_info {
 19         unsigned char fm_mode;          /* OPL     19         unsigned char fm_mode;          /* OPL mode, see SNDRV_DM_FM_MODE_XXX */
 20         unsigned char rhythm;           /* per     20         unsigned char rhythm;           /* percussion mode flag */
 21 };                                                 21 };
 22                                                    22 
 23 /*                                                 23 /*
 24  *  Data structure composing an FM "note" or s     24  *  Data structure composing an FM "note" or sound event.
 25  */                                                25  */
 26                                                    26 
 27 struct snd_dm_fm_voice {                           27 struct snd_dm_fm_voice {
 28         unsigned char op;               /* ope     28         unsigned char op;               /* operator cell (0 or 1) */
 29         unsigned char voice;            /* FM      29         unsigned char voice;            /* FM voice (0 to 17) */
 30                                                    30 
 31         unsigned char am;               /* amp     31         unsigned char am;               /* amplitude modulation */
 32         unsigned char vibrato;          /* vib     32         unsigned char vibrato;          /* vibrato effect */
 33         unsigned char do_sustain;       /* sus     33         unsigned char do_sustain;       /* sustain phase */
 34         unsigned char kbd_scale;        /* key     34         unsigned char kbd_scale;        /* keyboard scaling */
 35         unsigned char harmonic;         /* 4 b     35         unsigned char harmonic;         /* 4 bits: harmonic and multiplier */
 36         unsigned char scale_level;      /* 2 b     36         unsigned char scale_level;      /* 2 bits: decrease output freq rises */
 37         unsigned char volume;           /* 6 b     37         unsigned char volume;           /* 6 bits: volume */
 38                                                    38 
 39         unsigned char attack;           /* 4 b     39         unsigned char attack;           /* 4 bits: attack rate */
 40         unsigned char decay;            /* 4 b     40         unsigned char decay;            /* 4 bits: decay rate */
 41         unsigned char sustain;          /* 4 b     41         unsigned char sustain;          /* 4 bits: sustain level */
 42         unsigned char release;          /* 4 b     42         unsigned char release;          /* 4 bits: release rate */
 43                                                    43 
 44         unsigned char feedback;         /* 3 b     44         unsigned char feedback;         /* 3 bits: feedback for op0 */
 45         unsigned char connection;       /* 0 f     45         unsigned char connection;       /* 0 for serial, 1 for parallel */
 46         unsigned char left;             /* ste     46         unsigned char left;             /* stereo left */
 47         unsigned char right;            /* ste     47         unsigned char right;            /* stereo right */
 48         unsigned char waveform;         /* 3 b     48         unsigned char waveform;         /* 3 bits: waveform shape */
 49 };                                                 49 };
 50                                                    50 
 51 /*                                                 51 /*
 52  *  This describes an FM note by its voice, oc     52  *  This describes an FM note by its voice, octave, frequency number (10bit)
 53  *  and key on/off.                                53  *  and key on/off.
 54  */                                                54  */
 55                                                    55 
 56 struct snd_dm_fm_note {                            56 struct snd_dm_fm_note {
 57         unsigned char voice;    /* 0-17 voice      57         unsigned char voice;    /* 0-17 voice channel */
 58         unsigned char octave;   /* 3 bits: wha     58         unsigned char octave;   /* 3 bits: what octave to play */
 59         unsigned int fnum;      /* 10 bits: fr     59         unsigned int fnum;      /* 10 bits: frequency number */
 60         unsigned char key_on;   /* set for act     60         unsigned char key_on;   /* set for active, clear for silent */
 61 };                                                 61 };
 62                                                    62 
 63 /*                                                 63 /*
 64  *  FM parameters that apply globally to all v     64  *  FM parameters that apply globally to all voices, and thus are not "notes"
 65  */                                                65  */
 66                                                    66 
 67 struct snd_dm_fm_params {                          67 struct snd_dm_fm_params {
 68         unsigned char am_depth;         /* amp     68         unsigned char am_depth;         /* amplitude modulation depth (1=hi) */
 69         unsigned char vib_depth;        /* vib     69         unsigned char vib_depth;        /* vibrato depth (1=hi) */
 70         unsigned char kbd_split;        /* key     70         unsigned char kbd_split;        /* keyboard split */
 71         unsigned char rhythm;           /* per     71         unsigned char rhythm;           /* percussion mode select */
 72                                                    72 
 73         /* This block is the percussion instru     73         /* This block is the percussion instrument data */
 74         unsigned char bass;                        74         unsigned char bass;
 75         unsigned char snare;                       75         unsigned char snare;
 76         unsigned char tomtom;                      76         unsigned char tomtom;
 77         unsigned char cymbal;                      77         unsigned char cymbal;
 78         unsigned char hihat;                       78         unsigned char hihat;
 79 };                                                 79 };
 80                                                    80 
 81 /*                                                 81 /*
 82  *  FM mode ioctl settings                         82  *  FM mode ioctl settings
 83  */                                                83  */
 84                                                    84 
 85 #define SNDRV_DM_FM_IOCTL_INFO          _IOR('     85 #define SNDRV_DM_FM_IOCTL_INFO          _IOR('H', 0x20, struct snd_dm_fm_info)
 86 #define SNDRV_DM_FM_IOCTL_RESET         _IO ('     86 #define SNDRV_DM_FM_IOCTL_RESET         _IO ('H', 0x21)
 87 #define SNDRV_DM_FM_IOCTL_PLAY_NOTE     _IOW('     87 #define SNDRV_DM_FM_IOCTL_PLAY_NOTE     _IOW('H', 0x22, struct snd_dm_fm_note)
 88 #define SNDRV_DM_FM_IOCTL_SET_VOICE     _IOW('     88 #define SNDRV_DM_FM_IOCTL_SET_VOICE     _IOW('H', 0x23, struct snd_dm_fm_voice)
 89 #define SNDRV_DM_FM_IOCTL_SET_PARAMS    _IOW('     89 #define SNDRV_DM_FM_IOCTL_SET_PARAMS    _IOW('H', 0x24, struct snd_dm_fm_params)
 90 #define SNDRV_DM_FM_IOCTL_SET_MODE      _IOW('     90 #define SNDRV_DM_FM_IOCTL_SET_MODE      _IOW('H', 0x25, int)
 91 /* for OPL3 only */                                91 /* for OPL3 only */
 92 #define SNDRV_DM_FM_IOCTL_SET_CONNECTION           92 #define SNDRV_DM_FM_IOCTL_SET_CONNECTION        _IOW('H', 0x26, int)
 93 /* SBI patch management */                         93 /* SBI patch management */
 94 #define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO ('     94 #define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO ('H', 0x40)
 95                                                    95 
 96 #define SNDRV_DM_FM_OSS_IOCTL_RESET                96 #define SNDRV_DM_FM_OSS_IOCTL_RESET             0x20
 97 #define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE            97 #define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE         0x21
 98 #define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE            98 #define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE         0x22
 99 #define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS           99 #define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS        0x23
100 #define SNDRV_DM_FM_OSS_IOCTL_SET_MODE            100 #define SNDRV_DM_FM_OSS_IOCTL_SET_MODE          0x24
101 #define SNDRV_DM_FM_OSS_IOCTL_SET_OPL             101 #define SNDRV_DM_FM_OSS_IOCTL_SET_OPL           0x25
102                                                   102 
103 /*                                                103 /*
104  * Patch Record - fixed size for write            104  * Patch Record - fixed size for write
105  */                                               105  */
106                                                   106 
107 #define FM_KEY_SBI      "SBI\032"                 107 #define FM_KEY_SBI      "SBI\032"
108 #define FM_KEY_2OP      "2OP\032"                 108 #define FM_KEY_2OP      "2OP\032"
109 #define FM_KEY_4OP      "4OP\032"                 109 #define FM_KEY_4OP      "4OP\032"
110                                                   110 
111 struct sbi_patch {                                111 struct sbi_patch {
112         unsigned char prog;                       112         unsigned char prog;
113         unsigned char bank;                       113         unsigned char bank;
114         char key[4];                              114         char key[4];
115         char name[25];                            115         char name[25];
116         char extension[7];                        116         char extension[7];
117         unsigned char data[32];                   117         unsigned char data[32];
118 };                                                118 };
119                                                   119 
120 #endif /* __SOUND_ASOUND_FM_H */                  120 #endif /* __SOUND_ASOUND_FM_H */
121                                                   121 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php