50 #define SPA_TYPE_INTERFACE_Device SPA_TYPE_INFO_INTERFACE_BASE "Device" 52 #define SPA_VERSION_DEVICE 0 61 #define SPA_VERSION_DEVICE_INFO 0 64 #define SPA_DEVICE_CHANGE_MASK_FLAGS (1u<<0) 65 #define SPA_DEVICE_CHANGE_MASK_PROPS (1u<<1) 66 #define SPA_DEVICE_CHANGE_MASK_PARAMS (1u<<2) 74 #define SPA_DEVICE_INFO_INIT() (struct spa_device_info){ SPA_VERSION_DEVICE_INFO, } 82 #define SPA_VERSION_DEVICE_OBJECT_INFO 0 88 #define SPA_DEVICE_OBJECT_CHANGE_MASK_FLAGS (1u<<0) 89 #define SPA_DEVICE_OBJECT_CHANGE_MASK_PROPS (1u<<1) 95 #define SPA_DEVICE_OBJECT_INFO_INIT() (struct spa_device_object_info){ SPA_VERSION_DEVICE_OBJECT_INFO, } 98 #define SPA_RESULT_TYPE_DEVICE_PARAMS 1 106 #define SPA_DEVICE_EVENT_INFO 0 107 #define SPA_DEVICE_EVENT_RESULT 1 108 #define SPA_DEVICE_EVENT_EVENT 2 109 #define SPA_DEVICE_EVENT_OBJECT_INFO 3 110 #define SPA_DEVICE_EVENT_NUM 4 119 #define SPA_VERSION_DEVICE_EVENTS 0 137 #define SPA_DEVICE_METHOD_ADD_LISTENER 0 138 #define SPA_DEVICE_METHOD_SYNC 1 139 #define SPA_DEVICE_METHOD_ENUM_PARAMS 2 140 #define SPA_DEVICE_METHOD_SET_PARAM 3 141 #define SPA_DEVICE_METHOD_NUM 4 149 #define SPA_VERSION_DEVICE_METHODS 0 214 uint32_t
id, uint32_t index, uint32_t max,
239 uint32_t
id, uint32_t flags,
243 #define spa_device_method(o,method,version,...) \ 245 int _res = -ENOTSUP; \ 246 struct spa_device *_o = o; \ 247 spa_interface_call_res(&_o->iface, \ 248 struct spa_device_methods, _res, \ 249 method, version, ##__VA_ARGS__); \ 253 #define spa_device_add_listener(d,...) spa_device_method(d, add_listener, 0, __VA_ARGS__) 254 #define spa_device_sync(d,...) spa_device_method(d, sync, 0, __VA_ARGS__) 255 #define spa_device_enum_params(d,...) spa_device_method(d, enum_params, 0, __VA_ARGS__) 256 #define spa_device_set_param(d,...) spa_device_method(d, set_param, 0, __VA_ARGS__) 258 #define SPA_KEY_DEVICE_ENUM_API "device.enum.api" 260 #define SPA_KEY_DEVICE_API "device.api" 262 #define SPA_KEY_DEVICE_NAME "device.name" 263 #define SPA_KEY_DEVICE_ALIAS "device.alias" 264 #define SPA_KEY_DEVICE_NICK "device.nick" 265 #define SPA_KEY_DEVICE_DESCRIPTION "device.description" 266 #define SPA_KEY_DEVICE_ICON "device.icon" 268 #define SPA_KEY_DEVICE_ICON_NAME "device.icon-name" 270 #define SPA_KEY_DEVICE_PLUGGED_USEC "device.plugged.usec" 272 #define SPA_KEY_DEVICE_BUS_ID "device.bus-id" 273 #define SPA_KEY_DEVICE_BUS_PATH "device.bus-path" 276 #define SPA_KEY_DEVICE_BUS "device.bus" 279 #define SPA_KEY_DEVICE_SUBSYSTEM "device.subsystem" 280 #define SPA_KEY_DEVICE_SYSFS_PATH "device.sysfs.path" 282 #define SPA_KEY_DEVICE_VENDOR_ID "device.vendor.id" 283 #define SPA_KEY_DEVICE_VENDOR_NAME "device.vendor.name" 284 #define SPA_KEY_DEVICE_PRODUCT_ID "device.product.id" 285 #define SPA_KEY_DEVICE_PRODUCT_NAME "device.product.name" 286 #define SPA_KEY_DEVICE_SERIAL "device.serial" 287 #define SPA_KEY_DEVICE_CLASS "device.class" 288 #define SPA_KEY_DEVICE_CAPABILITIES "device.capabilities" 289 #define SPA_KEY_DEVICE_FORM_FACTOR "device.form-factor" 294 #define SPA_KEY_DEVICE_PROFILE "device.profile " 295 #define SPA_KEY_DEVICE_PROFILE_SET "device.profile-set" 296 #define SPA_KEY_DEVICE_STRING "device.string" const struct spa_dict * props
extra object properties
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:92
uint64_t change_mask
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:90
void(* info)(void *data, const struct spa_device_info *info)
notify extra information about the device
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:123
struct spa_pod * param
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:103
uint32_t version
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:120
const struct spa_dict * props
device properties
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:69
uint32_t id
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:100
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:76
static uint32_t int int res
Definition: core.h:328
spa_device_methods:
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:146
static uint32_t int seq
Definition: core.h:328
Information about a device object.
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:81
Definition: utils/dict.h:48
void(* event)(void *data, const struct spa_event *event)
a device event
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:129
uint32_t n_params
number of elements in params
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:71
static uint32_t id
Definition: core.h:328
void(* object_info)(void *data, uint32_t id, const struct spa_device_object_info *info)
info changed for an object managed by the device, info is NULL when the object is removed ...
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:133
int(* enum_params)(void *object, int seq, uint32_t id, uint32_t index, uint32_t max, const struct spa_pod *filter)
Enumerate the parameters of a device.
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:213
const char * type
the object type managed by this device
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:85
uint32_t index
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:101
uint32_t version
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:150
information about a parameter
Definition: param.h:63
Information about the device and parameters it supports.
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:60
uint32_t version
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:62
spa_device_events:
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:117
const char * factory_name
a factory name that implements the object
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:86
struct spa_interface iface
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:53
int(* set_param)(void *object, uint32_t id, uint32_t flags, const struct spa_pod *param)
Set the configurable parameter in device.
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:238
int(* add_listener)(void *object, struct spa_hook *listener, const struct spa_device_events *events, void *data)
Set events to receive asynchronous notifications from the device.
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:167
uint64_t flags
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:68
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:99
struct spa_param_info * params
supported parameters
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:70
uint64_t flags
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:91
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:53
uint64_t change_mask
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:67
int(* sync)(void *object, int seq)
Perform a sync operation.
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:186
Definition: pod/event.h:43
void(* result)(void *data, int seq, int res, uint32_t type, const void *result)
notify a result
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:126
uint32_t version
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:83
uint32_t next
Definition: x86_64-redhat-linux-gnu/doc/spa/monitor/device.h:102