Thread (15 messages) 15 messages, 3 authors, 2013-04-09

Re: [PATCH v4 2/6] Bluetooth: Add SCO socket voice_setting option

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2013-03-26 20:22:50

Hi Fred,
This patch extends the current SCO socket option to add a 'voice_setting'
member. This member is intended to choose data type at runtime.
Incoming connections will be setup during defered setup. Outgoing connections
have to be setup before connect(). The desired setting is stored in the sco
socket info.
This patch declares needed members, modifies getsockopt() and implements
setsockopt(). Setting the mtu is not supported.
Signed-off-by line.
quoted hunk ↗ jump to hunk
---
include/net/bluetooth/sco.h |    2 ++
net/bluetooth/sco.c         |   54 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+)
diff --git a/include/net/bluetooth/sco.h b/include/net/bluetooth/sco.h
index 1e35c43..41dbdfa 100644
--- a/include/net/bluetooth/sco.h
+++ b/include/net/bluetooth/sco.h
@@ -43,6 +43,7 @@ struct sockaddr_sco {
#define SCO_OPTIONS	0x01
struct sco_options {
	__u16 mtu;
+	__u16 voice_setting;
};
I find this parameter name a bit long. What about just "setting" or "settings" or "voice". I am open for suggestions.

Also should this be part of options or the socket address structure.

Another option would be to introduce a SCO_SETTINGS or SCO_VOICE socket option. With just this one parameter.

Since the default value of voice setting is not 0x0000, it might make actually more sense to introduce a new socket option. Playing the memset handling would only work nicely if the default would be 0x0000, but it isn't.

Regards

Marcel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help