OSDN Git Service

Merge branch 'for-linus' into for-next
authorTakashi Iwai <tiwai@suse.de>
Wed, 25 Apr 2018 08:41:08 +0000 (10:41 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 25 Apr 2018 14:44:36 +0000 (16:44 +0200)
Back-merge 4.17-rc3 fixes for further development.
This will bump the base to 4.17-rc2, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
1  2 
sound/core/pcm_compat.c
sound/core/pcm_native.c
sound/pci/hda/patch_realtek.c

Simple merge
@@@ -2654,17 -2692,26 +2654,20 @@@ static int snd_pcm_hwsync(struct snd_pc
        return err;
  }
                
- static snd_pcm_sframes_t snd_pcm_delay(struct snd_pcm_substream *substream)
+ static int snd_pcm_delay(struct snd_pcm_substream *substream,
+                        snd_pcm_sframes_t *delay)
  {
 -      struct snd_pcm_runtime *runtime = substream->runtime;
        int err;
        snd_pcm_sframes_t n = 0;
  
        snd_pcm_stream_lock_irq(substream);
        err = do_pcm_hwsync(substream);
 -      if (!err) {
 -              if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
 -                      n = snd_pcm_playback_hw_avail(runtime);
 -              else
 -                      n = snd_pcm_capture_avail(runtime);
 -              n += runtime->delay;
 -      }
 +      if (!err)
 +              n = snd_pcm_calc_delay(substream);
        snd_pcm_stream_unlock_irq(substream);
-       return err < 0 ? err : n;
+       if (!err)
+               *delay = n;
+       return err;
  }
                
  static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream,
Simple merge