All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Shengjiu Wang <shengjiu.wang@nxp.com>,
	alsa-devel@alsa-project.org,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCH 3/8] v4l-utils: common: add v4l-audio support
Date: Mon, 13 Nov 2023 11:18:44 +0100	[thread overview]
Message-ID: <266ef16e47abee5b13754324cc99943d73e38245.1699870530.git.hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <7889c22b922214ebcc0e62feeeb167b40d5042ec.1699870530.git.hverkuil-cisco@xs4all.nl>

The media/v4l2-info sources now understand the new Audio types.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 utils/common/media-info.cpp | 3 +++
 utils/common/media-info.h   | 1 +
 utils/common/v4l2-info.cpp  | 6 ++++++
 3 files changed, 10 insertions(+)

diff --git a/utils/common/media-info.cpp b/utils/common/media-info.cpp
index 95e4c74f..060e8b64 100644
--- a/utils/common/media-info.cpp
+++ b/utils/common/media-info.cpp
@@ -44,6 +44,7 @@ static constexpr struct {
 	{ "swradio", MEDIA_TYPE_SDR },
 	{ "v4l-subdev", MEDIA_TYPE_SUBDEV },
 	{ "v4l-touch", MEDIA_TYPE_TOUCH },
+	{ "v4l-audio", MEDIA_TYPE_AUDIO },
 	{ "media", MEDIA_TYPE_MEDIA },
 	{ "frontend", MEDIA_TYPE_DVB_FRONTEND },
 	{ "demux", MEDIA_TYPE_DVB_DEMUX },
@@ -280,6 +281,7 @@ static constexpr flag_def interface_types_def[] = {
 	{ MEDIA_INTF_T_V4L_SUBDEV, "V4L Sub-Device" },
 	{ MEDIA_INTF_T_V4L_SWRADIO, "V4L Software Defined Radio" },
 	{ MEDIA_INTF_T_V4L_TOUCH, "V4L Touch" },
+	{ MEDIA_INTF_T_V4L_AUDIO, "V4L Audio" },
 
 	{ MEDIA_INTF_T_ALSA_PCM_CAPTURE, "ALSA PCM Capture" },
 	{ MEDIA_INTF_T_ALSA_PCM_PLAYBACK, "ALSA PCM Playback" },
@@ -335,6 +337,7 @@ static constexpr flag_def entity_functions_def[] = {
 	{ MEDIA_ENT_F_PROC_VIDEO_DECODER, "Video Decoder" },
 	{ MEDIA_ENT_F_PROC_VIDEO_ENCODER, "Video Encoder" },
 	{ MEDIA_ENT_F_PROC_VIDEO_ISP, "Image Signal Processor" },
+	{ MEDIA_ENT_F_PROC_AUDIO_RESAMPLER, "Audio Resampler" },
 	{ MEDIA_ENT_F_VID_MUX, "Video Muxer" },
 	{ MEDIA_ENT_F_VID_IF_BRIDGE, "Video Interface Bridge" },
 	{ 0, nullptr }
diff --git a/utils/common/media-info.h b/utils/common/media-info.h
index a862b70b..578040b4 100644
--- a/utils/common/media-info.h
+++ b/utils/common/media-info.h
@@ -14,6 +14,7 @@ enum media_type {
 	MEDIA_TYPE_RADIO,
 	MEDIA_TYPE_SDR,
 	MEDIA_TYPE_TOUCH,
+	MEDIA_TYPE_AUDIO,
 	MEDIA_TYPE_SUBDEV,
 	MEDIA_TYPE_DVB_FRONTEND,
 	MEDIA_TYPE_DVB_DEMUX,
diff --git a/utils/common/v4l2-info.cpp b/utils/common/v4l2-info.cpp
index 4f8c2aa7..00de69ae 100644
--- a/utils/common/v4l2-info.cpp
+++ b/utils/common/v4l2-info.cpp
@@ -97,6 +97,8 @@ static std::string cap2s(unsigned cap)
 		s += "\t\tExtended Pix Format\n";
 	if (cap & V4L2_CAP_DEVICE_CAPS)
 		s += "\t\tDevice Capabilities\n";
+	if (cap & V4L2_CAP_AUDIO_M2M)
+		s += "\t\tAudio Memory-to-Memory\n";
 	return s;
 }
 
@@ -191,6 +193,10 @@ std::string buftype2s(int type)
 		return "Metadata Capture";
 	case V4L2_BUF_TYPE_META_OUTPUT:
 		return "Metadata Output";
+	case V4L2_BUF_TYPE_AUDIO_CAPTURE:
+		return "Audio Capture";
+	case V4L2_BUF_TYPE_AUDIO_OUTPUT:
+		return "Audio Output";
 	case V4L2_BUF_TYPE_PRIVATE:
 		return "Private";
 	default:
-- 
2.42.0


  parent reply	other threads:[~2023-11-13 10:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 10:18 [RFC PATCH 0/8] v4l-utils: add v4l-audioX support Hans Verkuil
2023-11-13 10:18 ` [PATCH 1/8] sync with audio repo Hans Verkuil
2023-11-13 10:18   ` [PATCH 2/8] v4l-utils: add v4l-audio support to helper headers Hans Verkuil
2023-11-13 10:18   ` Hans Verkuil [this message]
2023-11-13 10:18   ` [PATCH 4/8] libmedia_dev: support v4l-audio Hans Verkuil
2023-11-13 10:18   ` [PATCH 5/8] libv4l2util: recognize V4L2_CAP_AUDIO_M2M Hans Verkuil
2023-11-13 10:18   ` [PATCH 6/8] v4l2-ctl: support v4l-audio devices Hans Verkuil
2023-11-13 10:18   ` [PATCH 7/8] v4l2-compliance: add support for v4l-audioX devices Hans Verkuil
2023-11-13 10:18   ` [PATCH 8/8] test-media: add vim2m-audio test Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=266ef16e47abee5b13754324cc99943d73e38245.1699870530.git.hverkuil-cisco@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-media@vger.kernel.org \
    --cc=shengjiu.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.