| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: soundcard.h,v 1.31 2020/10/23 09:05:20 nia Exp $ */ | | 1 | /* $NetBSD: soundcard.h,v 1.32 2020/11/03 09:33:53 nia Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1997, 2020 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1997, 2020 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Lennart Augustsson and Nia Alarie. | | 8 | * by Lennart Augustsson and Nia Alarie. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -71,37 +71,62 @@ | | | @@ -71,37 +71,62 @@ |
71 | #define SNDCTL_DSP_CHANNELS _IOWR('P', 6, int) | | 71 | #define SNDCTL_DSP_CHANNELS _IOWR('P', 6, int) |
72 | #define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS | | 72 | #define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS |
73 | #define SOUND_PCM_READ_CHANNELS _IOR ('P', 6, int) | | 73 | #define SOUND_PCM_READ_CHANNELS _IOR ('P', 6, int) |
74 | #define SOUND_PCM_WRITE_FILTER _IOWR('P', 7, int) | | 74 | #define SOUND_PCM_WRITE_FILTER _IOWR('P', 7, int) |
75 | #define SOUND_PCM_READ_FILTER _IOR ('P', 7, int) | | 75 | #define SOUND_PCM_READ_FILTER _IOR ('P', 7, int) |
76 | #define SNDCTL_DSP_POST _IO ('P', 8) | | 76 | #define SNDCTL_DSP_POST _IO ('P', 8) |
77 | #define SNDCTL_DSP_SUBDIVIDE _IOWR('P', 9, int) | | 77 | #define SNDCTL_DSP_SUBDIVIDE _IOWR('P', 9, int) |
78 | #define SNDCTL_DSP_SETFRAGMENT _IOWR('P', 10, int) | | 78 | #define SNDCTL_DSP_SETFRAGMENT _IOWR('P', 10, int) |
79 | #define SNDCTL_DSP_GETFMTS _IOR ('P', 11, int) | | 79 | #define SNDCTL_DSP_GETFMTS _IOR ('P', 11, int) |
80 | #define SNDCTL_DSP_GETOSPACE _IOR ('P',12, struct audio_buf_info) | | 80 | #define SNDCTL_DSP_GETOSPACE _IOR ('P',12, struct audio_buf_info) |
81 | #define SNDCTL_DSP_GETISPACE _IOR ('P',13, struct audio_buf_info) | | 81 | #define SNDCTL_DSP_GETISPACE _IOR ('P',13, struct audio_buf_info) |
82 | #define SNDCTL_DSP_NONBLOCK _IO ('P',14) | | 82 | #define SNDCTL_DSP_NONBLOCK _IO ('P',14) |
83 | #define SNDCTL_DSP_GETCAPS _IOR ('P',15, int) | | 83 | #define SNDCTL_DSP_GETCAPS _IOR ('P',15, int) |
84 | # define DSP_CAP_REVISION 0x000000ff | | 84 | /* PCM_CAP_* were known as DSP_CAP_ before OSS 4.0 */ |
85 | # define DSP_CAP_DUPLEX 0x00000100 | | 85 | # define DSP_CAP_REVISION PCM_CAP_REVISION |
86 | # define DSP_CAP_REALTIME 0x00000200 | | 86 | # define DSP_CAP_DUPLEX PCM_CAP_DUPLEX |
87 | # define DSP_CAP_BATCH 0x00000400 | | 87 | # define DSP_CAP_REALTIME PCM_CAP_REALTIME |
88 | # define DSP_CAP_COPROC 0x00000800 | | 88 | # define DSP_CAP_BATCH PCM_CAP_BATCH |
89 | # define DSP_CAP_TRIGGER 0x00001000 | | 89 | # define DSP_CAP_COPROC PCM_CAP_COPROC |
90 | # define DSP_CAP_MMAP 0x00002000 | | 90 | # define DSP_CAP_TRIGGER PCM_CAP_TRIGGER |
91 | # define PCM_CAP_INPUT 0x00004000 | | 91 | # define DSP_CAP_MMAP PCM_CAP_MMAP |
92 | # define PCM_CAP_OUTPUT 0x00008000 | | 92 | # define DSP_CAP_INPUT PCM_CAP_INPUT |
93 | # define PCM_CAP_MODEM 0x00010000 | | 93 | # define DSP_CAP_OUTPUT PCM_CAP_OUTPUT |
94 | # define PCM_CAP_HIDDEN 0x00020000 | | 94 | # define DSP_CAP_MODEM PCM_CAP_MODEM |
| | | 95 | # define DSP_CAP_HIDDEN PCM_CAP_HIDDEN |
| | | 96 | # define DSP_CAP_VIRTUAL PCM_CAP_VIRTUAL |
| | | 97 | # define DSP_CAP_ANALOGOUT PCM_CAP_ANALOGOUT |
| | | 98 | # define DSP_CAP_ANALOGIN PCM_CAP_ANALOGIN |
| | | 99 | # define DSP_CAP_DIGITALOUT PCM_CAP_DIGITALOUT |
| | | 100 | # define DSP_CAP_DIGITALIN PCM_CAP_DIGITALIN |
| | | 101 | # define DSP_CAP_ADMASK PCM_CAP_ADMASK |
| | | 102 | # define PCM_CAP_REVISION 0x000000ff /* Unused in NetBSD */ |
| | | 103 | # define PCM_CAP_DUPLEX 0x00000100 /* Full duplex */ |
| | | 104 | # define PCM_CAP_REALTIME 0x00000200 /* Unused in NetBSD */ |
| | | 105 | # define PCM_CAP_BATCH 0x00000400 /* Unused in NetBSD */ |
| | | 106 | # define PCM_CAP_COPROC 0x00000800 /* Unused in NetBSD */ |
| | | 107 | # define PCM_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */ |
| | | 108 | # define PCM_CAP_MMAP 0x00002000 /* Supports mmap() */ |
| | | 109 | # define PCM_CAP_INPUT 0x00004000 /* Recording device */ |
| | | 110 | # define PCM_CAP_OUTPUT 0x00008000 /* Playback device */ |
| | | 111 | # define PCM_CAP_MODEM 0x00010000 /* Unused in NetBSD */ |
| | | 112 | # define PCM_CAP_HIDDEN 0x00020000 /* Unused in NetBSD */ |
| | | 113 | # define PCM_CAP_VIRTUAL 0x00040000 /* Unused in NetBSD */ |
| | | 114 | # define PCM_CAP_ANALOGOUT 0x00100000 /* Unused in NetBSD */ |
| | | 115 | # define PCM_CAP_ANALOGIN 0x00200000 /* Unused in NetBSD */ |
| | | 116 | # define PCM_CAP_DIGITALOUT 0x00400000 /* Unused in NetBSD */ |
| | | 117 | # define PCM_CAP_DIGITALIN 0x00800000 /* Unused in NetBSD */ |
| | | 118 | # define PCM_CAP_ADMASK 0x00f00000 /* Unused in NetBSD */ |
| | | 119 | # define PCM_CAP_SPECIAL 0x01000000 /* Unused in NetBSD */ |
95 | #define SNDCTL_DSP_GETTRIGGER _IOR ('P', 16, int) | | 120 | #define SNDCTL_DSP_GETTRIGGER _IOR ('P', 16, int) |
96 | #define SNDCTL_DSP_SETTRIGGER _IOW ('P', 16, int) | | 121 | #define SNDCTL_DSP_SETTRIGGER _IOW ('P', 16, int) |
97 | # define PCM_ENABLE_INPUT 0x00000001 | | 122 | # define PCM_ENABLE_INPUT 0x00000001 |
98 | # define PCM_ENABLE_OUTPUT 0x00000002 | | 123 | # define PCM_ENABLE_OUTPUT 0x00000002 |
99 | #define SNDCTL_DSP_GETIPTR _IOR ('P', 17, struct count_info) | | 124 | #define SNDCTL_DSP_GETIPTR _IOR ('P', 17, struct count_info) |
100 | #define SNDCTL_DSP_GETOPTR _IOR ('P', 18, struct count_info) | | 125 | #define SNDCTL_DSP_GETOPTR _IOR ('P', 18, struct count_info) |
101 | #define SNDCTL_DSP_MAPINBUF _IOR ('P', 19, struct buffmem_desc) | | 126 | #define SNDCTL_DSP_MAPINBUF _IOR ('P', 19, struct buffmem_desc) |
102 | #define SNDCTL_DSP_MAPOUTBUF _IOR ('P', 20, struct buffmem_desc) | | 127 | #define SNDCTL_DSP_MAPOUTBUF _IOR ('P', 20, struct buffmem_desc) |
103 | #define SNDCTL_DSP_SETSYNCRO _IO ('P', 21) | | 128 | #define SNDCTL_DSP_SETSYNCRO _IO ('P', 21) |
104 | #define SNDCTL_DSP_SETDUPLEX _IO ('P', 22) | | 129 | #define SNDCTL_DSP_SETDUPLEX _IO ('P', 22) |
105 | #define SNDCTL_DSP_PROFILE _IOW ('P', 23, int) | | 130 | #define SNDCTL_DSP_PROFILE _IOW ('P', 23, int) |
106 | #define SNDCTL_DSP_GETODELAY _IOR ('P', 23, int) | | 131 | #define SNDCTL_DSP_GETODELAY _IOR ('P', 23, int) |
107 | #define APF_NORMAL 0 | | 132 | #define APF_NORMAL 0 |