From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 26 09:09:09 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A15A837B401 for ; Thu, 26 Jun 2003 09:09:09 -0700 (PDT) Received: from puma.icir.org (puma.icir.org [192.150.187.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 340CD43F75 for ; Thu, 26 Jun 2003 09:09:09 -0700 (PDT) (envelope-from hodson@puma.icir.org) Received: from puma.icir.org (localhost [127.0.0.1]) by puma.icir.org (8.12.8p1/8.12.3) with ESMTP id h5QG95Rt058222; Thu, 26 Jun 2003 09:09:08 -0700 (PDT) (envelope-from hodson@puma.icir.org) Message-Id: <200306261609.h5QG95Rt058222@puma.icir.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.3 X-Exmh-Isig-CompType: comp X-Exmh-Isig-Folder: inbox From: Orion Hodson To: Oleg Sharoiko In-Reply-To: <20030625162142.W547@brain.cc.rsu.ru> Mime-Version: 1.0 Content-Type: text/plain Date: Thu, 26 Jun 2003 09:09:05 -0700 Sender: hodson@icir.org cc: hackers@freebsd.org Subject: Re: VIA8235 + AD1980 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 16:09:10 -0000 Oleg Well done on working out a working fix for this problem and apologies for not answering the email you sent earlier. It was one of several lost in the inbox overflow whilst the recipient was busy elsewhere. I'm also going to be offline until until July 7th and won't be able to provide any further input for a little while. There are some comments inline below that may help. - Orion Oleg Sharoiko writes: | | There is a small problem with this patch: AC97_MIXEXT_SURROUND has | seprate mute bits for right and left channels and I don't see how | can they be implemented in FreeBSD. The gain setting method would need to check for whether the register was the AC97_MIXEXT_SURROUND and have a specific piece of code to deal with this case. | I'd like to get to the roots of this problem and this is where I | need some help. If I understood everything correctly than it happens | so that the sound somehow goes to surround dac. The question that I | cannot answer: why it goes to surround dac? Unfortunately I don't | have via8235 spec. Myabe data are being put into wrong timeslots? The driver was written from the VT8233 spec under NDA. The driver sets the AC97 slots for the multichannel register set - these are set with the macros SLOT3 and SLOT4. There are no documented registers for assigning the regular stereo playback channels to different slots. The behaviour you are describing would be partially explained if channel spreading were enabled in the codec (2 channels spread to 6). This can be manually and automatically enabled (AD1980 rev 0 specs pages 25 and 27). Since the AD1980 is an ac97 2.3 codec and these codecs do jack sense detection, it's probably worth checking out the ac97 2.3 spec and writing some code to find out what the jack sense registers report as attached.