hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/include/uapi/linux/media.h
....@@ -146,7 +146,7 @@
146146 #define MEDIA_ENT_FL_CONNECTOR (1 << 1)
147147
148148 /* OR with the entity id value to find the next entity */
149
-#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31)
149
+#define MEDIA_ENT_ID_FLAG_NEXT (1U << 31)
150150
151151 struct media_entity_desc {
152152 __u32 id;
....@@ -262,6 +262,11 @@
262262 #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4)
263263 #define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5)
264264
265
+#define MEDIA_INTF_T_ALSA_BASE 0x00000300
266
+#define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE)
267
+#define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1)
268
+#define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2)
269
+
265270 #if defined(__KERNEL__)
266271
267272 /*
....@@ -369,6 +374,14 @@
369374 #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)
370375 #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)
371376 #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology)
377
+#define MEDIA_IOC_REQUEST_ALLOC _IOR ('|', 0x05, int)
378
+
379
+/*
380
+ * These ioctls are called on the request file descriptor as returned
381
+ * by MEDIA_IOC_REQUEST_ALLOC.
382
+ */
383
+#define MEDIA_REQUEST_IOC_QUEUE _IO('|', 0x80)
384
+#define MEDIA_REQUEST_IOC_REINIT _IO('|', 0x81)
372385
373386 #ifndef __KERNEL__
374387
....@@ -405,19 +418,19 @@
405418 #define MEDIA_ENT_F_DTV_DECODER MEDIA_ENT_F_DV_DECODER
406419
407420 /*
408
- * There is still no ALSA support in the media controller. These
421
+ * There is still no full ALSA support in the media controller. These
409422 * defines should not have been added and we leave them here only
410423 * in case some application tries to use these defines.
424
+ *
425
+ * The ALSA defines that are in use have been moved into __KERNEL__
426
+ * scope. As support gets added to these interface types, they should
427
+ * be moved into __KERNEL__ scope with the code that uses them.
411428 */
412
-#define MEDIA_INTF_T_ALSA_BASE 0x00000300
413
-#define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE)
414
-#define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1)
415
-#define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2)
416
-#define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3)
417
-#define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4)
418
-#define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5)
419
-#define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6)
420
-#define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7)
429
+#define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3)
430
+#define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4)
431
+#define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5)
432
+#define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6)
433
+#define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7)
421434
422435 /* Obsolete symbol for media_version, no longer used in the kernel */
423436 #define MEDIA_API_VERSION ((0 << 16) | (1 << 8) | 0)