Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25657
b: refs/heads/master
c: 1576274
h: refs/heads/master
i:
  25655: 955802c
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Apr 12, 2006
1 parent f420f8a commit cc348f2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bbdc1b7dbe41578da7c9a6266cf450abe97e4ca7
refs/heads/master: 1576274d30286dd048967176dc8e75e192051ff5
2 changes: 1 addition & 1 deletion trunk/include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ struct snd_pcm_substream {
struct snd_pcm_group self_group; /* fake group for non linked substream (with substream lock inside) */
struct snd_pcm_group *group; /* pointer to current group */
/* -- assigned files -- */
struct snd_pcm_file *file;
void *file;
struct file *ffile;
void (*pcm_release)(struct snd_pcm_substream *);
#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
Expand Down
5 changes: 3 additions & 2 deletions trunk/sound/core/oss/pcm_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ static void snd_pcm_oss_init_substream(struct snd_pcm_substream *substream,
substream->oss.setup = *setup;
if (setup->nonblock)
substream->ffile->f_flags |= O_NONBLOCK;
else
else if (setup->block)
substream->ffile->f_flags &= ~O_NONBLOCK;
runtime = substream->runtime;
runtime->oss.params = 1;
Expand Down Expand Up @@ -1757,6 +1757,7 @@ static int snd_pcm_oss_open_file(struct file *file,
}

pcm_oss_file->streams[idx] = substream;
substream->file = pcm_oss_file;
snd_pcm_oss_init_substream(substream, &setup[idx], minor);
}

Expand Down Expand Up @@ -1809,7 +1810,7 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
err = -EFAULT;
goto __error;
}
memset(setup, 0, sizeof(*setup));
memset(setup, 0, sizeof(setup));
if (file->f_mode & FMODE_WRITE)
snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_PLAYBACK,
task_name, &setup[0]);
Expand Down
6 changes: 4 additions & 2 deletions trunk/sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -2007,14 +2007,16 @@ static void pcm_release_private(struct snd_pcm_substream *substream)
void snd_pcm_release_substream(struct snd_pcm_substream *substream)
{
snd_pcm_drop(substream);
if (substream->pcm_release)
substream->pcm_release(substream);
if (substream->hw_opened) {
if (substream->ops->hw_free != NULL)
substream->ops->hw_free(substream);
substream->ops->close(substream);
substream->hw_opened = 0;
}
if (substream->pcm_release) {
substream->pcm_release(substream);
substream->pcm_release = NULL;
}
snd_pcm_detach_substream(substream);
}

Expand Down

0 comments on commit cc348f2

Please sign in to comment.