From owner-freebsd-bluetooth@FreeBSD.ORG Sun Jun 9 06:55:14 2013 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DB7456A for ; Sun, 9 Jun 2013 06:55:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qa0-x22a.google.com (mail-qa0-x22a.google.com [IPv6:2607:f8b0:400d:c00::22a]) by mx1.freebsd.org (Postfix) with ESMTP id 9F8921AF2 for ; Sun, 9 Jun 2013 06:55:14 +0000 (UTC) Received: by mail-qa0-f42.google.com with SMTP id hu16so1789200qab.1 for ; Sat, 08 Jun 2013 23:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=J7NaZYuk7+zFISCRUE3fJ3+0e1mwBI9+QadYV8yMb1I=; b=SowMPTvgw8cEl3bTymaZZ+oSUwfG25xeOFc/LtgMgj431iY7bOvZeDIge6hA1uEVhH d3fRdVGaRyMC7KppwVQwq+9W5EuNFbnTzN0LySDsyPiquLxZMw/+6mSlFwQMRCvxTrfR 0en3caOhuI1gagqn2L4LuWb5+lv271jYcqdUtWg8y+JIA/68MAtvJw5DVS57nNwN0QnO DeQXiavMqn7jIS4g9Z2wxxpnfpBzmU3yJjIx9RM9NXR+ptb0n3ThjO3SeuG4CHcWPlsr cVGlH6onfOCZ5ssmesgDWDxB3+WMQHebtEWnrQSRRA6j7gfi/yu9W8ODrlMOLTMSCDA1 s1mA== MIME-Version: 1.0 X-Received: by 10.49.109.72 with SMTP id hq8mr4462030qeb.38.1370760914160; Sat, 08 Jun 2013 23:55:14 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.5.65 with HTTP; Sat, 8 Jun 2013 23:55:13 -0700 (PDT) In-Reply-To: References: Date: Sat, 8 Jun 2013 23:55:13 -0700 X-Google-Sender-Auth: 8C4jM__2kdSxdaP0-DHQMh3aP48 Message-ID: Subject: Re: What's it going to take to get basic A2DP support into -HEAD? From: Adrian Chadd To: Iain Hibbert Content-Type: text/plain; charset=ISO-8859-1 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:55:14 -0000 On 8 June 2013 23:48, Iain Hibbert wrote: > 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.. Yeah, I see that. And lots of the codec types are optional, right? >> 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 :) It's not a bad idea to begin with. I just have no idea where to begin there. I'll keep on reading, see if I can muster the energy to write some bluetooth socket code. Thanks, Adrian