From owner-freebsd-arm@freebsd.org Thu Oct 27 00:37:13 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 988AFC22540 for ; Thu, 27 Oct 2016 00:37:13 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-ua0-x233.google.com (mail-ua0-x233.google.com [IPv6:2607:f8b0:400c:c08::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51FFFCEA for ; Thu, 27 Oct 2016 00:37:13 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-ua0-x233.google.com with SMTP id 6so8642123uau.1 for ; Wed, 26 Oct 2016 17:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zOZxG27uFAyXW6kMACDdOGQFpig1ru+uMUfvLExXFxI=; b=OwpuRc5SPlM2tHmpiOql7Cul+yOVKCrpfS+z0q8mU1pyx2LN2a/jVxURBgMkHYuuGe XyzQKXIMT+4oTG75yW9MlE/IB1I/FPNYWm3di6xils+p4fVGN/r5UG8tMATv/AjvMnfv C7Fhd4LLupJLF4zPnvz8PKH3BXVB8uPhNTDxHZR9diuNxUUv+tCLppiBU02FXBpIArFk OXM1PNmz1NnzghrsplD31ryJZR3n2IszlFDHKOUMpZpARQm7T4EcED7NSBZEyDquM5Jz UkqUkWimflUbGqURjMpmEsF3cl1TihTrUXzyytMXHRQ6kQ4vrkGVJl41dGbigYmxrvXe ge9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zOZxG27uFAyXW6kMACDdOGQFpig1ru+uMUfvLExXFxI=; b=lsGcDFYWmUOhHou/XunYY9JMpsDILbD5A+IQX30Vor8qjU7Gf37wL4EtOa6z+Uf5rL g4UbsyL1HhZFF4DNARySLOusE5WvOiNNv+cmuxiojPXeJ/YMVb21ZjNBUoOr4/3z9kXD xWrJWpIqmD10ciwQ30KYDLtTcdMPxudbvNFk8GxuD09yLsAcHEKqnAdBhM7Ut+qza2d8 33Iwnaout4lOPPsbPiI4K1vebKOuedWrCzOqHHMV12idVYVqQG0E4GdwlXCDdxTlXwYy wRXVvoYhFS8DK+AMLUqL7eMIyD7mDhHLI4GuR0UMNrcmn04J6L8hMNQMzS0My186ZzWv ZzAw== X-Gm-Message-State: ABUngvczRH6jtVv88VX0+BoeVkk8k/Wa4YcsjIIJ0eTXTVG/cprw2CBRv/fla2yjckkX4aSIEVQmgMG6JBrBXw== X-Received: by 10.176.16.77 with SMTP id g13mr3589554uab.55.1477528632345; Wed, 26 Oct 2016 17:37:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.79.1 with HTTP; Wed, 26 Oct 2016 17:37:11 -0700 (PDT) In-Reply-To: References: <20161026091428.GA1468@Sebastian> From: Russell Haley Date: Wed, 26 Oct 2016 17:37:11 -0700 Message-ID: Subject: Re: BeagleBone Black - what still needs to be done for audio? To: Koz Ross Cc: freebsd-arm Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2016 00:37:13 -0000 On Wed, Oct 26, 2016 at 4:27 PM, Russell Haley wrote: > On Wed, Oct 26, 2016 at 9:28 AM, Russell Haley wrote: >> On Wed, Oct 26, 2016 at 2:14 AM, Koz Ross wrote: >>> I've been meaning to get into both ARM and BSD for a while, so I decided I >>> would begin with FreeBSD and a BeagleBone Black I have lying around. I read >>> this page: https://wiki.freebsd.org/FreeBSD/arm/BeagleBoneBlack , which >>> states >>> that audio on the BBB 'still needs to be done'. >>> >>> I was wondering what it means by 'still needs to be done', and what >>> precisely >>> needs to be done to have working BBB audio. As I am very new to both ARM and >>> BSD, could someone please fill me in? I would like to contribute if I can. >> >> >> That page is a little out of date, but I don't have a recent image for >> my BBB. Have you tried running the latest image? If I remember >> correctly: >> >> https://www.freebsd.org/where.html -> download the sd card image. >> >> xzcat /FreeBSD-11.0-RELEASE-arm-armv6-BEAGLEBONE.img.xz >> | dd of=/dev/da bs=1m (or is it bs=1M?) >> >> The FreeBSD handbook is the place to start at. It will give you >> directions on how to get your image set up: >> >> https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ >> >> Once you're able to setup and test HDMI and have a running image, >> you'll be in a better position to start looking at audio issues. >> >> Do you know anything about the BBB hardware? You'll need to find out >> what the audio interface is and if the FreeBSD kernel supports it. >> Then you need to find out if it's in the default kernel, if not, >> you'll need to learn to build the kernel yourself (or build the module >> and install and load it). > > I'm bored of Javascript at work... This looks like a good lead for you: > > https://www.element14.com/community/community/designcenter/single-board-computers/next-gen_beaglebone/blog/2013/05/28/bbb--audio-notes Last post, I promise (with fingers crossed) and then I'll go home. Talking to a hardware engineer, his general outline was this: - I2S is a specific driver to output audio. It will typically be fed into a hardware codec chip. That jives with the previous link I sent. "The nice thing about the latter is what it derives the audio from; a hardware I2S interface inside the AM3359, which sends data out to an NXP TDA19988 for conversion to HDMI." - The codec chip will need to be supported by the OS and is typically set up using an I2C (Not I2S!)bus to set various configurations: mono/stero/multichannel, data rates, output frequencies and the like. So: - What is the state of I2S for Arm on FreeBSD (specifically for the TI AM3358)? I don't know. - What is the state of the support for NXP TDA19988? Well it seems to do video but not audio. BBB Hardware schematic: https://github.com/CircuitCo/BeagleBone-Black/blob/master/BBB_SCH.pdf?raw=true -->See Page 10 of 11 for the schematics. http://datasheet.octopart.com/TDA19988BHN-C1%2C551-NXP-Semiconductors-datasheet-67049582.pdf --> General datasheet with a nice simple picture of the inputs and outputs. >From those two diagrams one could surmize that pins AP0, AP1 and ACLK are input from the I2S bus. Finally, here is the driver set for the TI chips: https://svnweb.freebsd.org/base/head/sys/arm/ti/am335x/ I saw some HDMI stuff in am335x_lcd.c but didn't get any further than that. Good Luck! Russ