From owner-freebsd-sparc64@FreeBSD.ORG Fri Jul 2 02:22:49 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (unknown [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAB4E16A4CF for ; Fri, 2 Jul 2004 02:22:49 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C17F43D41 for ; Fri, 2 Jul 2004 02:22:46 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from samsco.org (p58.n-nypop02.stsn.com [199.106.89.58]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i622Ob83076913; Thu, 1 Jul 2004 20:24:38 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <40E4C659.3000005@samsco.org> Date: Thu, 01 Jul 2004 20:20:09 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040304 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Marius Strobl References: <20040701093225.GA12517@kt-is.co.kr> <20040701130940.A12214@newtrinity.zeist.de> In-Reply-To: <20040701130940.A12214@newtrinity.zeist.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: sparc64@freebsd.org Subject: Re: pcm sound driver for SBus Ultra1/Ultra2 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2004 02:22:49 -0000 Marius Strobl wrote: > On Thu, Jul 01, 2004 at 06:32:25PM +0900, Pyun YongHyeon wrote: > >>Hello All, >> >>I don't know how may users want to hear sound on Ultra1/Ultra2. >>But I wanted to hear some music while 'build world' is in progress. >> >> >> 1. The driver is based on OpenBSD's driver and ISA mss driver >> on FreeBSD. >> 2. Supports onboard CS4231A chip on SBus Ultra1/Ultra2. >> 3. Capture(recodring) was not tested at all. >> - I don't have microphone. >> 4. Due to lack of programming information for APC DMA, I >> used existing interfaces of OpenBSD driver. So it may have >> some bugs on FreeBSD. >> 5. Full-duplex mode doesn't work. >> 6. You may notice some noise when you work on ofw console. I don't >> know what is the reason, atm. >> 7. Due to lack of X supports, I could't test with xmms or GUI based >> audio tools. >> 8. If you have PCI/EBus based sparcs, they are not supported. Yes, they >> use the same chip but have different DMA interface. In addition, I >> don't have PCI/EBus based sparcs. >> >>Installation >> 1. get the driver patch file and fetch your system >> 2. build kernel and kernel modules >> 3. load snd_cs4231.ko and play >> Note, you may want to mute speaker output with mixer(8). >> >>The attached patch is for -CURRENT, and is also available at: >> http://www.kr.freebsd.org/~yongari/cs4231.freebsd.diff >> > > > Interesting that adding a driver is sufficient for you. Last time I > had a look at getting pcm(4) and SUNW,CS4231 working on FreeBSD/sparc64 > I stumbled on pcm(4) not being endian-clean and not yet being fully > converted to using busdma. At a quick glance that's still the case. > Did you miss to add some changed files in your patch? > When using the sbus attachment, does it really matter if register accesses are endian clean? The sbus registers are going to expect big-endian accesses from the cpu, yes? It would probably be better to explicitly wrap the register accesses with endian conversions, but it shouldn't be a barrier in this particular case. However, registers that are done via DMA transfers might need some special care. I don't think that there are many sound cards that operate this way, but it's something to think about. The lack of busdma in pcm is troubling and should be looked at. Scott