NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/42004: azalia(4) picks wrong codec



>Number:         42004
>Category:       kern
>Synopsis:       automatically selected codec produces no audio output
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 07 11:35:01 +0000 2009
>Originator:     Nhat Minh Le
>Release:        NetBSD 5.0.1_PATCH (Aug 5th 2009)
>Organization:
>Environment:
System: NetBSD elhaym.huoc.org 5.0.1_PATCH NetBSD 5.0.1_PATCH (ELHAYM_DEBUG) 
#1: Mon Sep 7 12:20:05 CEST 2009 
root%elhaym.huoc.org@localhost:/usr/src/sys/arch/i386/compile/ELHAYM_DEBUG i386
Architecture: i386
Machine: i386
>Description:
On my Dell Inspiron 1525 (dmesg follows), there are two codecs with
audio functions. azalia(4) automatically picks the first, which does
not produce useful audio output.

There seems to be no way to force the driver to select another codec.

dmesg (with AZALIA_DEBUG):
NetBSD 5.0.1_PATCH (ELHAYM_DEBUG) #0: Mon Sep  7 11:47:27 CEST 2009
        
root%elhaym.huoc.org@localhost:/usr/src/sys/arch/i386/compile/ELHAYM_DEBUG
total memory = 2038 MB
avail memory = 1996 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Dell Inc. Inspiron 1525                   
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel 686-class, 1995MHz, id 0x6fd
cpu1 at mainbus0 apid 1: Intel 686-class, 1995MHz, id 0x6fd
ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 20, 24 pins
acpi0 at mainbus0: Intel ACPICA 20080321
acpi0: X/RSDT: OemId <DELL  , M08    ,27d8061b>, AslId <ASL ,00000061>
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
ACPI-Fast 24-bit timer
pckbc0 at acpi0 (PS2M, PNP0F13): aux port
pckbc0: irq 12
pckbc1 at acpi0 (KBC, PNP0303): kbd port
pckbc1: io 0x60,0x64,0x62,0x66 irq 1
attimer0 at acpi0 (TMR, PNP0100): AT Timer
attimer0: io 0x40-0x43,0x50-0x53 irq 2
pcppi0 at acpi0 (SPKR, PNP0800)
pcppi0: io 0x61,0x63,0x65,0x67
midi0 at pcppi0: PC speaker (CPU-intensive output)
sysbeep0 at pcppi0
npx0 at acpi0 (COPR, PNP0C04)
npx0: io 0xf0-0xff irq 13
npx0: reported by CPUID; using exception 16
acpilid0 at acpi0 (LID, PNP0C0D): ACPI Lid Switch
acpibut0 at acpi0 (PBTN, PNP0C0C): ACPI Power Button
acpibut1 at acpi0 (SBTN, PNP0C0E): ACPI Sleep Button
acpiacad0 at acpi0 (AC, ACPI0003): ACPI AC Adapter
acpibat0 at acpi0 (BAT0, PNP0C0A-1): ACPI Battery (Control Method)
acpidalb0 at acpi0 (MBTN, PNP0C32-0): Direct Application Launch Button
AMW0 (pnp0c14) at acpi0 not configured
acpitz0 at acpi0 (THM): critical 85.0C, passive cooling
apm0 at acpi0: Power Management spec V1.2
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer0: attached to pcppi0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x8086 product 0x2a00 (rev. 0x0c)
agp0 at pchb0: detected 7676k stolen memory
agp0: aperture at 0xe0000000, size 0x20000000
vga0 at pci0 dev 2 function 0: vendor 0x8086 product 0x2a02 (rev. 0x0c)
vga0: WARNING: ignoring 64-bit BAR @ 0x10
vga0: WARNING: ignoring 64-bit BAR @ 0x18
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
drm at vga0 not configured
vendor 0x8086 product 0x2a03 (miscellaneous display, revision 0x0c) at pci0 dev 
2 function 1 not configured
uhci0 at pci0 dev 26 function 0: vendor 0x8086 product 0x2834 (rev. 0x02)
uhci0: interrupting at ioapic0 pin 20
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 26 function 1: vendor 0x8086 product 0x2835 (rev. 0x02)
uhci1: interrupting at ioapic0 pin 21
usb1 at uhci1: USB revision 1.0
ehci0 at pci0 dev 26 function 7: vendor 0x8086 product 0x283a (rev. 0x02)
ehci0: interrupting at ioapic0 pin 22
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1
usb2 at ehci0: USB revision 2.0
azalia0 at pci0 dev 27 function 0: Generic High Definition Audio Controller
azalia0: interrupting at ioapic0 pin 21
azalia0: host: 0x8086/0x284b (rev. 2), HDA rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 5000
azalia_attach: reset counter = 4985
azalia0: found a codec at #0
azalia0: found a codec at #1
azalia0: found a codec at #2
ppb0 at pci0 dev 28 function 0: vendor 0x8086 product 0x283f (rev. 0x02)
ppb0: disabling notification events
pci1 at ppb0 bus 9
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
vendor 0x11ab product 0x4354 (ethernet network, revision 0x12) at pci1 dev 0 
function 0 not configured
ppb1 at pci0 dev 28 function 1: vendor 0x8086 product 0x2841 (rev. 0x02)
ppb1: disabling notification events
pci2 at ppb1 bus 11
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
wpi0 at pci2 dev 0 function 0: vendor 0x8086 product 0x4222 (rev. 0x02)
wpi0: interrupting at ioapic0 pin 17
wpi0: MoW2, address 00:1f:3c:8c:f8:31
wpi0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wpi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wpi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 
36Mbps 48Mbps 54Mbps
ppb2 at pci0 dev 28 function 4: vendor 0x8086 product 0x2847 (rev. 0x02)
ppb2: disabling notification events
pci3 at ppb2 bus 12
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
uhci2 at pci0 dev 29 function 0: vendor 0x8086 product 0x2830 (rev. 0x02)
uhci2: interrupting at ioapic0 pin 20
usb3 at uhci2: USB revision 1.0
uhci3 at pci0 dev 29 function 1: vendor 0x8086 product 0x2831 (rev. 0x02)
uhci3: interrupting at ioapic0 pin 21
usb4 at uhci3: USB revision 1.0
uhci4 at pci0 dev 29 function 2: vendor 0x8086 product 0x2832 (rev. 0x02)
uhci4: interrupting at ioapic0 pin 22
usb5 at uhci4: USB revision 1.0
ehci1 at pci0 dev 29 function 7: vendor 0x8086 product 0x2836 (rev. 0x02)
ehci1: interrupting at ioapic0 pin 20
ehci1: EHCI version 1.0
ehci1: companion controllers, 2 ports each: uhci2 uhci3 uhci4
usb6 at ehci1: USB revision 2.0
ppb3 at pci0 dev 30 function 0: vendor 0x8086 product 0x2448 (rev. 0xf2)
pci4 at ppb3 bus 2
pci4: i/o space, memory space enabled
fwohci0 at pci4 dev 9 function 0: vendor 0x1180 product 0x0832 (rev. 0x05)
fwohci0: interrupting at ioapic0 pin 16
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 39:4f:c0:00:27:aa:68:70
fwohci0: Phy 1394a available S400, 1 ports.
fwohci0: Link S400, max_rec 2048 bytes.
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
vendor 0x1180 product 0x0822 (SD Host Controller system, interface 0x01, 
revision 0x22) at pci4 dev 9 function 1 not configured
vendor 0x1180 product 0x0843 (miscellaneous system, revision 0x12) at pci4 dev 
9 function 2 not configured
vendor 0x1180 product 0x0592 (miscellaneous system, revision 0x12) at pci4 dev 
9 function 3 not configured
vendor 0x1180 product 0x0852 (miscellaneous system, revision 0x12) at pci4 dev 
9 function 4 not configured
ichlpcib0 at pci0 dev 31 function 0
ichlpcib0: vendor 0x8086 product 0x2815 (rev. 0x02)
timecounter: Timecounter "ichlpcib0" frequency 3579545 Hz quality 1000
ichlpcib0: 24-bit timer
ichlpcib0: TCO (watchdog) timer configured.
hpet0 at ichlpcib0
timecounter: Timecounter "hpet0" frequency 14318179 Hz quality 2000
piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801HBM IDE Controller (ICH8M) (rev. 0x02)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at ioapic0 pin 14
atabus0 at piixide0 channel 0
piixide0: secondary channel configured to compatibility mode
piixide0: secondary channel ignored (disabled)
ahcisata0 at pci0 dev 31 function 2: vendor 0x8086 product 0x2829
ahcisata0: interrupting at ioapic0 pin 17
ahcisata0: AHCI revision 1.1, 3 ports, 32 command slots, features 0xe720e0c0
atabus1 at ahcisata0 channel 0
atabus2 at ahcisata0 channel 2
ichsmb0 at pci0 dev 31 function 3: vendor 0x8086 product 0x283e (rev. 0x02)
ichsmb0: interrupting at ioapic0 pin 17
iic0 at ichsmb0: I2C bus
isa0 at ichlpcib0
fwohci0: BUS reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
ieee1394if0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
ieee1394if0: bus manager 0 (me)
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "TSC" frequency 1995216840 Hz quality 3000
acpiacad0: AC adapter online.
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: information of codec[0] follows:
azalia_codec_init_vtbl: vid=14f12c06 subid=022f1028
azalia0: codec[0]: 0x14f1/0x2c06 (rev. 0.0), HDA rev. 1.0
azalia_codec_init: nidstart=2 #functions=1
azalia_codec_init: FTYPE result = 0x00000102
azalia0: codec[0]: No support for modem function groups
azalia0: codec[0] has no audio function groups
azalia0: information of codec[1] follows:
azalia_codec_init_vtbl: vid=10951392 subid=022f1028
azalia0: codec[1]: 0x1095/0x1392 (rev. 0.0), HDA rev. 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 2 widgets in the audio function.
azalia0:    encodings=0
azalia0:    PCM formats=0
azalia0:    inamp: mute=0 size=0 steps=0 offset=0
azalia0:    outamp: mute=0 size=0 steps=0 offset=0
azalia0: dac02 wcap=6211<DIGITAL,FORMATOV,STEREO>
azalia0:    encodings=5<AC3,PCM>
azalia0:    PCM 
formats=1e07f0<32bit,24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz,32kHz>
azalia0: unknown03 wcap=40738d<DIGITAL,CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
azalia0:    pin config; device=digital-out color=unknown assoc=1 seq=0 
cap=94<OUTPUT,PRESENCE>
azalia0:    connections=0x2; selected=0x2
azalia0:    outamp: mute=1 size=0 steps=0 offset=0
generic_codec_find_dac: DAC: nid=0x2 index=2
generic_codec_find_dac: DAC path: nid=0x3 index=3
generic_codec_add_dacgroup: assoc=1 seq=0 ==> g=0 n=0
generic_codec_init_dacgroup: find non-connected DACs
azalia_codec_init: dacgroup[0]: 02
azalia0: playback: max channels=2, DIGITAL, encodings=5<AC3,PCM>
azalia0: playback: PCM 
formats=1e07f0<32bit,24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz,32kHz>
generic_mixer_init: register classes
generic_mixer_default: unmute
generic_mixer_default: process bidirectional pins
generic_mixer_default: set volume
azalia0: information of codec[2] follows:
azalia_codec_init_vtbl: vid=83847616 subid=022f1028
azalia0: codec[2]: Sigmatel STAC9228X (rev. 4.2), HDA rev. 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000101
azalia_codec_init: There are 35 widgets in the audio function.
azalia0:    encodings=1<PCM>
azalia0:    PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0:    inamp: mute=0 size=5 steps=14 offset=0
azalia0:    outamp: mute=1 size=2 steps=127 offset=127
azalia0: dac02 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0:    encodings=1<PCM>
azalia0:    PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0:    outamp: mute=1 size=2 steps=127 offset=127
azalia0: dac03 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0:    encodings=1<PCM>
azalia0:    PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0:    outamp: mute=1 size=2 steps=127 offset=127
azalia0: dac04 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0:    encodings=1<PCM>
azalia0:    PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0:    outamp: mute=1 size=2 steps=127 offset=127
azalia0: dac05 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0:    encodings=1<PCM>
azalia0:    PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0:    outamp: mute=1 size=2 steps=127 offset=127
azalia0: widget06 wcap=fd0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0:    outamp: mute=1 size=2 steps=127 offset=127
azalia0: adc07 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
azalia0:    encodings=1<PCM>
azalia0:    PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0:    connections=0x1b; selected=0x1b
azalia0: adc08 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
azalia0:    encodings=1<PCM>
azalia0:    PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0:    connections=0x1c; selected=0x1c
azalia0: adc09 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
azalia0:    encodings=1<PCM>
azalia0:    PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0:    connections=0x1d; selected=0x1d
azalia0: black0a wcap=400181<CONNLIST,UNSOL,STEREO>
azalia0:    pin config; device=headphones color=black assoc=1 seq=15 
cap=173f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
azalia0:    connections=0x2,0x3; selected=0x2
azalia0: unknown0b wcap=400181<CONNLIST,UNSOL,STEREO>
azalia0:    pin config; device=other color=unknown assoc=15 seq=1 
cap=173f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
azalia0:    connections=0x2,0x3; selected=0x2
azalia0: pink0c wcap=400181<CONNLIST,UNSOL,STEREO>
azalia0:    pin config; device=mic color=pink assoc=3 seq=0 
cap=1737<INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
azalia0:    connections=0x3; selected=0x3
azalia0: unknown0d wcap=400181<CONNLIST,UNSOL,STEREO>
azalia0:    pin config; device=speaker color=unknown assoc=1 seq=0 
cap=173f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
azalia0:    connections=0x2; selected=0x2
azalia0: blue0e wcap=400181<CONNLIST,UNSOL,STEREO>
azalia0:    pin config; device=line-in color=blue assoc=5 seq=0 
cap=1737<INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
azalia0:    connections=0x4; selected=0x4
azalia0: black0f wcap=400181<CONNLIST,UNSOL,STEREO>
azalia0:    pin config; device=line-out color=black assoc=2 seq=0 
cap=1737<INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
azalia0:    connections=0x5; selected=0x5
azalia0: unknown10 wcap=400181<CONNLIST,UNSOL,STEREO>
azalia0:    pin config; device=other color=unknown assoc=15 seq=2 
cap=37<INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
azalia0:    connections=0x4; selected=0x4
azalia0: unknown11 wcap=400181<CONNLIST,UNSOL,STEREO>
azalia0:    pin config; device=other color=unknown assoc=15 seq=3 
cap=37<INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
azalia0:    connections=0x3; selected=0x3
azalia0: unknown12 wcap=400001<STEREO>
azalia0:    pin config; device=other color=unknown assoc=15 seq=4 cap=20<INPUT>
azalia0: unknown13 wcap=400001<STEREO>
azalia0:    pin config; device=other color=unknown assoc=15 seq=7 cap=20<INPUT>
azalia0: unknown14 wcap=400001<STEREO>
azalia0:    pin config; device=other color=unknown assoc=15 seq=5 cap=20<INPUT>
azalia0: sel15 wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
azalia0:    connections=0xe,0x12,0xf,0xb,0xc,0xd,0xa,0x10,0x11; selected=0xe
azalia0:    outamp: mute=0 size=39 steps=4 offset=0
azalia0: sel16 wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
azalia0:    connections=0xe,0x12,0xf,0xb,0xc,0xd,0xa,0x10,0x11; selected=0xe
azalia0:    outamp: mute=0 size=39 steps=4 offset=0
azalia0: sel17 wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
azalia0:    connections=0xe,0x12,0xf,0xb,0xc,0xd,0xa,0x10,0x11; selected=0xe
azalia0:    outamp: mute=0 size=39 steps=4 offset=0
azalia0: sel18 wcap=300103<CONNLIST,INAMP,STEREO>
azalia0:    connections=0x15; selected=0x15
azalia0:    inamp: mute=0 size=5 steps=14 offset=0
azalia0: sel19 wcap=300103<CONNLIST,INAMP,STEREO>
azalia0:    connections=0x16; selected=0x16
azalia0:    inamp: mute=0 size=5 steps=14 offset=0
azalia0: sel1a wcap=300103<CONNLIST,INAMP,STEREO>
azalia0:    connections=0x17; selected=0x17
azalia0:    inamp: mute=0 size=5 steps=14 offset=0
azalia0: sel1b wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
azalia0:    connections=0x18,0x13,0x14; selected=0x18
azalia0:    outamp: mute=1 size=0 steps=0 offset=0
azalia0: sel1c wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
azalia0:    connections=0x19,0x13,0x14; selected=0x19
azalia0:    outamp: mute=1 size=0 steps=0 offset=0
azalia0: sel1d wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
azalia0:    connections=0x1a,0x13,0x14; selected=0x1a
azalia0:    outamp: mute=1 size=0 steps=0 offset=0
azalia0: dac1e wcap=40211<DIGITAL,FORMATOV,STEREO>
azalia0:    encodings=5<AC3,PCM>
azalia0:    PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: widget1f wcap=f30201<DIGITAL,STEREO>
azalia0: adc20 wcap=140311<DIGITAL,CONNLIST,FORMATOV,STEREO>
azalia0:    encodings=5<AC3,PCM>
azalia0:    PCM formats=e0160<24bit,20bit,16bit,96kHz,48kHz,44.1kHz>
azalia0:    connections=0x22; selected=0x22
azalia0: yellow21 wcap=400301<DIGITAL,CONNLIST,STEREO>
azalia0:    pin config; device=SPDIF-out color=yellow assoc=10 seq=0 
cap=10<OUTPUT>
azalia0:    connections=0x1e,0x1f,0x1b,0x1c,0x1d; selected=0x1e
azalia0: unknown22 wcap=430681<POWER,DIGITAL,UNSOL,STEREO>
azalia0:    pin config; device=other color=unknown assoc=15 seq=6 
cap=10024<EAPD,INPUT,PRESENCE>
azalia0: beep23 wcap=70000c<AMPOV,OUTAMP>
azalia0:    outamp: mute=0 size=23 steps=3 offset=3
azalia0: volume24 wcap=600000
azalia0:    delta=1 steps=127
generic_codec_find_dac: DAC: nid=0x2 index=2
generic_codec_find_dac: DAC path: nid=0xd index=13
generic_codec_add_dacgroup: assoc=1 seq=0 ==> g=0 n=0
generic_codec_find_dac: DAC: nid=0x5 index=5
generic_codec_find_dac: DAC path: nid=0xf index=15
generic_codec_add_dacgroup: assoc=2 seq=0 ==> g=1 n=0
generic_codec_find_dac: DAC: nid=0x3 index=3
generic_codec_find_dac: DAC path: nid=0xc index=12
generic_codec_add_dacgroup: assoc=3 seq=0 ==> g=2 n=0
generic_codec_find_dac: DAC: nid=0x4 index=4
generic_codec_find_dac: DAC path: nid=0xe index=14
generic_codec_add_dacgroup: assoc=5 seq=0 ==> g=3 n=0
generic_codec_find_dac: DAC: nid=0x1e index=30
generic_codec_find_dac: DAC path: nid=0x21 index=33
generic_codec_add_dacgroup: assoc=10 seq=0 ==> g=4 n=0
generic_codec_init_dacgroup: find non-connected DACs
azalia_codec_init: dacgroup[0]: 02
azalia_codec_init: dacgroup[1]: 05
azalia_codec_init: dacgroup[2]: 03
azalia_codec_init: dacgroup[3]: 04
azalia_codec_init: dacgroup[4]: 1e
azalia0: playback: max channels=2, encodings=1<PCM>
azalia0: playback: PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: recording: max channels=2, encodings=1<PCM>
azalia0: recording: PCM 
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
generic_mixer_init: register classes
generic_mixer_default: unmute
generic_mixer_default: process bidirectional pins
generic_mixer_default: set volume
azalia0: using the #1 codec
audio0 at azalia0: full duplex, independent
azalia_round_blocksize: resultant block size = 384
azalia_round_blocksize: resultant block size = 6400
uhub0 at usb0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb1: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2 at usb2: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 4 ports with 4 removable, self powered
atapibus0 at atabus0: 2 targets
uhub3 at usb4: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
uhub4 at usb3: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub4: 2 ports with 2 removable, self powered
uhub5 at usb5: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub5: 2 ports with 2 removable, self powered
uhub6 at usb6: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub6: 6 ports with 6 removable, self powered
cd0 at atapibus0 drive 0: <PBDS DVD+/-RW DS-8W1P, 806020087723, BD1B> cdrom 
removable
ahcisata0 port 0: device present, speed: 1.5Gb/s
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
wd0 at atabus1 drive 0: <SAMSUNG HM160HI>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 149 GB, 310101 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 7
wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) 
(using DMA)
ahcisata0 port 2: PHY offline
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)

>How-To-Repeat:
On a suitable machine, run a kernel compiled with azalia(4) using
different codecs. Observe that mixer controls vary vastly from
"nothing useful" to "a lot of obscure values" and that audio works
only with one codec.

>Fix:
Manually set the codec index to use and maybe improve the
auto-detection algorithm. I suggest the algorithm should pick the
first known codec with audio functions, if that is at all
feasible. This would solve the problem in my case, at least, since the
first audio codec is unidentified.

For convenience, here's a small patch that adds a AZALIA_CODECNO
option to config that lets you choose which codec to use. Maybe there
is a better way to go about it.

Index: ./sys/dev/pci/azalia.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/azalia.c,v
retrieving revision 1.64.6.1
diff -u -r1.64.6.1 azalia.c
--- ./sys/dev/pci/azalia.c      2 Mar 2009 19:53:26 -0000       1.64.6.1
+++ ./sys/dev/pci/azalia.c      7 Sep 2009 10:37:40 -0000
@@ -40,6 +40,8 @@
  *  - multiple streams (needed?)
  */
 
+#include "opt_azalia.h"
+
 #include <sys/cdefs.h>
 __KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.64.6.1 2009/03/02 19:53:26 snj Exp 
$");
 
@@ -144,6 +146,11 @@
        int mode_cap;
 } azalia_t;
 
+/* index of the default codec to use or -1 for auto-detect */
+#ifndef AZALIA_CODECNO
+#define AZALIA_CODECNO (-1)
+#endif
+
 #define AZ_READ_1(z, r)                bus_space_read_1((z)->iot, (z)->ioh, 
HDA_##r)
 #define AZ_READ_2(z, r)                bus_space_read_2((z)->iot, (z)->ioh, 
HDA_##r)
 #define AZ_READ_4(z, r)                bus_space_read_4((z)->iot, (z)->ioh, 
HDA_##r)
@@ -590,7 +597,7 @@
        AZ_WRITE_4(az, INTCTL,
            AZ_READ_4(az, INTCTL) | HDA_INTCTL_CIE | HDA_INTCTL_GIE);
 
-       c = -1;
+       c = AZALIA_CODECNO;
        for (i = 0; i < az->ncodecs; i++) {
                err = azalia_codec_init(&az->codecs[i], reinit, az->subid);
                if (!err && c < 0)
Index: ./sys/dev/pci/files.pci
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/files.pci,v
retrieving revision 1.308
diff -u -r1.308 files.pci
--- ./sys/dev/pci/files.pci     30 Oct 2008 12:02:14 -0000      1.308
+++ ./sys/dev/pci/files.pci     7 Sep 2009 10:37:40 -0000
@@ -480,6 +480,7 @@
 attach azalia at pci
 file   dev/pci/azalia.c                azalia
 file   dev/pci/azalia_codec.c          azalia
+defparam opt_azalia.h  AZALIA_CODECNO
 
 # NeoMagic 256 AC'97 Audio
 device neo: audiobus, auconv, mulaw, ac97



Home | Main Index | Thread Index | Old Index