aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/oss
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-03-27 09:22:45 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-31 10:58:58 -0500
commitbf1bbb5a49eec51c30d341606885507b501b37e8 (patch)
tree934916bcb3f5b1bb755450a6abb4c9242b5f60b9 /sound/core/oss
parent82756b2785c5f08204e7f3dab64e12d4533bfe89 (diff)
[ALSA] Tiny clean up of PCM codes
- Make snd_pcm_prepare() static - Clean up snd_pcm_kernel_*_ioctl() functions, reduce exports Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/oss')
-rw-r--r--sound/core/oss/pcm_oss.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index f8302b703a30..54be0bba6bd2 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -959,12 +959,12 @@ static int snd_pcm_oss_reset(struct snd_pcm_oss_file *pcm_oss_file)
959 959
960 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; 960 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
961 if (substream != NULL) { 961 if (substream != NULL) {
962 snd_pcm_kernel_playback_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL); 962 snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL);
963 substream->runtime->oss.prepare = 1; 963 substream->runtime->oss.prepare = 1;
964 } 964 }
965 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; 965 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
966 if (substream != NULL) { 966 if (substream != NULL) {
967 snd_pcm_kernel_capture_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL); 967 snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL);
968 substream->runtime->oss.prepare = 1; 968 substream->runtime->oss.prepare = 1;
969 } 969 }
970 return 0; 970 return 0;
@@ -979,7 +979,7 @@ static int snd_pcm_oss_post(struct snd_pcm_oss_file *pcm_oss_file)
979 if (substream != NULL) { 979 if (substream != NULL) {
980 if ((err = snd_pcm_oss_make_ready(substream)) < 0) 980 if ((err = snd_pcm_oss_make_ready(substream)) < 0)
981 return err; 981 return err;
982 snd_pcm_kernel_playback_ioctl(substream, SNDRV_PCM_IOCTL_START, NULL); 982 snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_START, NULL);
983 } 983 }
984 /* note: all errors from the start action are ignored */ 984 /* note: all errors from the start action are ignored */
985 /* OSS apps do not know, how to handle them */ 985 /* OSS apps do not know, how to handle them */
@@ -1108,7 +1108,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
1108 __direct: 1108 __direct:
1109 saved_f_flags = substream->ffile->f_flags; 1109 saved_f_flags = substream->ffile->f_flags;
1110 substream->ffile->f_flags &= ~O_NONBLOCK; 1110 substream->ffile->f_flags &= ~O_NONBLOCK;
1111 err = snd_pcm_kernel_playback_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL); 1111 err = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL);
1112 substream->ffile->f_flags = saved_f_flags; 1112 substream->ffile->f_flags = saved_f_flags;
1113 if (err < 0) 1113 if (err < 0)
1114 return err; 1114 return err;
@@ -1120,7 +1120,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
1120 if ((err = snd_pcm_oss_make_ready(substream)) < 0) 1120 if ((err = snd_pcm_oss_make_ready(substream)) < 0)
1121 return err; 1121 return err;
1122 runtime = substream->runtime; 1122 runtime = substream->runtime;
1123 err = snd_pcm_kernel_capture_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL); 1123 err = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL);
1124 if (err < 0) 1124 if (err < 0)
1125 return err; 1125 return err;
1126 runtime->oss.buffer_used = 0; 1126 runtime->oss.buffer_used = 0;
@@ -1437,7 +1437,7 @@ static int snd_pcm_oss_set_trigger(struct snd_pcm_oss_file *pcm_oss_file, int tr
1437 cmd = SNDRV_PCM_IOCTL_DROP; 1437 cmd = SNDRV_PCM_IOCTL_DROP;
1438 runtime->oss.prepare = 1; 1438 runtime->oss.prepare = 1;
1439 } 1439 }
1440 err = snd_pcm_kernel_playback_ioctl(psubstream, cmd, NULL); 1440 err = snd_pcm_kernel_ioctl(psubstream, cmd, NULL);
1441 if (err < 0) 1441 if (err < 0)
1442 return err; 1442 return err;
1443 } 1443 }
@@ -1458,7 +1458,7 @@ static int snd_pcm_oss_set_trigger(struct snd_pcm_oss_file *pcm_oss_file, int tr
1458 cmd = SNDRV_PCM_IOCTL_DROP; 1458 cmd = SNDRV_PCM_IOCTL_DROP;
1459 runtime->oss.prepare = 1; 1459 runtime->oss.prepare = 1;
1460 } 1460 }
1461 err = snd_pcm_kernel_capture_ioctl(csubstream, cmd, NULL); 1461 err = snd_pcm_kernel_ioctl(csubstream, cmd, NULL);
1462 if (err < 0) 1462 if (err < 0)
1463 return err; 1463 return err;
1464 } 1464 }
@@ -1495,7 +1495,7 @@ static int snd_pcm_oss_get_odelay(struct snd_pcm_oss_file *pcm_oss_file)
1495 runtime = substream->runtime; 1495 runtime = substream->runtime;
1496 if (runtime->oss.params || runtime->oss.prepare) 1496 if (runtime->oss.params || runtime->oss.prepare)
1497 return 0; 1497 return 0;
1498 err = snd_pcm_kernel_playback_ioctl(substream, SNDRV_PCM_IOCTL_DELAY, &delay); 1498 err = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DELAY, &delay);
1499 if (err == -EPIPE) 1499 if (err == -EPIPE)
1500 delay = 0; /* hack for broken OSS applications */ 1500 delay = 0; /* hack for broken OSS applications */
1501 else if (err < 0) 1501 else if (err < 0)