From owner-freebsd-multimedia@FreeBSD.ORG Mon Jun 12 18:28:30 2006 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 503CE16A46F for ; Mon, 12 Jun 2006 18:28:30 +0000 (UTC) (envelope-from shoesoft@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 3977B43D5D for ; Mon, 12 Jun 2006 18:28:27 +0000 (GMT) (envelope-from shoesoft@gmx.net) Received: (qmail invoked by alias); 12 Jun 2006 18:28:25 -0000 Received: from h081217095067.dyn.cm.kabsi.at (EHLO h081217095067.dyn.cm.kabsi.at) [81.217.95.67] by mail.gmx.net (mp036) with SMTP; 12 Jun 2006 20:28:25 +0200 X-Authenticated: #16703784 From: Stefan Ehmann Date: Mon, 12 Jun 2006 20:28:27 +0200 User-Agent: KMail/1.9.3 MIME-Version: 1.0 Content-Disposition: inline To: freebsd-multimedia@freebsd.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200606122028.27988.shoesoft@gmx.net> X-Y-GMX-Trusted: 0 Subject: basic support for M-Audio Audiophile 2496 available X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2006 18:28:30 -0000 This is a follow up to the "Status of VIA Envy24 audio controller support in FreeBSD" from May. This is a modification of the driver written by Katsurajima Naoto. Fixes for compilation on recent FreeBSD versions were provided by Konstantin Dimitrov. For the card specific changes, credits also go to him. pciconf -lv output: pcm0@pci0:13:0: class=0x040100 card=0xd6341412 chip=0x17121412 rev=0x02 hdr=0x00 vendor = 'VIA Technologies Inc (Was: IC Ensemble Inc)' device = 'ICE1712 Envy24 Multichannel Audio Controller' class = multimedia subclass = audio The necessary card specific changes are quite small: --- envy24.c.orig Sun Jun 11 14:01:24 2006 +++ envy24.c Sun Jun 11 13:08:43 2006 @@ -805,12 +805,7 @@ gpiodir |= ENVY24_GPIO_AK4524_CDTI | ENVY24_GPIO_AK4524_CCLK | ENVY24_GPIO_AK4524_CS0 | ENVY24_GPIO_AK4524_CS1; envy24_gpiosetdir(ptr->parent, gpiodir); */ - envy24_gpiosetmask(ptr->parent, ENVY24_GPIO_CS8414_STATUS); - envy24_gpiosetdir(ptr->parent, ~ENVY24_GPIO_CS8414_STATUS); - if (ptr->num == 0) - ptr->cs = ENVY24_GPIO_AK4524_CS0; - else - ptr->cs = ENVY24_GPIO_AK4524_CS1; + ptr->cs = ENVY24_GPIO_AK4524_CS0; ptr->cclk = ENVY24_GPIO_AK4524_CCLK; ptr->cdti = ENVY24_GPIO_AK4524_CDTI; ak452x_settype(ptr->info, AK452X_TYPE_4524); --- envy24.h.orig Sun Jun 11 14:01:30 2006 +++ envy24.h Sun Jun 11 13:59:02 2006 @@ -465,9 +465,9 @@ #define ENVY24_GPIO_CS8414_STATUS 0x02 #define ENVY24_GPIO_CS84X4_CLK 0x04 #define ENVY24_GPIO_CS84X4_DATA 0x08 -#define ENVY24_GPIO_AK4524_CDTI 0x10 /* this value is duplicated to input select */ -#define ENVY24_GPIO_AK4524_CCLK 0x20 -#define ENVY24_GPIO_AK4524_CS0 0x40 +#define ENVY24_GPIO_AK4524_CDTI 0x08 /* this value is duplicated to input select */ +#define ENVY24_GPIO_AK4524_CCLK 0x02 +#define ENVY24_GPIO_AK4524_CS0 0x20 #define ENVY24_GPIO_AK4524_CS1 0x80 /* M-Audio Delta series S/PDIF(CS84[01]4) control pin values */ Note that this patch breaks support for other cards -- it's mainly a proof-of-concept that the driver works. The main difference between the Dio card is that there is only one AKM452x codec (apart from pin definitions). Seems to work quite good so far for me. I like it much better than the driver from opensound.com (which has troubles with some applications). At the moment, there are some features missing compared to the opensound.com driver though. If someone wants to test this: Be sure to execute mixer pcm 100 first, because the default value of 75 is very quiet. mixer vol doesn't have any effect.