From owner-freebsd-bluetooth@FreeBSD.ORG Sun Jun 9 06:48:49 2013 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D393EE90; Sun, 9 Jun 2013 06:48:49 +0000 (UTC) (envelope-from plunky@ogmig.net) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx1.freebsd.org (Postfix) with ESMTP id 923741ACB; Sun, 9 Jun 2013 06:48:49 +0000 (UTC) Received: from mfilter3-d.gandi.net (mfilter3-d.gandi.net [217.70.178.133]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 77A30172074; Sun, 9 Jun 2013 08:48:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter3-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter3-d.gandi.net (mfilter3-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id JdPfiiPQ611L; Sun, 9 Jun 2013 08:48:30 +0200 (CEST) X-Originating-IP: 31.68.199.240 Received: from galant.ogmig.net (unknown [31.68.199.240]) (Authenticated sender: plunky@ogmig.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 85CE2172067; Sun, 9 Jun 2013 08:48:29 +0200 (CEST) Received: by galant.ogmig.net (Postfix, from userid 1000) id 402232600B0; Sun, 9 Jun 2013 07:48:24 +0100 (BST) Date: Sun, 9 Jun 2013 07:48:24 +0100 (BST) From: Iain Hibbert To: Adrian Chadd Subject: Re: What's it going to take to get basic A2DP support into -HEAD? In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (NEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-bluetooth@freebsd.org X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2013 06:48:49 -0000 On Sat, 8 Jun 2013, Adrian Chadd wrote: > So, given that these headphones pair, what would it take to write up a > basic A2DP profile with the minimum-supported codec, and then route > audio to it? it is probably a couple of weeks work; the specification document is not that thick.. > Would it be something done in-kernel? Or would we just expose the > audio to userland and do the (re) encoding there? imo this is likely the best approach NetBSD has a simple "pseudo audio device" driver[1], which is like a pty but for audio devices.. I would use that (or something like, since I don't know how similar the FreeBSD kernel audio interface is to the NetBSD one) and provide a userland program to just route the audio back into a RFCOMM socket after conversion. > What about supporting data sources that will happily supply a > supported bitrate/encoding type? (eg, if a player wants to spit out > MPEG encoded audio; why decode and re-encode it?) your Bluetooth interface can be whatever you need, and you can transcode or feed whatever the kernel will accept (PCM in the case of pad(4) on NetBSD) > I'm happy to hack on code. I just don't know anything about the > bluetooth stack here. :-) just deal with an RFCOMM socket, is my advice.. (in part, because I am a NetBSD developer.. and our Bluetooth stack is somewhat different, but the socket interface is compatible :) iain [1] http://netbsd.gw.com/cgi-bin/man-cgi?pad++NetBSD-current [2] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pad/