|
|
@@ -812,7 +812,10 @@ static int snd_compr_drain(struct snd_compr_stream *stream)
|
|
|
case SNDRV_PCM_STATE_OPEN:
|
|
|
case SNDRV_PCM_STATE_SETUP:
|
|
|
case SNDRV_PCM_STATE_PREPARED:
|
|
|
+ case SNDRV_PCM_STATE_PAUSED:
|
|
|
return -EPERM;
|
|
|
+ case SNDRV_PCM_STATE_XRUN:
|
|
|
+ return -EPIPE;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
@@ -861,7 +864,10 @@ static int snd_compr_partial_drain(struct snd_compr_stream *stream)
|
|
|
case SNDRV_PCM_STATE_OPEN:
|
|
|
case SNDRV_PCM_STATE_SETUP:
|
|
|
case SNDRV_PCM_STATE_PREPARED:
|
|
|
+ case SNDRV_PCM_STATE_PAUSED:
|
|
|
return -EPERM;
|
|
|
+ case SNDRV_PCM_STATE_XRUN:
|
|
|
+ return -EPIPE;
|
|
|
default:
|
|
|
break;
|
|
|
}
|