[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240217101926.3f1d2452@coco.lan>
Date: Sat, 17 Feb 2024 10:19:26 +0100
From: Mauro Carvalho Chehab <mchehab@...nel.org>
To: Shengjiu Wang <shengjiu.wang@....com>
Cc: hverkuil@...all.nl, sakari.ailus@....fi, tfiga@...omium.org,
m.szyprowski@...sung.com, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, shengjiu.wang@...il.com, Xiubo.Lee@...il.com,
festevam@...il.com, nicoleotsuka@...il.com, lgirdwood@...il.com,
broonie@...nel.org, perex@...ex.cz, tiwai@...e.com,
alsa-devel@...a-project.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v12 08/15] media: uapi: Define audio sample format
fourcc type
Em Thu, 18 Jan 2024 20:32:01 +0800
Shengjiu Wang <shengjiu.wang@....com> escreveu:
> The audio sample format definition is from alsa,
> the header file is include/uapi/sound/asound.h, but
> don't include this header file directly, because in
> user space, there is another copy in alsa-lib.
> There will be conflict in userspace for include
> videodev2.h & asound.h and asoundlib.h
>
> Here still use the fourcc format.
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
> ---
> .../userspace-api/media/v4l/pixfmt-audio.rst | 87 +++++++++++++++++++
> .../userspace-api/media/v4l/pixfmt.rst | 1 +
> drivers/media/v4l2-core/v4l2-ioctl.c | 13 +++
> include/uapi/linux/videodev2.h | 23 +++++
> 4 files changed, 124 insertions(+)
> create mode 100644 Documentation/userspace-api/media/v4l/pixfmt-audio.rst
>
> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-audio.rst b/Documentation/userspace-api/media/v4l/pixfmt-audio.rst
> new file mode 100644
> index 000000000000..04b4a7fbd8f4
> --- /dev/null
> +++ b/Documentation/userspace-api/media/v4l/pixfmt-audio.rst
> @@ -0,0 +1,87 @@
> +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
> +
> +.. _pixfmt-audio:
> +
> +*************
> +Audio Formats
> +*************
> +
> +These formats are used for :ref:`audiomem2mem` interface only.
> +
> +.. tabularcolumns:: |p{5.8cm}|p{1.2cm}|p{10.3cm}|
> +
> +.. cssclass:: longtable
> +
> +.. flat-table:: Audio Format
> + :header-rows: 1
> + :stub-columns: 0
> + :widths: 3 1 4
> +
> + * - Identifier
> + - Code
> + - Details
> + * .. _V4L2-AUDIO-FMT-S8:
> +
> + - ``V4L2_AUDIO_FMT_S8``
> + - 'S8'
> + - Corresponds to SNDRV_PCM_FORMAT_S8 in ALSA
> + * .. _V4L2-AUDIO-FMT-S16-LE:
Hmm... why can't we just use SNDRV_*_FORMAT_*? Those are already part of
an uAPI header. No need to add any abstraction here and/or redefine
what is there already at include/uapi/sound/asound.h.
Thanks,
Mauro
Powered by blists - more mailing lists