From owner-freebsd-arm@freebsd.org Thu Oct 27 01:12:00 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 7DC61C22D63 for ; Thu, 27 Oct 2016 01:12:00 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) (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 4C682C50 for ; Thu, 27 Oct 2016 01:12:00 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-pf0-x229.google.com with SMTP id 197so6312633pfu.0 for ; Wed, 26 Oct 2016 18:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:content-transfer-encoding:message-id:date:subject:from :in-reply-to:references:to:cc; bh=3DDplBl8F4rTvhforUBff/f7V0omv47XNIk20dBHMsY=; b=RpG37opRzSMonVTbzj6GqfCoxlfEH/iIitJ0k+86mEwMAb34rzkPaaZERpXu7UvuW0 8sakQ1WPIzUc8hNbAiKYFq6mLWN2KXMsphECNpZRa4D//FE/KdmzX647a55PRkVR8edQ WH3+IcxK4QHU+kxHh+FS6VeUYzyFMrnzRjCDLF4ATAHWXi0zUtGEXa0uuc6r92E7riKG ZmPtQccJp9yYw7A/4sbzDieVGp2fCinUnpHc+12GD0V2NYdvLOikRPBJSQ1fIRHw7Ymk 2NfHYlM4n2ozYkgtUqpIofQwVwq8CqSOFiwgVpTS8oKfi3Q+rpHwGW4vb6/jXkl4j/F2 etDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:content-transfer-encoding :message-id:date:subject:from:in-reply-to:references:to:cc; bh=3DDplBl8F4rTvhforUBff/f7V0omv47XNIk20dBHMsY=; b=emY6Q5Nm/g2F3EUaD9jEFwE3WavCpwu1berDFktnICwvPCpSdE5j7Irjph+Yzto668 O1TYNNAfgjnDuWd2cY36H3YrkBCpzZ7bQHNLowmnN5Lpslv2AMe6ZxRaBCYAQc45+iNu AhAgiFRR43KWSSBuq8ilj2dgKrSqYEKt3B9qze2UAR/HS1inIkjAHdt08jRsEpi4OJF+ YhlEXKJwRRsWpQoL+Z8vLnY8ahnC+/s73dmdo33r6lCJm2FHPmKL7SpzFAv8tGCpqb8u B3tVg/Q1Gj4QxwqenCKRJRhF7QrYPuU5V9Gm4aoSWrTQ1fzzuh0+p19pjPYH3v9N2RbX s9dw== X-Gm-Message-State: ABUngvcKVvK9LjN9lya7H7h3BbDuStYoIdxB0hMbhHvjX1OEu6/9ulj89f+TK7XU3Qh8Bg== X-Received: by 10.98.16.203 with SMTP id 72mr9179939pfq.57.1477530719731; Wed, 26 Oct 2016 18:11:59 -0700 (PDT) Received: from [127.0.0.1] ([184.151.231.171]) by smtp.gmail.com with ESMTPSA id wc6sm6737882pab.47.2016.10.26.18.11.58 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Oct 2016 18:11:58 -0700 (PDT) Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: BlackBerry Email (10.3.2.2876) Message-ID: <20161027011158.5492818.63815.14341@gmail.com> Date: Wed, 26 Oct 2016 18:11:58 -0700 Subject: Re: BeagleBone Black - what still needs to be done for audio? From: Russell Haley In-Reply-To: References: <20161026091428.GA1468@Sebastian> To: Koz Ross Cc: freebsd-arm 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 01:12:00 -0000 Argh, I forgot all the links to sound. Look up sound in the man pages! Russ Sent=A0from=A0my=A0BlackBerry=A010=A0smartphone=A0on=A0the=A0Virgin=A0Mobil= e=A0network. =A0 Original Message =A0 From: Russell Haley Sent: Wednesday, October 26, 2016 5:37 PM To: Koz Ross Cc: freebsd-arm Subject: Re: BeagleBone Black - what still needs to be done for audio? On Wed, Oct 26, 2016 at 4:27 PM, Russell Haley wrote: > On Wed, Oct 26, 2016 at 9:28 AM, Russell Haley wro= te: >> On Wed, Oct 26, 2016 at 2:14 AM, Koz Ross wr= ote: >>> I've been meaning to get into both ARM and BSD for a while, so I decide= d 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 AR= M and >>> BSD, could someone please fill me in? I would like to contribute if I c= an. >> >> >> 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=3D/dev/da bs=3D1m (or is it bs=3D1M?) >> >> 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-c= omputers/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= =3Dtrue -->See Page 10 of 11 for the schematics. http://datasheet.octopart.com/TDA19988BHN-C1%2C551-NXP-Semiconductors-datas= heet-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