From owner-freebsd-sparc64@FreeBSD.ORG Thu Aug 26 06:25:55 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F252116A4CE for ; Thu, 26 Aug 2004 06:25:54 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2802543D64 for ; Thu, 26 Aug 2004 06:25:54 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id i7Q6M8Ah090018 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 26 Aug 2004 15:22:08 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id i7Q6PNcD012446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 26 Aug 2004 15:25:23 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.12.10/8.12.10/Submit) id i7Q6PNlA012445 for sparc64@freebsd.org; Thu, 26 Aug 2004 15:25:23 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Thu, 26 Aug 2004 15:25:23 +0900 From: Pyun YongHyeon To: sparc64@freebsd.org Message-ID: <20040826062523.GB12164@kt-is.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) Subject: Revised cs4231 sound driver for Ultrasparcs X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 06:25:55 -0000 Hello All, Here is a revised sound driver for SBus/EBus based Ultrasparcs. Changes from my old SBus sound driver: 1. Added support s4231 audio chip found on EBus based Ultrasparcs. 2. Added AFMT_S16_BE audio format. So there is no need to be invoked endian conversion routine in sound(4)(feeder_endian). Most PC based soundcards supports little-endian format only (AFMT_S16_LE). If these cards are used on sparc64, sound(4) would have to perform endian-conversion in kernel. Of course, this reduces playback/capture performance. 3. bug fix for mixer settings 4. bug fix for skipping audio samples on APC DMA Audio application notes: Well written audio applications, endian-clean and LP64 ready applications, should work without any problems. For instance, mpg123, mp3blaster, mplayer works well. xmms, one of most popular player, needs additional patch from here. http://www.kr.freebsd.org/~yongari/patch-OSS.sparc64 Due to lack of X supports on my sparc64, audio playback on xmms was tested on a remote i386 X server. Known bugs & limitations: Audio capture(recording) was not tested at all. Full-duplex operation may not work. The driver was tested on Ultra2 and AXe. Installation: 1. get the driver file and patch your source tree #fetch http://www.kr.freebsd.org/~yongari/cs4231.freebsd.diff #cd /usr/src #patch -p0 < /path/to/patch-file 2. build kernel and kernel modules #cd /usr/src #make buildkernel KERNCONF=YOUR_KERNEL_CONFIG #make installkernel KERNCONF=YOUR_KERNEL_CONFIG If you don't want to use the sound driver as a kernel module, you can add the following lines in your kernel configuration. device sound device "snd_cs4231" 3. reboot 4. load snd_cs4231.ko driver module and play Note, you may want to mute speaker output with mixer(8) on Ultra1/2. * You may notice all sound drivers are installed by my patch. But I don't know whether these drivers are functional or not on sparc64. It wouldn't surprise me if none of the drivers except snd_cs4231 work on sparc64. Since I have a trident 4dwave PCI card, I can help to make it work on sparc64 provided that I have more time and requests from users. The patch is for 6-CURRENT and is available at: http://www.kr.freebsd.org/~yongari/cs4231.freebsd.diff (The patch may be applied to 5.3BETA or higher as well.) If you are interested in audio support on sparc64, please give it a try and let me know how it goes. Thanks. Regards, Pyun YongHyeon -- Pyun YongHyeon