Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Aug 2009 18:14:10 +0200
From:      Marius Strobl <marius@alchemy.franken.de>
To:        Christian Ramseyer <rc@networkz.ch>
Cc:        freebsd-sparc64@freebsd.org
Subject:   Re: Audio on Sunblade 100
Message-ID:  <20090819161410.GA19351@alchemy.franken.de>
In-Reply-To: <20090818192748.GA6585@alchemy.franken.de>
References:  <4A7C6B50.3070503@networkz.ch> <20090817205340.GA75477@alchemy.franken.de> <20090817215612.GB75477@alchemy.franken.de> <20090818192748.GA6585@alchemy.franken.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 18, 2009 at 09:27:48PM +0200, Marius Strobl wrote:
> On Mon, Aug 17, 2009 at 11:56:12PM +0200, Marius Strobl wrote:
> > On Mon, Aug 17, 2009 at 10:53:40PM +0200, Marius Strobl wrote:
> > > On Fri, Aug 07, 2009 at 07:58:40PM +0200, Christian Ramseyer wrote:
> > > > Hi
> > > > 
> > > > I'm trying to get sound on a Sunblade 100 with 7.2R. I've added
> > > > 
> > > > device          sound
> > > > device          snd_t4dwave
> > > > 
> > > > to the kernel and recompiled. pciconf shows an attached driver:
> > > > 
> > > > pcm0@pci0:0:8:0:        class=0x040100 card=0x545110b9 chip=0x545110b9
> > > > rev=0x01 hdr=0x00
> > > >     vendor     = 'Acer Labs Incorporated (ALi/ULi)'
> > > >     device     = 'ALI M5451 PCI AC-Link Controller Audio Device'
> > > >     class      = multimedia
> > > >     subclass   = audio
> > > > 
> > > > However, there are errors in dmesg:
> > > > 
> > > > pcm0: <Acer Labs M5451> port 0x900-0x9ff mem 0x424000-0x424fff at device
> > > > 8.0 on pci0
> > > > pcm0: <Analog Devices AD1881A AC97 Codec>
> > > > pcm0: [GIANT-LOCKED]
> > > > pcm0: [ITHREAD]
> > > > pcm0: chn_init(pcm0:record:dsp0.r0) failed: err = 19
> > > > pcm0: pcm_chn_create(trrchan, -1, 0xfffff80001370800) failed
> > > > pcm0: chn_init(pcm0:play:dsp0.p0) failed: err = 19
> > > > pcm0: pcm_chn_create(trpchan, 1, 0xfffff80001370800) failed
> > > > 
> > > > I've also found this message from 2006:
> > > > http://lists.freebsd.org/mailman/htdig/freebsd-sparc64/2006-June/004168.html
> > > > 
> > > > So, am I just doing something wrong or are there problems with 5451
> > > > audio on SPARC? I see that the release notes only list i386 and amd64 as
> > > >  architectures for the t4dwave driver.
> > > > 
> > > > By the way, thanks a lot for all the work your guys are doing in general
> > > > and for the SPARC port in particular. I'm currently trying BSD for the
> > > > first time in my life and I like it a lot. It runs surprisingly well on
> > > > this outdated platform.
> > > > 
> > > 
> > > Could you (or any other Blade 100 user) please give the following
> > > patch at try?
> > > http://people.freebsd.org/~marius/t4dwave_sparc64_32-bit.diff
> > > This gets at least the line-out of the M5451 in my Blade 1500
> > > working (I've no idea whether its internal speaker is also
> > > connected to the sound chip like for example in a Blade 1000
> > > and thus supposed to also work or just to a PC-style beeper,
> > > the firmware at least makes it beep that way...), but which
> > > also has a newer revision of this chip.
> > > 
> > 
> > Looks like I've spoken to soon; it only works when it happens
> > to get certain buffer addresses, otherwise nothing is played
> > and the interrupt times out (which according to google isn't
> > a sparc64 specific problem). This probably means that some
> > bus_dma(9) parameters are incorrect...
> > 
> 
> Ok, I think I've identified the incorrect bus_dma(9) settings
> with the help of Tatsuo YOKOGAWA's ali(4) (which as least for
> the alignment requirement also matches the NetBSD autri(4). A
> new patch is at:
> http://people.freebsd.org/~marius/t4dwave_M5451_32-bit.diff
> This version now also basically works with the GENIALstation
> 777s, but there seems to be a problem with ac94(4) on that
> machine or it's wired strangely as I've to turn on the
> "PhoneOut" output in the mixer in order to get sound and its
> quality is likewise, though with the Blade 1500 all seems
> fine. If someone could test how far this patch gets things
> into working with Blade 100 that would be great.
> 

FYI, according to the OpenSolaris source, SPARC machines
with AC97-based on-board audio use the AC97 MONO_OUT for
the internal speaker, which in FreeBSD is mapped to
PhoneOut. Turning the latter on in the Blade 1500 indeed
gets its internal speaker going with a decent quality.
This also means that in the GENIALstation 777s the
"stereo" jack is wired to a mono output, which probably
explains the lousy sound quality.

Marius




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090819161410.GA19351>