diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-04-28 17:13:41 +0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-06-22 23:33:13 +0400 |
commit | 0df63e44c3e315ec0fe427ae62558231864108bd (patch) | |
tree | 3cff6f5d5fdb7ad047a61c591d891e3ca1bc669e /include | |
parent | f001c3acf64b8ca18fe40af592629abb261b321e (diff) | |
download | linux-0df63e44c3e315ec0fe427ae62558231864108bd.tar.xz |
[ALSA] Add O_APPEND flag support to PCM
Added O_APPEND flag support to PCM to enable shared substreams
among multiple processes. This mechanism is used by dmix and
dsnoop plugins.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/asound.h | 2 | ||||
-rw-r--r-- | include/sound/pcm.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/sound/asound.h b/include/sound/asound.h index 9cc021c7ee11..41885f48ad91 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -137,7 +137,7 @@ enum { * * *****************************************************************************/ -#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7) +#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 8) typedef unsigned long snd_pcm_uframes_t; typedef signed long snd_pcm_sframes_t; diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 998bacefc8f8..cebf0310a8dc 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -368,7 +368,8 @@ struct snd_pcm_substream { struct snd_pcm_group *group; /* pointer to current group */ /* -- assigned files -- */ void *file; - struct file *ffile; + int ref_count; + unsigned int f_flags; void (*pcm_release)(struct snd_pcm_substream *); #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) /* -- OSS things -- */ @@ -387,7 +388,7 @@ struct snd_pcm_substream { unsigned int hw_opened: 1; }; -#define SUBSTREAM_BUSY(substream) ((substream)->file != NULL) +#define SUBSTREAM_BUSY(substream) ((substream)->ref_count > 0) struct snd_pcm_str { |