Date: Thu, 1 Jul 2004 20:36:29 +0900 From: Pyun YongHyeon <yongari@kt-is.co.kr> To: Marius Strobl <marius@alchemy.franken.de> Cc: sparc64@freebsd.org Subject: Re: pcm sound driver for SBus Ultra1/Ultra2 Message-ID: <20040701113629.GC12933@kt-is.co.kr> In-Reply-To: <20040701130940.A12214@newtrinity.zeist.de> References: <20040701093225.GA12517@kt-is.co.kr> <20040701130940.A12214@newtrinity.zeist.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 01, 2004 at 01:09:40PM +0200, 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. > > > > <Driver summary> > > 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? > I'm afraid I didn't. The only real issue I encountered in pcm(4) was the reference for sndbuf_dmaxxx() in channel.c. So I added glue code (Nops) in sndbuf_dma.c. As you said, it seems that pcm(4) is not endian clean and I was surprised that I am the first big-endian consumer of pcm(4). But it works. :) Sample screen output follows. daemon# uname -a FreeBSD daemon.kt-is.co.kr 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Wed Jun 30 20:01:02 KST 2004 root@daemon.kt-is.co.kr:/usr/src/sys/sparc64/compile/YONGARI_KERNEL sparc64 daemon# kldload snd_cs4231 daemon# sysctl hw.snd.verbose=2 hw.snd.verbose: 1 -> 2 daemon# cat /dev/sndstat FreeBSD Audio Driver (newpcm) Installed devices: pcm0: <Sun Audiocs CS4231A> at mem 0xc000000 irq 2020 bufsz 32768 (1p/1r/0v channels duplex default) [pcm0:record:0]: spd 0, fmt 0x00000000/0x00000008, flags 0x00000000, 0x00000000 interrupts 0, overruns 0, hfree 32768, sfree 0 {hardware} -> feeder_root(0x00000000) -> {userland} [pcm0:play:0]: spd 0, fmt 0x00000000/0x00000008, flags 0x00000000, 0x00000000 interrupts 0, underruns 0, ready 0 {userland} -> feeder_root(0x00000000) -> {hardware} Regards, Pyun YongHyeon -- Pyun YongHyeon <http://www.kr.freebsd.org/~yongari>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040701113629.GC12933>