]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - sound/core/pcm_native.c
Apply preempt_rt patch-4.9-rt1.patch.xz
[zynq/linux.git] / sound / core / pcm_native.c
index c61fd50f771f9ecd55c8e472d152321b37255e71..3d307bda86f96da0ada291467143b3e9f763de27 100644 (file)
@@ -135,7 +135,7 @@ EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock);
 void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream)
 {
        if (!substream->pcm->nonatomic)
-               local_irq_disable();
+               local_irq_disable_nort();
        snd_pcm_stream_lock(substream);
 }
 EXPORT_SYMBOL_GPL(snd_pcm_stream_lock_irq);
@@ -150,7 +150,7 @@ void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream)
 {
        snd_pcm_stream_unlock(substream);
        if (!substream->pcm->nonatomic)
-               local_irq_enable();
+               local_irq_enable_nort();
 }
 EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock_irq);
 
@@ -158,7 +158,7 @@ unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream)
 {
        unsigned long flags = 0;
        if (!substream->pcm->nonatomic)
-               local_irq_save(flags);
+               local_irq_save_nort(flags);
        snd_pcm_stream_lock(substream);
        return flags;
 }
@@ -176,7 +176,7 @@ void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream,
 {
        snd_pcm_stream_unlock(substream);
        if (!substream->pcm->nonatomic)
-               local_irq_restore(flags);
+               local_irq_restore_nort(flags);
 }
 EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock_irqrestore);
 
@@ -2637,9 +2637,11 @@ static int snd_pcm_hwsync(struct snd_pcm_substream *substream)
                        break;
                /* Fall through */
        case SNDRV_PCM_STATE_PREPARED:
-       case SNDRV_PCM_STATE_SUSPENDED:
                err = 0;
                break;
+       case SNDRV_PCM_STATE_SUSPENDED:
+               err = -ESTRPIPE;
+               break;
        case SNDRV_PCM_STATE_XRUN:
                err = -EPIPE;
                break;