2525/* hardware definition */
2626static struct snd_pcm_hardware snd_bcm2835_playback_hw = {
2727 .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
28- SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_BATCH ),
28+ SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID ),
2929 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE ,
3030 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000 ,
3131 .rate_min = 8000 ,
@@ -99,8 +99,6 @@ static irqreturn_t bcm2835_playback_fifo_irq(int irq, void *dev_id)
9999 alsa_stream -> pos %= alsa_stream -> buffer_size ;
100100 }
101101
102- alsa_stream -> interpolate_start = ktime_get_ns ();
103-
104102 if (alsa_stream -> substream ) {
105103 if (new_period )
106104 snd_pcm_period_elapsed (alsa_stream -> substream );
@@ -401,7 +399,6 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream)
401399 alsa_stream -> buffer_size = snd_pcm_lib_buffer_bytes (substream );
402400 alsa_stream -> period_size = snd_pcm_lib_period_bytes (substream );
403401 alsa_stream -> pos = 0 ;
404- alsa_stream -> interpolate_start = ktime_get_ns ();
405402
406403 audio_debug ("buffer_size=%d, period_size=%d pos=%d frame_bits=%d\n" ,
407404 alsa_stream -> buffer_size , alsa_stream -> period_size ,
@@ -498,7 +495,6 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_substream *substream)
498495{
499496 struct snd_pcm_runtime * runtime = substream -> runtime ;
500497 bcm2835_alsa_stream_t * alsa_stream = runtime -> private_data ;
501- u64 now = ktime_get_ns ();
502498
503499 audio_info (" .. IN\n" );
504500
@@ -507,12 +503,6 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_substream *substream)
507503 frames_to_bytes (runtime , runtime -> control -> appl_ptr ),
508504 alsa_stream -> pos );
509505
510- /* Give userspace better delay reporting by interpolating between GPU
511- * notifications, assuming audio speed is close enough to the clock
512- * used for ktime */
513- if (alsa_stream -> interpolate_start && alsa_stream -> interpolate_start < now )
514- runtime -> delay = - (int )div_u64 ((now - alsa_stream -> interpolate_start ) * runtime -> rate , 1000000000 );
515-
516506 audio_info (" .. OUT\n" );
517507 return snd_pcm_indirect_playback_pointer (substream ,
518508 & alsa_stream -> pcm_indirect ,
0 commit comments