diff mbox series

[04/10] libmedia_dev: support v4l-audio

Message ID a1544a011a801bc07007a632d07e0868dec0cbeb.1705503477.git.hverkuil-cisco@xs4all.nl (mailing list archive)
State New, archived
Headers show
Series v4l-utils: add v4l-audioX support | expand

Commit Message

Hans Verkuil Jan. 17, 2024, 3:02 p.m. UTC
Detect v4l-audioX devices.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 utils/libmedia_dev/get_media_devices.c | 4 ++++
 utils/libmedia_dev/get_media_devices.h | 1 +
 2 files changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/utils/libmedia_dev/get_media_devices.c b/utils/libmedia_dev/get_media_devices.c
index 21920867..51635acf 100644
--- a/utils/libmedia_dev/get_media_devices.c
+++ b/utils/libmedia_dev/get_media_devices.c
@@ -226,6 +226,8 @@  static int add_v4l_class(struct media_device_entry *md)
 		md->type = MEDIA_V4L_RADIO;
 	else if (strstr(md->node, "v4l-touch"))
 		md->type = MEDIA_V4L_TOUCH;
+	else if (strstr(md->node, "v4l-audio"))
+		md->type = MEDIA_V4L_AUDIO;
 	else if (strstr(md->node, "v4l-subdev"))
 		md->type = MEDIA_V4L_SUBDEV;
 
@@ -379,6 +381,8 @@  const char *media_device_type(enum device_type type)
 		return "swradio";
 	case MEDIA_V4L_TOUCH:
 		return "v4l-touch";
+	case MEDIA_V4L_AUDIO:
+		return "v4l-audio";
 	case MEDIA_V4L_SUBDEV:
 		return "v4l subdevice";
 
diff --git a/utils/libmedia_dev/get_media_devices.h b/utils/libmedia_dev/get_media_devices.h
index 1a62c54e..235a8c4a 100644
--- a/utils/libmedia_dev/get_media_devices.h
+++ b/utils/libmedia_dev/get_media_devices.h
@@ -37,6 +37,7 @@  enum device_type {
 	MEDIA_V4L_RADIO,
 	MEDIA_V4L_SWRADIO,
 	MEDIA_V4L_TOUCH,
+	MEDIA_V4L_AUDIO,
 	MEDIA_V4L_SUBDEV,
 
 	MEDIA_DVB_VIDEO = 100,