Commit Graph

27 Commits

Author SHA1 Message Date
andvar a5298dfcbd bta2dpd(8): s/conection/connection/ 2021-12-02 21:59:22 +00:00
rillig 8e69325a35 bta2dpd: fix lint build 2021-09-14 20:45:19 +00:00
nat b4f84d307a Intoduce "-n" switch.
Running btat2dpd with "-n" especially for use with pad(4) will stop bta2dpd
from exiting upon a read error from pad(4) devices.

This is to compenstate for the behaviour in NetBSD current that pad(4) will
no longer output 0's when its corresponding audio(4) device is not active.

I believe that this new pad(4) behaviour is not present in -9 and -8.

While here I've improved its function as a daemon and it should reconnect to
bluetooth speakers when they are disconnected/reconnected.

Reported and tested by reinoud@ and maya@
2021-03-07 13:09:43 +00:00
nat b35a6d5b1b Avoid running of the end of the array if a file cannot be opened.
Found by plunky@.
2020-05-31 06:17:23 +00:00
msaitoh 8012ca3f0e Remove extra semicolon. 2020-05-14 08:34:17 +00:00
nat 40dc704098 Fix off by one in sbc encoder. Test mode transmission and reception
works again.

XXX pullup -8 and -9.
2019-09-21 00:01:33 +00:00
maya 771183eb32 Consistent indentation / whitespace 2019-08-05 13:50:58 +00:00
maya 0189925033 KNF for loops 2019-08-05 13:49:10 +00:00
maya e203dacf10 Remove duplicate check for curpkt > 13
We already guarantee this above:
        if (numpkts < 1 || numpkts > 13) {
	                return -1;
2019-08-05 13:45:01 +00:00
maya 538e47f18a Avoid read overflows 2019-08-05 13:39:18 +00:00
maya 60afe3f8e7 Whitespace 2019-07-27 23:33:09 +00:00
nakayama aa464b6cac Add option -D to run in the background using daemon(3).
Also changed the message output to using syslog(3).
2019-07-27 20:10:29 +00:00
nat fddb9d3f18 Opps... Remove extra ')' 2019-03-31 11:44:11 +00:00
nat ef891695e9 Remove dead code from sbc decoder.
Found by Hans Petter Selasky.
2019-03-31 11:33:27 +00:00
kamil a9b2b066a2 Avoid potential undefined behavior in bta2dpd(8)
The operator >> causes implicit promotion to int.

There is need to cast the result back to uint8_t in order to save the
return value to a data undef a pointe of type uint8_t.

Requested by GCC when building with Undefined Behavior Sanitizer.
2018-07-25 19:03:50 +00:00
nat 71f2adc779 Use the correct tag options. 2018-05-15 04:25:25 +00:00
christos bf7113376a Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
2018-05-01 19:59:42 +00:00
nat ffcb8cef5c Set size of mtusize before calling getsockopt to obtain mtu size. 2018-01-13 10:20:45 +00:00
nat eeb06bda56 Connection state machine improvement upon transition from AVDTP_OPEN to
AVDTP_START/SUSPEND.
2017-08-27 10:39:18 +00:00
nat b38268fc93 Streaming channel is now opened in blocking mode again.
Removal of a hack in sbc_encode now that pad(4) is fixed.
2017-05-27 10:04:57 +00:00
nat 29b2495b54 RTP timestamp is now set correctly. The streaming socket is set to non
block blocking and connection state machinre improvement.
2017-02-12 08:25:31 +00:00
christos 834cf8f0c2 KNF. 2017-01-30 15:56:44 +00:00
christos 5b72d547e7 dedup. 2017-01-30 15:50:21 +00:00
jakllsch 140f4d60f8 Improve portability baseline of bta2dpd's cosdata-gen and sbc_crc-gen hostprogs.
XXX why are these being generated at build time?
2017-01-30 14:55:17 +00:00
wiz 3c1a929df9 Sort SYNOPSIS, descriptions, SEE ALSO.
Use more macros.
Fix sections.
New sentence, new line.
Various other improvements.
2017-01-28 23:52:45 +00:00
christos d36af5dd0c Fix the build (objdirs) 2017-01-28 23:19:20 +00:00
nat b6121f8d46 bta2dpd - Bluetooth Advand Audio Distribution (A2DP) Profile Daemon.
bta2dpd allows you to stream audio to and from bluetooth devices.
It features high quality stereo audio and is intended for use with pad(4)
device.

As discussed on current-users@ and tech-userlevel@
2017-01-28 16:55:54 +00:00