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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2 /*
  3  *  Copyright (c) 1999 by Uros Bizjak <uros@kss-loka.si>
  4  *                        Takashi Iwai <tiwai@suse.de>
  5  *
  6  *  SB16ASP/AWE32 CSP control
  7  */
  8 #ifndef _UAPI__SOUND_SB16_CSP_H
  9 #define _UAPI__SOUND_SB16_CSP_H
 10 
 11 
 12 /* CSP modes */
 13 #define SNDRV_SB_CSP_MODE_NONE          0x00
 14 #define SNDRV_SB_CSP_MODE_DSP_READ      0x01    /* Record from DSP */
 15 #define SNDRV_SB_CSP_MODE_DSP_WRITE     0x02    /* Play to DSP */
 16 #define SNDRV_SB_CSP_MODE_QSOUND                0x04    /* QSound */
 17 
 18 /* CSP load flags */
 19 #define SNDRV_SB_CSP_LOAD_FROMUSER      0x01
 20 #define SNDRV_SB_CSP_LOAD_INITBLOCK     0x02
 21 
 22 /* CSP sample width */
 23 #define SNDRV_SB_CSP_SAMPLE_8BIT                0x01
 24 #define SNDRV_SB_CSP_SAMPLE_16BIT               0x02
 25 
 26 /* CSP channels */
 27 #define SNDRV_SB_CSP_MONO                       0x01
 28 #define SNDRV_SB_CSP_STEREO             0x02
 29 
 30 /* CSP rates */
 31 #define SNDRV_SB_CSP_RATE_8000          0x01
 32 #define SNDRV_SB_CSP_RATE_11025         0x02
 33 #define SNDRV_SB_CSP_RATE_22050         0x04
 34 #define SNDRV_SB_CSP_RATE_44100         0x08
 35 #define SNDRV_SB_CSP_RATE_ALL           0x0f
 36 
 37 /* CSP running state */
 38 #define SNDRV_SB_CSP_ST_IDLE            0x00
 39 #define SNDRV_SB_CSP_ST_LOADED          0x01
 40 #define SNDRV_SB_CSP_ST_RUNNING         0x02
 41 #define SNDRV_SB_CSP_ST_PAUSED          0x04
 42 #define SNDRV_SB_CSP_ST_AUTO            0x08
 43 #define SNDRV_SB_CSP_ST_QSOUND          0x10
 44 
 45 /* maximum QSound value (180 degrees right) */
 46 #define SNDRV_SB_CSP_QSOUND_MAX_RIGHT   0x20
 47 
 48 /* maximum microcode RIFF file size */
 49 #define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE    0x3000
 50 
 51 /* microcode header */
 52 struct snd_sb_csp_mc_header {
 53         char codec_name[16];            /* id name of codec */
 54         unsigned short func_req;        /* requested function */
 55 };
 56 
 57 /* microcode to be loaded */
 58 struct snd_sb_csp_microcode {
 59         struct snd_sb_csp_mc_header info;
 60         unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE];
 61 };
 62 
 63 /* start CSP with sample_width in mono/stereo */
 64 struct snd_sb_csp_start {
 65         int sample_width;       /* sample width, look above */
 66         int channels;           /* channels, look above */
 67 };
 68 
 69 /* CSP information */
 70 struct snd_sb_csp_info {
 71         char codec_name[16];            /* id name of codec */
 72         unsigned short func_nr;         /* function number */
 73         unsigned int acc_format;        /* accepted PCM formats */
 74         unsigned short acc_channels;    /* accepted channels */
 75         unsigned short acc_width;       /* accepted sample width */
 76         unsigned short acc_rates;       /* accepted sample rates */
 77         unsigned short csp_mode;        /* CSP mode, see above */
 78         unsigned short run_channels;    /* current channels  */
 79         unsigned short run_width;       /* current sample width */
 80         unsigned short version;         /* version id: 0x10 - 0x1f */
 81         unsigned short state;           /* state bits */
 82 };
 83 
 84 /* HWDEP controls */
 85 /* get CSP information */
 86 #define SNDRV_SB_CSP_IOCTL_INFO         _IOR('H', 0x10, struct snd_sb_csp_info)
 87 /* load microcode to CSP */
 88 /* NOTE: struct snd_sb_csp_microcode overflows the max size (13 bits)
 89  * defined for some architectures like MIPS, and it leads to build errors.
 90  * (x86 and co have 14-bit size, thus it's valid, though.)
 91  * As a workaround for skipping the size-limit check, here we don't use the
 92  * normal _IOW() macro but _IOC() with the manual argument.
 93  */
 94 #define SNDRV_SB_CSP_IOCTL_LOAD_CODE    \
 95         _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode))
 96 /* unload microcode from CSP */
 97 #define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE  _IO('H', 0x12)
 98 /* start CSP */
 99 #define SNDRV_SB_CSP_IOCTL_START                _IOW('H', 0x13, struct snd_sb_csp_start)
100 /* stop CSP */
101 #define SNDRV_SB_CSP_IOCTL_STOP         _IO('H', 0x14)
102 /* pause CSP and DMA transfer */
103 #define SNDRV_SB_CSP_IOCTL_PAUSE                _IO('H', 0x15)
104 /* restart CSP and DMA transfer */
105 #define SNDRV_SB_CSP_IOCTL_RESTART      _IO('H', 0x16)
106 
107 
108 #endif /* _UAPI__SOUND_SB16_CSP_H */
109 

~ [ 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