[PATCH v3] Fix ALSA and DVB representation at media controller API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The previous provision for DVB media controller support were to
define an ID (likely meaning the adapter number) for the DVB
devnodes.

This is just plain wrong. Just like V4L, DVB devices (and ALSA,
or whatever) are identified via a (major, minor) tuple.

This is enough to uniquely identify a devnode, no matter what
API it implements.

So, before we go too far, let's mark the old v4l, dvb and alsa
"devnode" info as deprecated, and just call it as "dev".

As we don't want to break compilation on already existing apps,
let's just keep the old definitions as-is, adding a note that
those are deprecated at media-entity.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx>

-

Laurent,

If you accept this patch, I'll respin the DVB media controller series
accordingly, and add the missing bits for DVB media controller at
at the documentation.

Regards,
Mauro

diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index e00459185d20..3c3d9d25eb2f 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -83,7 +83,16 @@ struct media_entity {
 	struct media_pipeline *pipe;	/* Pipeline this entity belongs to. */
 
 	union {
-		/* Node specifications */
+		/* For all devnode types */
+		struct {
+			u32 major;
+			u32 minor;
+		} dev;
+
+		/* Sub-device specifications */
+		/* Nothing needed yet */
+
+		/* DEPRECATED: Old node specifications */
 		struct {
 			u32 major;
 			u32 minor;
@@ -98,9 +107,6 @@ struct media_entity {
 			u32 subdevice;
 		} alsa;
 		int dvb;
-
-		/* Sub-device specifications */
-		/* Nothing needed yet */
 	} info;
 };
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux