From owner-freebsd-ppc@FreeBSD.ORG Fri Sep 26 18:40:25 2008 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A648B1065692 for ; Fri, 26 Sep 2008 18:40:25 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id 795E98FC1A for ; Fri, 26 Sep 2008 18:40:25 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) id <0K7T00J0AFVCD800@smtpauth1.wiscmail.wisc.edu> for freebsd-ppc@freebsd.org; Fri, 26 Sep 2008 13:40:24 -0500 (CDT) Received: from trantor.tachypleus.net (adsl-76-204-100-161.dsl.mdsnwi.sbcglobal.net [76.204.100.161]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPSA id <0K7T006OMFVA0W90@smtpauth1.wiscmail.wisc.edu> for freebsd-ppc@freebsd.org; Fri, 26 Sep 2008 13:40:23 -0500 (CDT) Date: Fri, 26 Sep 2008 13:44:43 -0500 From: Nathan Whitehorn In-reply-to: To: Marco Trillo Message-id: <48DD2D9B.2070706@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.204.100.161 X-Spam-PmxInfo: Server=avs-9, Version=5.4.1.325704, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2008.9.26.182210, SenderIP=76.204.100.161 References: User-Agent: Thunderbird 2.0.0.16 (X11/20080814) Cc: freebsd-ppc@freebsd.org Subject: Re: Onboard audio support and DBDMA API extensions. X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2008 18:40:25 -0000 Marco Trillo wrote: > Hi, > > I'm working in a pcm(4) driver for the Apple onboard audio. The > current status is that audio output works on my machine using a > default volume, but volume changing is not supported yet. Great! > I also have preliminary support for the GPIO controls, which are used > mainly to select the output port (built-in speakers or headphones). > What I have yet to do is to support the mixer(4) interface (to support > changing the output volume), which needs support for the Keywest I2C > controller in order to talk to the codec. I have in fact ported a > Keywest I2C driver from NetBSD, but I don't use it much yet. I think we need to come up with a good way to handle the GPIO stuff and FCR setting. GPIO is also needed for PMU support (my current PMU driver has ugly hacks) and for SMU on G5 machines. Maybe some new interfaces to macio? This is complicated a little with SMU, though, as it isn't a macio child. > I would like to propose the following additions to the DBDMA API, > which I'm using in the driver: > > void dbdma_clear_cmd_status(dbdma_channel_t *, int slot); > Clears the cmdStatus of DBDMA command at slot 'slot'. Used for keeping > track of completed blocks. > > void dbdma_control(dbdma_channel_t *, uint8_t mask, uint8_t in); > General-purpose manipulation of the DBDMA channel control register. > Used for setting/clearing general-purpose control bits such as S0. Looks good to me. I'd suggest changing the name of dbdma_control() to dbdma_set_chan_status() to match dbdma_get_chan_status(), though. -Nathan