[PATCH v2 1/2] ALSA: hda: Reduce udelay() at SKL+ position reporting

Takashi Iwai tiwai at suse.de
Wed Sep 29 16:39:44 CEST 2021


On Wed, 29 Sep 2021 16:15:44 +0200,
Pierre-Louis Bossart wrote:
> 
> 
> > @@ -874,11 +896,7 @@ static unsigned int azx_get_pos_skl(struct azx *chip, struct azx_dev *azx_dev)
> >  	if (azx_dev->core.substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
> >  		return azx_skl_get_dpib_pos(chip, azx_dev);
> >  
> > -	/* For capture, we need to read posbuf, but it requires a delay
> > -	 * for the possible boundary overlap; the read of DPIB fetches the
> > -	 * actual posbuf
> > -	 */
> > -	udelay(20);
> > +	/* read of DPIB fetches the actual posbuf */
> >  	azx_skl_get_dpib_pos(chip, azx_dev);
> 
> I don't think extra read has any effect, it could be removed....
> 
> >  	return azx_get_pos_posbuf(chip, azx_dev);
> >  }
> 
> The suggestion was to further simplify with
> 
> static unsigned int azx_get_pos_skl(struct azx *chip, struct azx_dev
> *azx_dev)
> {
> 	return azx_get_pos_posbuf(chip, azx_dev);
> }
> 
> i.e. same behavior on playback and capture. that's the recommendation
> from Intel hw folks.

It's achieved in the second patch.


Takashi


More information about the Alsa-devel mailing list