Commit Graph

13 Commits

Author SHA1 Message Date
Emil Gydesen 676a91636b Bluetooth: Audio: VOCS add error checks on read
The error check was removed earlier as it was assumed that
we would either get an error, or the data would be valid.
However, without an error check, we are not guarded
against bad reads.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-04-27 13:31:06 -04:00
Emil Gydesen 449ceca2fe Bluetooth: Audio: Remove VOCS desc data check as it can be empty
If the output description of the server is empty (legal by the
spec), then we should not return an error to the application
when read. Also added some debug statements when the value is
truncated.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-04-27 13:31:06 -04:00
Emil Gydesen d005a62451 Bluetooth: Audio: Fix issues with setting VOCS offset state
Fixes 2 issues:
1) The write callback always returned an error
2) The auto-read of the offset state did not, unlike what the
comment suggested, retry only once and fail on the second attempt,
but rather keep retrying.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-04-27 13:31:06 -04:00
Emil Gydesen 910e0c63f4 Bluetooth: Audio: VOCS: Move callback structure to register function
Moves the callback structure for VOCS to the register function
which is renamed from init, as there's no reason to register
the callbacks separately.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-04-26 13:42:50 +02:00
Emil Gydesen 2016509756 Bluetooth: Audio: Audio Input Control Service and client
This commit implements the secondary service
Audio Input Control Service (AICS) server and client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-04-12 11:47:00 -04:00
Emil Gydesen 8750b7c6f7 Bluetooth: audio: Changed VOCS to use ENOTSUP instead of EOPNOTSUPP
Changed to use ENOTSUP to be more consistent with the rest of the
bluetooth subsystem.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-03-26 15:32:43 -04:00
Joakim Andersson a9b4cae019 Bluetooth: audio: Fix compilation issue with BT_AUDIO
Fix bluetooth audio compilation issue when BT_AUDIO is enabled but
no Bluetooth host services has been enabled.
This leads to an empty library file.
Instead of creating a new library for audio add the sources to the
parent library, similar to how bluetooth services are added.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-03-23 20:58:35 -05:00
Emil Gydesen e1b840c4ab Bluetooth: Audio: VOCS add explicit ignore of notify return
Add casting to (void) to explicitely ignore the return value
of the notifi function calls.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-03-23 17:50:06 -04:00
Emil Gydesen 30edb5e52e Bluetooth: Audio: VOCS add missing check for offset in writes
VOCS does not support the write long procedure, and thus
should not accept any offset in write requests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-03-23 17:50:06 -04:00
Emil Gydesen 04232fe1ef Bluetooth: Audio: Append bt_ for everything defined in vocs_internal
Was requested in the review for
ed2162c700 but was merged before it
could be fixed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-03-23 17:50:06 -04:00
Emil Gydesen ed2162c700 Bluetooth: Audio: Volume Offset Control Service and Client
This commit implements the secondary service
Volume Offset Control Service (VOCS) server and client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-03-22 13:05:56 -04:00
Emil Gydesen a264efbcbc Bluetooth: host: Initial support for BIS
Added initial support for BIS (broadcast ISO stream), which
adds support for creating BISes as both broadcaster and receiver,
as well as managing and creating BIGs.

Extends PA sync to handle BIGInfo adveritising reports.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-03-09 08:06:02 -05:00
Emil Gydesen 86f22aa526 Bluetooth: Audio: Move BT audio to new directory
It was decided that the Bluetooth audio subsystem should
be in subsys/bluetooth/audio instead of subsys/bluetooth/host/audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-02-16 08:55:17 -05:00