bluez5: don't set unnecessary socket options

In media-sink, there's no need to set RCVBUF.

In media-source, we don't need to set NONBLOCK, as reads are done with
DONTWAIT. Don't set SNDBUF as it's not needed there. Don't set RCVBUF,
but use the (big) kernel default value: decode-buffer will handle any
overruns. Small values of RCVBUF might cause problems if kernel is
sending packets in a burst faster than we wake up.
This commit is contained in:
Pauli Virtanen 2023-03-05 17:45:31 +02:00 committed by Wim Taymans
parent 838fd6dce2
commit 04eb709619
2 changed files with 0 additions and 17 deletions

View file

@ -977,10 +977,6 @@ static int do_start(struct impl *this)
}
this->fd_buffer_size = val;
val = FILL_FRAMES * this->transport->read_mtu;
if (setsockopt(this->transport->fd, SOL_SOCKET, SO_RCVBUF, &val, sizeof(val)) < 0)
spa_log_warn(this->log, "%p: SO_RCVBUF %m", this);
val = 6;
if (setsockopt(this->transport->fd, SOL_SOCKET, SO_PRIORITY, &val, sizeof(val)) < 0)
spa_log_warn(this->log, "SO_PRIORITY failed: %m");