Diff between 29016d835abfc7a0b059d3d6517678dd16859572 and 66f4c241beb46e4eb3e0627650b3e984f01a7ff5

Changed Files

File Additions Deletions Status
profiles/audio/avctp.c +3 -1 modified
src/uinput.h +2 -0 modified

Full Patch

diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index d3b5dfa..671a7e3 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -1166,7 +1166,7 @@ static int uinput_create(struct btd_device *device, const char *name,
 {
 	struct uinput_dev dev;
 	int fd, err, i;
-	char src[18];
+	char dest[18], src[18];
 
 	fd = open("/dev/uinput", O_RDWR);
 	if (fd < 0) {
@@ -1224,7 +1224,9 @@ static int uinput_create(struct btd_device *device, const char *name,
 	ioctl(fd, UI_SET_EVBIT, EV_SYN);
 
 	ba2strlc(btd_adapter_get_address(device_get_adapter(device)), src);
+	ba2strlc(device_get_address(device), dest);
 	ioctl(fd, UI_SET_PHYS, src);
+	ioctl(fd, UI_SET_UNIQ, dest);
 
 	for (i = 0; key_map[i].name != NULL; i++)
 		ioctl(fd, UI_SET_KEYBIT, key_map[i].uinput);
diff --git a/src/uinput.h b/src/uinput.h
index 20e0941..589c225 100644
--- a/src/uinput.h
+++ b/src/uinput.h
@@ -686,6 +686,8 @@ extern "C" {
 #define UI_SET_FFBIT		_IOW(UINPUT_IOCTL_BASE, 107, int)
 #define UI_SET_PHYS		_IOW(UINPUT_IOCTL_BASE, 108, char*)
 #define UI_SET_SWBIT		_IOW(UINPUT_IOCTL_BASE, 109, int)
+#define UI_SET_PROPBIT		_IOW(UINPUT_IOCTL_BASE, 110, int)
+#define UI_SET_UNIQ		_IOW(UINPUT_IOCTL_BASE, 111, char*)
 
 #ifndef NBITS
 #define NBITS(x) ((((x) - 1) / (sizeof(long) * 8)) + 1)