hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/sound/core/oss/pcm_plugin.h
....@@ -1,25 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 #ifndef __PCM_PLUGIN_H
23 #define __PCM_PLUGIN_H
34
45 /*
56 * Digital Audio (Plugin interface) abstract layer
67 * 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
- *
238 */
249
2510 #ifdef CONFIG_SND_PCM_OSS_PLUGINS
....@@ -79,7 +64,7 @@
7964 char *buf;
8065 snd_pcm_uframes_t buf_frames;
8166 struct snd_pcm_plugin_channel *buf_channels;
82
- char extra_data[0];
67
+ char extra_data[];
8368 };
8469
8570 int snd_pcm_plugin_build(struct snd_pcm_substream *handle,
....@@ -156,6 +141,14 @@
156141
157142 void *snd_pcm_plug_buf_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t size);
158143 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
+
159152 snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream,
160153 const char *ptr, snd_pcm_uframes_t size,
161154 int in_kernel);
....@@ -165,14 +158,6 @@
165158 void **bufs, snd_pcm_uframes_t frames);
166159 snd_pcm_sframes_t snd_pcm_oss_readv3(struct snd_pcm_substream *substream,
167160 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
176161
177162 #ifdef PLUGIN_DEBUG
178163 #define pdprintf(fmt, args...) printk(KERN_DEBUG "plugin: " fmt, ##args)