aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r--include/sound/pcm.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 15b885660bf0..df70e7592ab5 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -367,8 +367,9 @@ struct snd_pcm_substream {
367 struct snd_pcm_group self_group; /* fake group for non linked substream (with substream lock inside) */ 367 struct snd_pcm_group self_group; /* fake group for non linked substream (with substream lock inside) */
368 struct snd_pcm_group *group; /* pointer to current group */ 368 struct snd_pcm_group *group; /* pointer to current group */
369 /* -- assigned files -- */ 369 /* -- assigned files -- */
370 struct snd_pcm_file *file; 370 void *file;
371 struct file *ffile; 371 struct file *ffile;
372 void (*pcm_release)(struct snd_pcm_substream *);
372#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 373#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
373 /* -- OSS things -- */ 374 /* -- OSS things -- */
374 struct snd_pcm_oss_substream oss; 375 struct snd_pcm_oss_substream oss;
@@ -381,13 +382,10 @@ struct snd_pcm_substream {
381 struct snd_info_entry *proc_prealloc_entry; 382 struct snd_info_entry *proc_prealloc_entry;
382 /* misc flags */ 383 /* misc flags */
383 unsigned int no_mmap_ctrl: 1; 384 unsigned int no_mmap_ctrl: 1;
385 unsigned int hw_opened: 1;
384}; 386};
385 387
386#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
387#define SUBSTREAM_BUSY(substream) ((substream)->file != NULL || ((substream)->oss.file != NULL))
388#else
389#define SUBSTREAM_BUSY(substream) ((substream)->file != NULL) 388#define SUBSTREAM_BUSY(substream) ((substream)->file != NULL)
390#endif
391 389
392 390
393struct snd_pcm_str { 391struct snd_pcm_str {
@@ -460,7 +458,6 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream,
460 struct snd_pcm_info __user *info); 458 struct snd_pcm_info __user *info);
461int snd_pcm_status(struct snd_pcm_substream *substream, 459int snd_pcm_status(struct snd_pcm_substream *substream,
462 struct snd_pcm_status *status); 460 struct snd_pcm_status *status);
463int snd_pcm_prepare(struct snd_pcm_substream *substream);
464int snd_pcm_start(struct snd_pcm_substream *substream); 461int snd_pcm_start(struct snd_pcm_substream *substream);
465int snd_pcm_stop(struct snd_pcm_substream *substream, int status); 462int snd_pcm_stop(struct snd_pcm_substream *substream, int status);
466int snd_pcm_drain_done(struct snd_pcm_substream *substream); 463int snd_pcm_drain_done(struct snd_pcm_substream *substream);
@@ -468,11 +465,13 @@ int snd_pcm_drain_done(struct snd_pcm_substream *substream);
468int snd_pcm_suspend(struct snd_pcm_substream *substream); 465int snd_pcm_suspend(struct snd_pcm_substream *substream);
469int snd_pcm_suspend_all(struct snd_pcm *pcm); 466int snd_pcm_suspend_all(struct snd_pcm *pcm);
470#endif 467#endif
471int snd_pcm_kernel_playback_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg);
472int snd_pcm_kernel_capture_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg);
473int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); 468int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg);
474int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct snd_pcm_substream **rsubstream); 469int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct file *file,
470 struct snd_pcm_substream **rsubstream);
475void snd_pcm_release_substream(struct snd_pcm_substream *substream); 471void snd_pcm_release_substream(struct snd_pcm_substream *substream);
472int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, struct file *file,
473 struct snd_pcm_substream **rsubstream);
474void snd_pcm_detach_substream(struct snd_pcm_substream *substream);
476void snd_pcm_vma_notify_data(void *client, void *data); 475void snd_pcm_vma_notify_data(void *client, void *data);
477int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); 476int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area);
478 477
@@ -899,7 +898,6 @@ ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
899const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format); 898const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format);
900int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames); 899int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames);
901snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian); 900snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian);
902const char *snd_pcm_format_name(snd_pcm_format_t format);
903 901
904void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, struct snd_pcm_ops *ops); 902void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, struct snd_pcm_ops *ops);
905void snd_pcm_set_sync(struct snd_pcm_substream *substream); 903void snd_pcm_set_sync(struct snd_pcm_substream *substream);