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

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Wed Sep 29 16:15:44 CEST 2021


> @@ -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.


More information about the Alsa-devel mailing list