/* -- mmap -- */
volatile struct snd_pcm_mmap_status *status;
volatile struct snd_pcm_mmap_control *control;
+ atomic_t mmap_count;
/* -- locking / scheduling -- */
wait_queue_head_t sleep;
struct snd_pcm_group *group; /* pointer to current group */
/* -- assigned files -- */
void *file;
- int ref_count;
- atomic_t mmap_count;
- unsigned int f_flags;
+ struct file *ffile;
void (*pcm_release)(struct snd_pcm_substream *);
#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
/* -- OSS things -- */
unsigned int hw_opened: 1;
};
-#define SUBSTREAM_BUSY(substream) ((substream)->ref_count > 0)
+#define SUBSTREAM_BUSY(substream) ((substream)->file != NULL)
struct snd_pcm_str {
void _snd_pcm_hw_params_any(struct snd_pcm_hw_params *params);
void _snd_pcm_hw_param_setempty(struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var);
+int snd_pcm_hw_param_near(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ snd_pcm_hw_param_t var,
+ unsigned int val, int *dir);
+int snd_pcm_hw_param_set(struct snd_pcm_substream *pcm,
+ struct snd_pcm_hw_params *params,
+ snd_pcm_hw_param_t var,
+ unsigned int val, int dir);
int snd_pcm_hw_params_choose(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params);
int snd_pcm_hw_refine(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params);
static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
{
struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
- atomic_inc(&substream->mmap_count);
+ atomic_inc(&substream->runtime->mmap_count);
}
static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area)
{
struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
- atomic_dec(&substream->mmap_count);
+ atomic_dec(&substream->runtime->mmap_count);
}
/* mmap for io-memory area */