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:   Tue, 14 Feb 2023 10:14:28 -0800
From:   Lars-Peter Clausen <lars@...afoo.de>
To:     Claudiu Beznea <claudiu.beznea@...rochip.com>, lgirdwood@...il.com,
        broonie@...nel.org, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, perex@...ex.cz, tiwai@...e.com,
        nicolas.ferre@...rochip.com, alexandre.belloni@...tlin.com
Cc:     alsa-devel@...a-project.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/3] ASoC: soc-generic-dmaengine-pcm: add option to start
 DMA after DAI

On 2/14/23 08:14, Claudiu Beznea wrote:
> diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
> index 3b99f619e37e..264e87af6b58 100644
> --- a/sound/soc/soc-generic-dmaengine-pcm.c
> +++ b/sound/soc/soc-generic-dmaengine-pcm.c
> @@ -318,7 +318,7 @@ static int dmaengine_copy_user(struct snd_soc_component *component,
>   	return 0;
>   }
>   
> -static const struct snd_soc_component_driver dmaengine_pcm_component = {
> +static struct snd_soc_component_driver dmaengine_pcm_component = {
>   	.name		= SND_DMAENGINE_PCM_DRV_NAME,
>   	.probe_order	= SND_SOC_COMP_ORDER_LATE,
>   	.open		= dmaengine_pcm_open,
> @@ -329,7 +329,7 @@ static const struct snd_soc_component_driver dmaengine_pcm_component = {
>   	.pcm_construct	= dmaengine_pcm_new,
>   };
>   
> -static const struct snd_soc_component_driver dmaengine_pcm_component_process = {
> +static struct snd_soc_component_driver dmaengine_pcm_component_process = {
>   	.name		= SND_DMAENGINE_PCM_DRV_NAME,
>   	.probe_order	= SND_SOC_COMP_ORDER_LATE,
>   	.open		= dmaengine_pcm_open,
> @@ -425,7 +425,7 @@ static const struct snd_dmaengine_pcm_config snd_dmaengine_pcm_default_config =
>   int snd_dmaengine_pcm_register(struct device *dev,
>   	const struct snd_dmaengine_pcm_config *config, unsigned int flags)
>   {
> -	const struct snd_soc_component_driver *driver;
> +	struct snd_soc_component_driver *driver;
>   	struct dmaengine_pcm *pcm;
>   	int ret;
>   
> @@ -450,6 +450,8 @@ int snd_dmaengine_pcm_register(struct device *dev,
>   	else
>   		driver = &dmaengine_pcm_component;
>   
> +	driver->start_dma_last = config->start_dma_last;

This will break if you have multiple sound cards in the system. 
dmaengine_pcm_component must stay const.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ