.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | #ifndef __PCM_PLUGIN_H |
---|
2 | 3 | #define __PCM_PLUGIN_H |
---|
3 | 4 | |
---|
4 | 5 | /* |
---|
5 | 6 | * Digital Audio (Plugin interface) abstract layer |
---|
6 | 7 | * Copyright (c) by Jaroslav Kysela <perex@perex.cz> |
---|
7 | | - * |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify |
---|
10 | | - * it under the terms of the GNU General Public License as published by |
---|
11 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
12 | | - * (at your option) any later version. |
---|
13 | | - * |
---|
14 | | - * This program is distributed in the hope that it will be useful, |
---|
15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | | - * GNU General Public License for more details. |
---|
18 | | - * |
---|
19 | | - * You should have received a copy of the GNU General Public License |
---|
20 | | - * along with this program; if not, write to the Free Software |
---|
21 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
22 | | - * |
---|
23 | 8 | */ |
---|
24 | 9 | |
---|
25 | 10 | #ifdef CONFIG_SND_PCM_OSS_PLUGINS |
---|
.. | .. |
---|
79 | 64 | char *buf; |
---|
80 | 65 | snd_pcm_uframes_t buf_frames; |
---|
81 | 66 | struct snd_pcm_plugin_channel *buf_channels; |
---|
82 | | - char extra_data[0]; |
---|
| 67 | + char extra_data[]; |
---|
83 | 68 | }; |
---|
84 | 69 | |
---|
85 | 70 | int snd_pcm_plugin_build(struct snd_pcm_substream *handle, |
---|
.. | .. |
---|
156 | 141 | |
---|
157 | 142 | void *snd_pcm_plug_buf_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t size); |
---|
158 | 143 | void snd_pcm_plug_buf_unlock(struct snd_pcm_substream *plug, void *ptr); |
---|
| 144 | +#else |
---|
| 145 | + |
---|
| 146 | +static inline snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *handle, snd_pcm_uframes_t drv_size) { return drv_size; } |
---|
| 147 | +static inline snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *handle, snd_pcm_uframes_t clt_size) { return clt_size; } |
---|
| 148 | +static inline int snd_pcm_plug_slave_format(int format, const struct snd_mask *format_mask) { return format; } |
---|
| 149 | + |
---|
| 150 | +#endif |
---|
| 151 | + |
---|
159 | 152 | snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, |
---|
160 | 153 | const char *ptr, snd_pcm_uframes_t size, |
---|
161 | 154 | int in_kernel); |
---|
.. | .. |
---|
165 | 158 | void **bufs, snd_pcm_uframes_t frames); |
---|
166 | 159 | snd_pcm_sframes_t snd_pcm_oss_readv3(struct snd_pcm_substream *substream, |
---|
167 | 160 | void **bufs, snd_pcm_uframes_t frames); |
---|
168 | | - |
---|
169 | | -#else |
---|
170 | | - |
---|
171 | | -static inline snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *handle, snd_pcm_uframes_t drv_size) { return drv_size; } |
---|
172 | | -static inline snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *handle, snd_pcm_uframes_t clt_size) { return clt_size; } |
---|
173 | | -static inline int snd_pcm_plug_slave_format(int format, const struct snd_mask *format_mask) { return format; } |
---|
174 | | - |
---|
175 | | -#endif |
---|
176 | 161 | |
---|
177 | 162 | #ifdef PLUGIN_DEBUG |
---|
178 | 163 | #define pdprintf(fmt, args...) printk(KERN_DEBUG "plugin: " fmt, ##args) |
---|