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:   Fri, 5 Oct 2018 06:09:19 +0530
From:   Vinod <vkoul@...nel.org>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     broonie@...nel.org, alsa-devel@...a-project.org,
        robh+dt@...nel.org, linux-kernel@...r.kernel.org,
        bgoswami@...eaurora.org, rohitkr@...eaurora.org,
        lgirdwood@...il.com, tiwai@...e.com, devicetree@...r.kernel.org,
        mark.rutland@....com
Subject: Re: [PATCH v2 5/5] ASoC: qdsp6: q6asm-dai: Add support to compress
 offload

On 26-09-18, 11:23, Srinivas Kandagatla wrote:
> This patch adds MP3 playback support in q6asm dais, adding other codec
> support should be pretty trivial.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> ---
>  sound/soc/qcom/Kconfig           |   1 +
>  sound/soc/qcom/qdsp6/q6asm-dai.c | 377 ++++++++++++++++++++++++++++++-
>  2 files changed, 377 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/qcom/Kconfig b/sound/soc/qcom/Kconfig
> index 2a4c912d1e48..ebf991bb546c 100644
> --- a/sound/soc/qcom/Kconfig
> +++ b/sound/soc/qcom/Kconfig
> @@ -66,6 +66,7 @@ config SND_SOC_QDSP6_ASM
>  	tristate
>  
>  config SND_SOC_QDSP6_ASM_DAI
> +	select SND_SOC_COMPRESS
>  	tristate
>  
>  config SND_SOC_QDSP6
> diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
> index 9db9a2944ef2..57b8abcbebcd 100644
> --- a/sound/soc/qcom/qdsp6/q6asm-dai.c
> +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
> @@ -11,6 +11,8 @@
>  #include <sound/soc.h>
>  #include <sound/soc-dapm.h>
>  #include <sound/pcm.h>
> +#include <linux/spinlock.h>
> +#include <sound/compress_driver.h>
>  #include <asm/dma.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/of_device.h>
> @@ -31,6 +33,16 @@
>  #define CAPTURE_MIN_PERIOD_SIZE     320
>  #define SID_MASK_DEFAULT	0xF
>  
> +/* Default values used if user space does not set */
> +#define COMPR_PLAYBACK_MIN_FRAGMENT_SIZE (8 * 1024)
> +#define COMPR_PLAYBACK_MAX_FRAGMENT_SIZE (128 * 1024)
> +#define COMPR_PLAYBACK_MIN_NUM_FRAGMENTS (4)
> +#define COMPR_PLAYBACK_MAX_NUM_FRAGMENTS (16 * 4)
> +#define Q6ASM_DAI_TX_RX	0
> +#define Q6ASM_DAI_TX	1
> +#define Q6ASM_DAI_RX	2
> +
> +

Unnecessary double space

>  enum stream_state {
>  	Q6ASM_STREAM_IDLE = 0,
>  	Q6ASM_STREAM_STOPPED,
> @@ -39,11 +51,22 @@ enum stream_state {
>  
>  struct q6asm_dai_rtd {
>  	struct snd_pcm_substream *substream;
> +	struct snd_compr_stream *cstream;
> +	struct snd_compr_params codec_param;
> +	struct snd_dma_buffer dma_buffer;
> +
>  	phys_addr_t phys;
> +	spinlock_t lock;

why would we need a lock for compress case?

-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ