Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
hdaudio(4) "mixerctl -a" -> panic
Hi,
No matter what I tried, azalia(4) was always silent on this mac pro.
I thought I might have better luck with hdaudio(4). Unfortunately it
didn't work either. Running mixerctl immediately panics the system:
kernel: integer divide fault trap, code=0
[...]
divl 0x24(%r8),%eax
hdaudio_afg_get_port() at netbsd:hdaudio_afg_get_port+0xbe
audioioctl()
cdev_ioctl()
VOP_IOCTL()
vn_ioctl()
sys_ioctl()
syscall()
The problem is that "ctl_step" is 0 and is used as a divisor in some
places. Forcing this value to 1 (attached diff) fixed the panic but
there is still no audio on either the built in speaker or the headphone
jack. If I boot OSX there is audio so that rules out a hardware
problem. I noticed that the HP jack has a shiny red LED inside, so
I assume it doubles as a s/pdif optical output. But from what I can
tell, the codec is properly configured for analog audio:
tnn@mac:tnn> mixerctl -a
outputs.master=255,255
inputs.dac=255,255
inputs.line=184,184
inputs.record=0,0
inputs.reclvl=80,80
record.monitor=184,184
outputs.dacsel=DAC03,DAC04,DAC05
record.source=ADC00,ADC01,ADC02
hdaudio0 at pci0 dev 27 function 0: HD Audio Controller
hdaudio0: interrupting at ioapic0 pin 20
hdafg0 at hdaudio0 vendor 0x10EC product 0x0885 nid 0x01
(firmware configuration)
hdafg0: ADC0:07, Analog Mic In: Fixed Function (Unknown,18)
hdafg0: ADC1:08, Analog Line In: Jack (Blue, 1A)
hdafg0: ADC2:0A, Digital SPDIF In: Jack (White, 1F)
hdafg0: DAC3:02, Analog Speaker: Fixed Function (Unknown, 14)
hdafg0: DAC3:03, Analog Speaker: Fixed Function (Unknown, 16)
hdafg0: DAC4:04, Analog HP Out: Jack (Green, 15)
hdafg0: DAC5:06, Digital SPDIF Out: Jack (White, 1E)
hdafg0: 4ch/2ch 44100Hz-192000Hz 16/16 20/32 24/32
audio0 at hdafg0: full duplex, independent
-Tobias
Index: hdaudio_afg.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/hdaudio/hdaudio_afg.c,v
retrieving revision 1.9
diff -u -r1.9 hdaudio_afg.c
--- hdaudio_afg.c 9 Sep 2009 01:39:51 -0000 1.9
+++ hdaudio_afg.c 9 Sep 2009 09:24:57 -0000
@@ -912,7 +912,7 @@
ctl[cnt].ctl_enable = true;
ctl[cnt].ctl_widget = w;
ctl[cnt].ctl_mute = mute;
- ctl[cnt].ctl_step = step;
+ ctl[cnt].ctl_step = step ? step : 1;
ctl[cnt].ctl_size = size;
ctl[cnt].ctl_offset = offset;
ctl[cnt].ctl_left = offset;
@@ -947,7 +947,7 @@
ctl[cnt].ctl_childwidget = cw;
ctl[cnt].ctl_index = j;
ctl[cnt].ctl_mute = mute;
- ctl[cnt].ctl_step = step;
+ ctl[cnt].ctl_step = step ? step : 1;
ctl[cnt].ctl_size = size;
ctl[cnt].ctl_offset = offset;
ctl[cnt].ctl_left = offset;
@@ -964,7 +964,7 @@
ctl[cnt].ctl_enable = true;
ctl[cnt].ctl_widget = w;
ctl[cnt].ctl_mute = mute;
- ctl[cnt].ctl_step = step;
+ ctl[cnt].ctl_step = step ? step : 1;
ctl[cnt].ctl_size = size;
ctl[cnt].ctl_offset = offset;
ctl[cnt].ctl_left = offset;
Home |
Main Index |
Thread Index |
Old Index