aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/oss/pcm_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/oss/pcm_plugin.c')
-rw-r--r--sound/core/oss/pcm_plugin.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
index 71cc3ddf5c15..727ac44d39f4 100644
--- a/sound/core/oss/pcm_plugin.c
+++ b/sound/core/oss/pcm_plugin.c
@@ -199,12 +199,13 @@ int snd_pcm_plugin_free(struct snd_pcm_plugin *plugin)
199snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_pcm_uframes_t drv_frames) 199snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_pcm_uframes_t drv_frames)
200{ 200{
201 struct snd_pcm_plugin *plugin, *plugin_prev, *plugin_next; 201 struct snd_pcm_plugin *plugin, *plugin_prev, *plugin_next;
202 int stream = snd_pcm_plug_stream(plug); 202 int stream;
203 203
204 if (snd_BUG_ON(!plug)) 204 if (snd_BUG_ON(!plug))
205 return -ENXIO; 205 return -ENXIO;
206 if (drv_frames == 0) 206 if (drv_frames == 0)
207 return 0; 207 return 0;
208 stream = snd_pcm_plug_stream(plug);
208 if (stream == SNDRV_PCM_STREAM_PLAYBACK) { 209 if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
209 plugin = snd_pcm_plug_last(plug); 210 plugin = snd_pcm_plug_last(plug);
210 while (plugin && drv_frames > 0) { 211 while (plugin && drv_frames > 0) {
@@ -230,13 +231,14 @@ snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *plug, snd_pc
230{ 231{
231 struct snd_pcm_plugin *plugin, *plugin_prev, *plugin_next; 232 struct snd_pcm_plugin *plugin, *plugin_prev, *plugin_next;
232 snd_pcm_sframes_t frames; 233 snd_pcm_sframes_t frames;
233 int stream = snd_pcm_plug_stream(plug); 234 int stream;
234 235
235 if (snd_BUG_ON(!plug)) 236 if (snd_BUG_ON(!plug))
236 return -ENXIO; 237 return -ENXIO;
237 if (clt_frames == 0) 238 if (clt_frames == 0)
238 return 0; 239 return 0;
239 frames = clt_frames; 240 frames = clt_frames;
241 stream = snd_pcm_plug_stream(plug);
240 if (stream == SNDRV_PCM_STREAM_PLAYBACK) { 242 if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
241 plugin = snd_pcm_plug_first(plug); 243 plugin = snd_pcm_plug_first(plug);
242 while (plugin && frames > 0) { 244 while (plugin && frames > 0) {