|
@@ -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;
|
|
@@ -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);
|