lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 01 Aug 2018 14:03:06 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     "Akshu Agrawal" <akshu.agrawal@....com>
Cc:     "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." 
        <alsa-devel@...a-project.org>, <Alexander.Deucher@....com>,
        <djkurtz@...omium.org>, "Liam Girdwood" <lgirdwood@...il.com>,
        "Mark Brown" <broonie@...nel.org>,
        "Jaroslav Kysela" <perex@...ex.cz>,
        "open list" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ASoC: soc-pcm: Use delay set in component pointer function

On Wed, 01 Aug 2018 12:07:33 +0200,
Akshu Agrawal wrote:
> 
> Take into account the base delay set in pointer callback.
> 
> There are cases where a pointer function populates
> runtime->delay, such as:
> ./sound/pci/hda/hda_controller.c
> ./sound/soc/intel/atom/sst-mfld-platform-pcm.c
> 
> This delay was getting lost and was overwritten by delays
> from codec or cpu dai delay function if exposed.
> 
> Now,
> Total delay = base delay + cpu_dai delay + codec_dai delay
> 
> Signed-off-by: Akshu Agrawal <akshu.agrawal@....com>

Reviewed-by: Takashi Iwai <tiwai@...e.de>


thanks,

Takashi


> ---
>  sound/soc/soc-pcm.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index 98be04b..e8b98bfd 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -1179,6 +1179,9 @@ static snd_pcm_uframes_t soc_pcm_pointer(struct snd_pcm_substream *substream)
>  	snd_pcm_sframes_t codec_delay = 0;
>  	int i;
>  
> +	/* clearing the previous total delay */
> +	runtime->delay = 0;
> +
>  	for_each_rtdcom(rtd, rtdcom) {
>  		component = rtdcom->component;
>  
> @@ -1190,6 +1193,8 @@ static snd_pcm_uframes_t soc_pcm_pointer(struct snd_pcm_substream *substream)
>  		offset = component->driver->ops->pointer(substream);
>  		break;
>  	}
> +	/* base delay if assigned in pointer callback */
> +	delay = runtime->delay;
>  
>  	if (cpu_dai->driver->ops->delay)
>  		delay += cpu_dai->driver->ops->delay(substream, cpu_dai);
> -- 
> 1.9.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ