summaryrefslogtreecommitdiff
path: root/android/audio-msg.h
blob: 9a7f78bac69fd2c284bce2555033a17651442e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 *
 *  BlueZ - Bluetooth protocol stack for Linux
 *
 *  Copyright (C) 2014  Intel Corporation. All rights reserved.
 *
 *
 */

#define BLUEZ_AUDIO_MTU 1024

static const char BLUEZ_AUDIO_SK_PATH[] = "\0bluez_audio_socket";

#define AUDIO_SERVICE_ID		0
#define AUDIO_SERVICE_ID_MAX		AUDIO_SERVICE_ID

#define AUDIO_STATUS_SUCCESS		IPC_STATUS_SUCCESS
#define AUDIO_STATUS_FAILED		0x01

#define AUDIO_OP_STATUS			IPC_OP_STATUS

#define AUDIO_OP_OPEN			0x01
struct audio_preset {
	uint8_t len;
	uint8_t data[0];
} __attribute__((packed));

struct audio_cmd_open {
	uint8_t uuid[16];
	uint8_t codec;
	uint8_t presets;
	struct audio_preset preset[0];
} __attribute__((packed));

struct audio_rsp_open {
	uint8_t id;
} __attribute__((packed));

#define AUDIO_OP_CLOSE			0x02
struct audio_cmd_close {
	uint8_t id;
} __attribute__((packed));

#define AUDIO_OP_OPEN_STREAM		0x03
struct audio_cmd_open_stream {
	uint8_t id;
} __attribute__((packed));

struct audio_rsp_open_stream {
	uint16_t id;
	uint16_t mtu;
	struct audio_preset preset[0];
} __attribute__((packed));

#define AUDIO_OP_CLOSE_STREAM		0x04
struct audio_cmd_close_stream {
	uint8_t id;
} __attribute__((packed));

#define AUDIO_OP_RESUME_STREAM		0x05
struct audio_cmd_resume_stream {
	uint8_t id;
} __attribute__((packed));

#define AUDIO_OP_SUSPEND_STREAM		0x06
struct audio_cmd_suspend_stream {
	uint8_t id;
} __attribute__((packed));