Commit Graph

18 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
a4bde19d3b client: Move common print_* functions to its own file
This move common print_* functions to its own file so they can be
properly reused instead of duplicating the code.
2022-12-02 11:20:26 -08:00
Luiz Augusto von Dentz
7642669e44 client/player: Add support for custom preset
This adds support for a custom preset which asks the user to enter its
configuration:

[bluetooth]# endpoint.presets 00002bc9-0000-1000-8000-00805f9b34fb custom
[Codec] Enter frequency (Khz): 48
[Codec] Enter frame duration (ms): 10
[Codec] Enter channel allocation: 0x000000003
[Codec] Enter frame length: 100
[QoS] Enter Target Latency (Low, Balance, High): Low
[QoS] Enter SDU Interval (us): 10000
[QoS] Enter Framing (Unframed, Framed): Unframed
[QoS] Enter PHY (1M, 2M): 2M
[QoS] Enter Max SDU: 200
[QoS] Enter RTN: 3
[QoS] Enter Max Transport Latency (ms): 20
[QoS] Enter Presentation Delay (us): 10000
2022-12-02 11:19:53 -08:00
Luiz Augusto von Dentz
5a872af406 client/player: Fix scan-build warning
This fixes the following warning:

client/player.c:1775:25: warning: Dereference of null pointer
[core.NullDereference]
iov_append(&cfg->caps, preset->data.iov_base, preset->data.iov_len);
                        ^~~~~~~~~~~~~~~~~~~~~
2022-11-21 13:03:04 -08:00
Luiz Augusto von Dentz
25a31f5a93 client/player: Fix attempting to acquire already acquired transport
If the transport has links check if the link is acquiring before
attempting to call Acquire otherwise it may cause an error to be
printed.
2022-09-29 13:58:41 -07:00
Christian Eggers
7b07f1f980 client/player: fix printf format string
Use macros from inttypes.h for correct printf format specifier for
int64_t
2022-09-26 10:57:00 -07:00
Luiz Augusto von Dentz
d8febc76a4 client/player: Fix checkpatch warning
This fixes the following checkpatch warning:

WARNING:LINE_SPACING: Missing a blank line after declarations
216: FILE: client/player.c:625:
+               GDBusProxy *proxy = l->data;
+               print_player(proxy, NULL);
2022-08-30 14:24:08 -07:00
Luiz Augusto von Dentz
d297a5873d client: Add -e/--endpoint option to auto register endpoints
This adds -e/--endpoint option that can be used to auto register
supported endpoints.
2022-08-29 14:36:06 -07:00
Luiz Augusto von Dentz
9e298f8402 client/player: Use QoS interval on transport.send
This makes use of QoS interval when sending a file.
2022-08-29 12:43:05 -07:00
Luiz Augusto von Dentz
dc61ec4419 client/player: Add support for PACS endpoints
This adds support for PAC_SINK and PAC_SOURCE endpoints as well as LC3
presets.
2022-08-29 12:43:05 -07:00
Luiz Augusto von Dentz
6270ad35b2 client: Fix build warning
This fixes the following build warning:

      warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead
      [-Wdeprecated-declarations]
2022-07-05 10:31:39 -07:00
Luiz Augusto von Dentz
33c96ca658 client/player: Fixes errors found by scan-build
This fixes the following errors:

client/player.c:1406:44: warning: Dereference of null pointer
[core.NullDereference]
        reply = endpoint_select_config_reply(msg, p->data.iov_base,
                                                  ^~~~~~~~~~~~~~~~
client/player.c:1866:2: warning: 3rd function call argument is an
uninitialized value [core.CallAndMessage]
        iov_append(&cfg->caps, data, len);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-06-22 11:09:04 -07:00
Luiz Augusto von Dentz
e4fd2dc5aa client/player: Enable acquiring multiple transports
This enables acquiring multiple transports simultaneously.
2022-06-22 11:00:55 -07:00
Luiz Augusto von Dentz
7a87497da4 client/player: Add transport.receive command
This adds transport.receive command:

Get/Set file to receive
Usage:
	 receive [filename]
2022-04-26 11:03:26 -07:00
Luiz Augusto von Dentz
dd5b66695c client/player: Add transport.volume command
This adds transport.volume command:

Get/Set transport volume
Usage:
	 volume <transport> [value]
2022-04-22 16:01:29 -07:00
Luiz Augusto von Dentz
b2db8f0e3a client/player: Fix use of unsupported config_qos
QoS is not yet supported by bluetoothd so remove them.
2022-04-18 16:57:49 -07:00
Luiz Augusto von Dentz
777bc7c3f5 client/player: Add transport menu
This adds transport menu:

[bluetooth]# menu transport
Menu transport:
Available commands:
-------------------
list                                              List available transports
show <transport>                                  Transport information
acquire <transport>                               Acquire Transport
release <transport>                               Release Transport
send <filename>                                   Send contents of a file
2022-04-14 17:05:25 -07:00
Luiz Augusto von Dentz
46f171a86c client/player: Add endpoint menu
This adds endpoint menu:

[bluetooth]# menu endpoint
Menu endpoint:
Available commands:
-------------------
list [local]                                      List available endpoints
show <endpoint>                                   Endpoint information
register <UUID> <codec> [capabilities...]         Register Endpoint
unregister <UUID/object>                          Register Endpoint
config <endpoint> <local endpoint> [preset]       Configure Endpoint
presets <UUID> [default]                          List available presets
2022-04-14 17:05:24 -07:00
Luiz Augusto von Dentz
d204e84c06 client: Add support for player submenu
This moves adds the functionality of bluetooth-player into
bluetoothctl.
2022-03-30 12:54:29 -07:00