| .. | .. |
|---|
| 146 | 146 | #define MEDIA_ENT_FL_CONNECTOR (1 << 1) |
|---|
| 147 | 147 | |
|---|
| 148 | 148 | /* 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) |
|---|
| 150 | 150 | |
|---|
| 151 | 151 | struct media_entity_desc { |
|---|
| 152 | 152 | __u32 id; |
|---|
| .. | .. |
|---|
| 262 | 262 | #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4) |
|---|
| 263 | 263 | #define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5) |
|---|
| 264 | 264 | |
|---|
| 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 | + |
|---|
| 265 | 270 | #if defined(__KERNEL__) |
|---|
| 266 | 271 | |
|---|
| 267 | 272 | /* |
|---|
| .. | .. |
|---|
| 369 | 374 | #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) |
|---|
| 370 | 375 | #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) |
|---|
| 371 | 376 | #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) |
|---|
| 372 | 385 | |
|---|
| 373 | 386 | #ifndef __KERNEL__ |
|---|
| 374 | 387 | |
|---|
| .. | .. |
|---|
| 405 | 418 | #define MEDIA_ENT_F_DTV_DECODER MEDIA_ENT_F_DV_DECODER |
|---|
| 406 | 419 | |
|---|
| 407 | 420 | /* |
|---|
| 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 |
|---|
| 409 | 422 | * defines should not have been added and we leave them here only |
|---|
| 410 | 423 | * 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. |
|---|
| 411 | 428 | */ |
|---|
| 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) |
|---|
| 421 | 434 | |
|---|
| 422 | 435 | /* Obsolete symbol for media_version, no longer used in the kernel */ |
|---|
| 423 | 436 | #define MEDIA_API_VERSION ((0 << 16) | (1 << 8) | 0) |
|---|