Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41116
b: refs/heads/master
c: de1b8b9
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Nov 28, 2006
1 parent 9c2a3bc commit 82d27b3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 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: 282e0c87f223afbe8b182197eb06c127a66353ce
refs/heads/master: de1b8b93a0ba016b07d13086a15ad692536e6995
3 changes: 2 additions & 1 deletion trunk/sound/core/oss/pcm_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -2359,7 +2359,8 @@ static int snd_pcm_oss_release(struct inode *inode, struct file *file)
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
snd_assert(substream != NULL, return -ENXIO);
pcm = substream->pcm;
snd_pcm_oss_sync(pcm_oss_file);
if (!pcm->card->shutdown)
snd_pcm_oss_sync(pcm_oss_file);
mutex_lock(&pcm->open_mutex);
snd_pcm_oss_release_file(pcm_oss_file);
mutex_unlock(&pcm->open_mutex);
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 @@ -1310,7 +1310,8 @@ static int snd_pcm_pre_prepare(struct snd_pcm_substream *substream,
int f_flags)
{
struct snd_pcm_runtime *runtime = substream->runtime;
if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
if (runtime->status->state == SNDRV_PCM_STATE_OPEN ||
runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED)
return -EBADFD;
if (snd_pcm_running(substream))
return -EBUSY;
Expand Down Expand Up @@ -1568,7 +1569,8 @@ static int snd_pcm_drop(struct snd_pcm_substream *substream)
runtime = substream->runtime;
card = substream->pcm->card;

if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
if (runtime->status->state == SNDRV_PCM_STATE_OPEN ||
runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED)
return -EBADFD;

snd_power_lock(card);
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,8 @@ static int snd_usb_hw_free(struct snd_pcm_substream *substream)
subs->cur_audiofmt = NULL;
subs->cur_rate = 0;
subs->period_bytes = 0;
release_substream_urbs(subs, 0);
if (!subs->stream->chip->shutdown)
release_substream_urbs(subs, 0);
return snd_pcm_free_vmalloc_buffer(substream);
}

Expand Down

0 comments on commit 82d27b3

Please sign in to comment.