From owner-freebsd-multimedia@FreeBSD.ORG Tue Jun 13 10:52:58 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 F195916A585 for ; Tue, 13 Jun 2006 10:52:57 +0000 (UTC) (envelope-from kosio.dimitrov@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id E082543D6B for ; Tue, 13 Jun 2006 10:52:44 +0000 (GMT) (envelope-from kosio.dimitrov@gmail.com) Received: by wx-out-0102.google.com with SMTP id i31so1045442wxd for ; Tue, 13 Jun 2006 03:52:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=enuQe3mY2jb8XiPyZxOp9GPHlqy7fu7sqTKA6Zj8v25SdcdDMtthq8ZE4lmk+alaSVoI+Li00qXnZ+lf7n77r4N9gUQao4l6lPyUiqskpJAGrbeiQUuH6ncloAQis0JjFGrh0b8LKn/Hac7ujE1viqy8LpU0tHHBJ8XA/yrj4rE= Received: by 10.70.12.19 with SMTP id 19mr344563wxl; Tue, 13 Jun 2006 03:52:44 -0700 (PDT) Received: by 10.70.54.9 with HTTP; Tue, 13 Jun 2006 03:52:44 -0700 (PDT) Message-ID: <8103ad500606130352j36434440w95470394bacb459d@mail.gmail.com> Date: Tue, 13 Jun 2006 13:52:44 +0300 From: "Konstantin Dimitrov" To: "Nikolas Britton" In-Reply-To: MIME-Version: 1.0 References: <200606072039.13422.shoesoft@gmx.net> <8103ad500606071552k77985b54o3378d9351e4bdcf8@mail.gmail.com> <200606081614.43375.shoesoft@gmx.net> <8103ad500606081031s40ac1afcnfc78bd6734e43fdc@mail.gmail.com> <8103ad500606121534h2a9480aem8be58220c2e04996@mail.gmail.com> <8103ad500606130247w63cce8e7j9ab9cb4428228811@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-multimedia@freebsd.org, Alexander@leidinger.net Subject: Re: Status of VIA Envy24 audio controller 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: Tue, 13 Jun 2006 10:52:58 -0000 diffs to get old Katsurajima code running under FreeBSD 6.1 are here: http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-May/004223.html Stefan, sent the initial diff ("mixer vol ..." is not working) for "Audiophile 2496" yesterday to freebsd-multimedia@ : http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-June/004307.html to fix "mixer vol ..." two additional changes are required (only 2 lines of code): 1) as i said before, there is obvious bug, that affects all Envy24-based cards, so no matter what card you have in ak452x.c "codec->type = dvc;" should be changed to "codec->dvc = dvc;" 2) in envy24.c correct codec type should be set, for "Audiophile 2496" change "ak452x_settype(ptr->info, AK452X_TYPE_4524);" to "ak452x_settype(ptr->info, AK452X_TYPE_4528);" On 6/13/06, Nikolas Britton wrote: > > On 6/13/06, Konstantin Dimitrov wrote: > > i found obvious bug, that affects all cards: "codec->type = dvc;" ( > ak452x.c) > > obviously should be "codec->dvc = dvc;", this cause the previously > mentioned > > volume problem with "M-Audio Audiophile 2496", so original "ak452x_set" > > routine is ok, after fixing "codec->type = dvc;" to "codec->dvc = > dvc;", we > > have working "mixer vol ..." with both "Terratec DMX 6fire" and "M-Audio > > Audiophile 2496", of cource correct codec type should be set in envy24.c: > > "ak452x_settype(ptr->info, AK452X_TYPE_4528);" for "M-Audio Audiophile > 2496" > > "ak452x_settype(ptr->info, AK452X_TYPE_4524);" for "Terratec DMX 6fire" > > > > after fixing the bug described above, both cards working now only with > > touching hardware specific parts of the Katsurajima Naoto's code - to be > > more specific - 3 lines to set right wiring in envy24.h (codec CS, CDTI, > > CCLK) and 1 line to set right codec in envy24.c, so Katsurajima Naoto's > code > > is pretty generic and so it can be used as a base for Envy24 driver > > supporting many Envy24-based audio cards under FreeBSD. > > > > > > On 6/13/06, Konstantin Dimitrov < kosio.dimitrov@gmail.com> wrote: > > > > > > thanks to cooperation with Stefan Ehmann (shoesoft at gmx.net), there > is a > > patch adding basic "M-Audio Audiophile 2496" support, he sent the > initial > > patch to freebsd-multimedia@ titled "basic support for M-Audio > Audiophile > > 2496 available", now the "volume" problem with "M-Audio Audiophile 2496" > is > > fixed using slightly changed "ak452x_set" ( ak452x.c) routine: > > > > > > void > > > ak452x_set(struct ak452x_info *codec, int dir, unsigned int left, > unsigned > > int right) > > > { > > > > > > #if(0) > > > device_printf(codec->dev, "ak452x_set(codec, %d, %d, %d)\n", dir, > > left, right); > > > > > > #endif > > > snd_mtxlock(codec->lock); > > > > > > if (left >= 100) > > > left = 127; > > > else > > > left = left * 127 / 100; > > > if (right >= 100) > > > right = 127; > > > else > > > right = right * 127 / 100; > > > > > > if (dir == PCMDIR_PLAY) { > > > > > > #if(0) > > > device_printf(codec->dev, "ak452x_set(): AK4528(PLAY) > %d/%d\n", > > left, right); > > > #endif > > > > > > ak452x_wrcd(codec, AK4528_LOATT, left); > > > ak452x_wrcd(codec, AK4528_ROATT, right); > > > } > > > > > > snd_mtxunlock(codec->lock); > > > } > > > > > > Cool!, I just order a Audiophile 2496, it should be in my hands by > then end of the week for testing. Is it possible to get a diff of all > the new code?: > > Patch set of the changes you made to get Katsurajima old code running > again on 6.1-STABLE. Plus a patch set of the changes you and Stefan > made to get audiophile 2496 running? > > > -- > BSD Podcasts @: > http://bsdtalk.blogspot.com/ > http://freebsdforall.blogspot.com/ >