pcm sound driver for SBus Ultra1/Ultra2

Scott Long scottl at samsco.org
Thu Jul 1 19:22:49 PDT 2004

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.
>> 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.


More information about the freebsd-sparc64 mailing list