Bug 184512 - [snd_maestro] snd_maestro does not function on i386 [regression]
[snd_maestro] snd_maestro does not function on i386 [regression]
Status: In Progress
Product: Base System
Classification: Unclassified
Component: kern
Any Any
: Normal Affects Only Me
Assigned To: freebsd-multimedia
Depends on:
  Show dependency treegraph
Reported: 2013-12-05 09:20 UTC by anon_proxy
Modified: 2013-12-20 20:40 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description anon_proxy 2013-12-05 09:20:00 UTC
I have an aging/aged dell cpx laptop.  Sound does not work, no matter
what is done.  This laptop uses snd_maestro.  I have followed all the
instructions I can find on the web.  I have inserted snd_maestro_load="YES"
into /boot/loader.conf.

cat /dev/sndstat shows FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
/ installed device:[blank/none].

Dmesg shows pcm0: cannot allocate status buffer

I know sound was working in a previous release that I have now reinstalled -
9.1 release 7.

I have also tried the 10 beta 4 only to find the same problem.
Comment 1 Mark Linimon freebsd_committer 2013-12-08 23:58:29 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-multimedia

Comment 2 adam.ulmer 2013-12-20 20:30:25 UTC
I tested 9.2 with:

Dell XPS M1330 with Intel ICH8M had sound support from the default kernel,
snd_hda(4) <http://man.freebsd.org/snd_hda/4>
Dell Inspiron 8000 with ESS Maestro3 chipset
snd_maestro3(4)<http://man.freebsd.org/snd_maestro3/4>requires kldload
Dell Latitude X300 with Intel ICH4 had sound support from the default
kernel, snd_ich(4) <http://man.freebsd.org/snd_ich/4>
Dell Latitude X200 with Intel ICH3 had sound support from the default
kernel, snd_ich(4) <http://man.freebsd.org/snd_ich/4>

I don't have any hardware that uses

The "pcm0: cannot allocate status buffer" error message happens on
line 1835<http://svnweb.freebsd.org/base/release/9.2.0/sys/dev/sound/pci/maestro.c?view=markup#l1835>,
before the driver can attach to the device. The maestro driver fails to get
memory for the status/record buffer (the call to dma_malloc() does not
succeed). If I were being thorough, I would trace through the two
conditions in dma_malloc() that return
try to figure out why (requires hardware). The only change in the
maestro driver for 9.2 runs after that part of the code that fails so I'm
guessing that the loss of sound you experience with 9.2 comes from a change
somewhere higher up in the hierarchy (maybe PCI changes?).

While I'm trying to make educated guesses, I've never looked at this code
before and I don't have the hardware. I haven't worked on FreeBSD kernel
drivers since 2006 so I'd have to get familiar with the current PCI
subsystem. If the original reporter wants to continue with this guessing
game, boot into a live CD like the 9.2 live
try the following commands in an attempt to locate which changes since
9.1 contributed to the loss of sound.

sysctl hw.pci.realloc_bars=1
sysctl hw.snd.verbose=4
kldload snd_maestro
cat /dev/sndstat

I wouldn't make guesses if I had the hardware. I would trace through and
find out exactly what happens. I'm on holiday and wanted to contribute to
FreeBSD during my time off. I saw the maestro bug and knew I had hardware
with maestro something. It turns out it was maestro3 and so I'm not able to
help after all.