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:   Mon, 27 Nov 2017 21:28:45 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>
Cc:     Timur Tabi <timur@...i.org>, Nicolin Chen <nicoleotsuka@...il.com>,
        Xiubo Li <Xiubo.Lee@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
        Liam Girdwood <lgirdwood@...il.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Mark Brown <broonie@...nel.org>,
        Fabio Estevam <fabio.estevam@....com>,
        linuxppc-dev@...ts.ozlabs.org
Subject: Re: [alsa-devel] [PATCH v3 1/2] ALSA: pcm: add SNDRV_PCM_FORMAT_{S, U}20

On Mon, 27 Nov 2017 00:09:47 +0100,
Maciej S. Szmigiero wrote:
> diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
> index 58acd00cae19..d970879944fc 100644
> --- a/include/sound/soc-dai.h
> +++ b/include/sound/soc-dai.h
> @@ -102,6 +102,8 @@ struct snd_compr_stream;
>  			       SNDRV_PCM_FMTBIT_S16_BE |\
>  			       SNDRV_PCM_FMTBIT_S20_3LE |\
>  			       SNDRV_PCM_FMTBIT_S20_3BE |\
> +			       SNDRV_PCM_FMTBIT_S20_LE |\
> +			       SNDRV_PCM_FMTBIT_S20_BE |\
>  			       SNDRV_PCM_FMTBIT_S24_3LE |\
>  			       SNDRV_PCM_FMTBIT_S24_3BE |\
>                                 SNDRV_PCM_FMTBIT_S32_LE |\

Is it really safe to include them unconditionally...?

> diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
> index c227ccba60ae..7385024041d2 100644
> --- a/include/uapi/sound/asound.h
> +++ b/include/uapi/sound/asound.h
> @@ -214,6 +214,11 @@ typedef int __bitwise snd_pcm_format_t;
>  #define	SNDRV_PCM_FORMAT_IMA_ADPCM	((__force snd_pcm_format_t) 22)
>  #define	SNDRV_PCM_FORMAT_MPEG		((__force snd_pcm_format_t) 23)
>  #define	SNDRV_PCM_FORMAT_GSM		((__force snd_pcm_format_t) 24)
> +#define	SNDRV_PCM_FORMAT_S20_LE	((__force snd_pcm_format_t) 25) /* \ 			*/
> +#define	SNDRV_PCM_FORMAT_S20_BE	((__force snd_pcm_format_t) 26) /* | 			*/
> +#define	SNDRV_PCM_FORMAT_U20_LE	((__force snd_pcm_format_t) 27) /* | in four bytes,	*/
> +#define	SNDRV_PCM_FORMAT_U20_BE	((__force snd_pcm_format_t) 28) /* / LSB justified	*/

This style of comments is unusual, so I prefer rather a dumb style,
even don't mind repeating the same text in each line.  They'll be over
80 chars in anyway, so ignore what checkpatch complains.

> +/* gap in the numbering for a future standard linear format */

This comment is good.


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ