Wednesday, September 18, 2024

Azalia HDMI audio output with recompiled kernel

I am trying to get sound from my sound card. Azalia doesn't support HDMI connectivity by
default, so I patched and recompiled kernel. First, I commented the code that disables HDMI
codecs as suggested in [1]. Second, I enabled AZALIA_DEBUG. And third, I added
'case PCI_PRODUCT_INTEL_CORE5G_HDA_1:' as suggested here [2]. But without success.
Can anyone help, please?

[1] https://marc.info/?l=openbsd-tech&m=158780750403100&w=2
[2] https://marc.info/?l=openbsd-misc&m=144276440320834&w=2


# pcidump -vv 0:3:0
0:3:0: Intel Core 5G HD Audio
0x0000: Vendor ID: 8086, Product ID: 160c
0x0004: Command: 0006, Status: 0010
0x0008: Class: 04 Multimedia, Subclass: 03 HD Audio,
Interface: 00, Revision: 08
0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
Cache Line Size: 10
0x0010: BAR mem 64bit addr: 0x00000000f1118000/0x00004000
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 17aa Product ID: 222b
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: ff Min Gnt: 00 Max Lat: 00
0x0050: Capability 0x01: Power Management
State: D0
0x0060: Capability 0x05: Message Signalled Interrupts (MSI)
Enabled: yes; 1 vectors (1 enabled)
0x0070: Capability 0x10: PCI Express
Max Payload Size: 128 / 128 bytes
Max Read Request Size: 128 bytes
0x0100: Enhanced Capability 0x00: Unknown

# sndioctl -v
output[0].level=0.000
output[1].level=0.000
output[0].mute=0
output[1].mute=0
server.device=0

(but they doesn't work)

Running mixerctl doesn't show anything and dmesg shows tons of messages like "azalia0: CORB is not running"

If I'm running firefox with youtube.com I'm getting in dmesg:
azalia0: stream reset failure 1
azalia: stream reset failed
audio0: failed to start playback

dmesg after booting:

OpenBSD 7.5 (CUSTOM) #2: Wed Sep 18 19:40:42 +05 2024
alienx@zerohw.my.domain:/usr/src/sys/arch/amd64/compile/CUSTOM
real mem = 4172652544 (3979MB)
avail mem = 4025171968 (3838MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xccbfd000 (65 entries)
bios0: vendor LENOVO version "N17ETB6W (2.16 )" date 09/02/2021
bios0: LENOVO 20CHS02300
efi0 at bios0: UEFI 2.3.1
efi0: Lenovo rev 0x2160
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP ASF! HPET ECDT LPIT APIC MCFG SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT PCCT SSDT UEFI MSDM BATB FPDT UEFI BGRT CSRT DMAR
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) PXSX(S4) EXP2(S4) PXSX(S4) PXSX(S4) XHCI(S3) EHC1(S3) PWRB(S0)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Processor 5Y10 CPU @ 0.80GHz, 798.17 MHz, 06-3d-04, patch 0000002f
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Processor 5Y10 CPU @ 0.80GHz, 798.16 MHz, 06-3d-04, patch 0000002f
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Processor 5Y10 CPU @ 0.80GHz, 798.17 MHz, 06-3d-04, patch 0000002f
cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Processor 5Y10 CPU @ 0.80GHz, 798.17 MHz, 06-3d-04, patch 0000002f
cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 8-way L2 cache, 4MB 64b/line 16-way L3 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 40 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf8000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 6 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
"INT33A1" at acpi0 not configured
acpibtn0 at acpi0: LID_(wakeup)
acpibtn1 at acpi0: SLPB(wakeup)
acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001
acpicmos0 at acpi0
acpibat0 at acpi0: BAT0 model "00HW005" serial 1624 type LiP oem "SANYO"
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0: version 1.0
"INT33D2" at acpi0 not configured
"INT33D3" at acpi0 not configured
"INT33D4" at acpi0 not configured
"INT33D6" at acpi0 not configured
"INT3403" at acpi0 not configured
"INT3403" at acpi0 not configured
"INT3403" at acpi0 not configured
"INT3403" at acpi0 not configured
"INT3438" at acpi0 not configured
"INT3437" at acpi0 not configured
"INTL9C60" at acpi0 not configured
dwiic0 at acpi0 I2C0 addr 0xfe103000/0x1000 irq 7
iic0 at dwiic0
ihidev0 at iic0 addr 0xa irq 38, vendor 0x56a product 0x5014, WCOM5014
ihidev0: 13 report ids
hid at ihidev0 reportid 2 not configured
hid at ihidev0 reportid 3 not configured
hid at ihidev0 reportid 4 not configured
hid at ihidev0 reportid 7 not configured
hid at ihidev0 reportid 8 not configured
hid at ihidev0 reportid 9 not configured
hid at ihidev0 reportid 10 not configured
ims0 at ihidev0 reportid 12: 1 button, tip
wsmouse0 at ims0 mux 0
hid at ihidev0 reportid 13 not configured
dwiic1 at acpi0 I2C1 addr 0xfe105000/0x1000 irq 7
iic1 at dwiic1
ihidev1 at iic1 addr 0x9 irq 39, vendor 0x56a product 0x114, WCOM0009
ihidev1: 9 report ids
ims1 at ihidev1 reportid 1: 2 buttons
wsmouse1 at ims1 mux 0
ims2 at ihidev1 reportid 2: 3 buttons, tip, barrel, eraser
wsmouse2 at ims2 mux 0
hid at ihidev1 reportid 3 not configured
hid at ihidev1 reportid 4 not configured
hid at ihidev1 reportid 5 not configured
ims3 at ihidev1 reportid 6: 0 buttons
wsmouse3 at ims3 mux 0
hid at ihidev1 reportid 7 not configured
hid at ihidev1 reportid 8 not configured
hid at ihidev1 reportid 9 not configured
"INT343A" at iic1 addr 0x1c not configured
ihidev2 at iic1 addr 0x70 irq 37, vendor 0x2047 product 0x855, INV6500
ihidev2: 8 report ids
hid at ihidev2 reportid 1 not configured
hid at ihidev2 reportid 2 not configured
hid at ihidev2 reportid 3 not configured
hid at ihidev2 reportid 4 not configured
hid at ihidev2 reportid 5 not configured
hid at ihidev2 reportid 6 not configured
hid at ihidev2 reportid 7 not configured
hid at ihidev2 reportid 8 not configured
"VFSI6101" at acpi0 not configured
"NVT0001" at acpi0 not configured
"INT3402" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
acpibtn2 at acpi0: PWRB(wakeup)
"PNP0C14" at acpi0 not configured
"INT3400" at acpi0 not configured
"INT340F" at acpi0 not configured
acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1
acpipwrres1 at acpi0: NVP3, resource for PEG_
acpipwrres2 at acpi0: NVP2, resource for PEG_
acpipwrres3 at acpi0: PXTC, resource for TOUS, TOUC
acpitz0 at acpi0: critical temperature is 128 degC
acpivideo0 at acpi0: VID_
acpivout0 at acpivideo0: LCD0
acpivideo1 at acpi0: VID_
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 798 MHz: speeds: 1001, 1000, 900, 800, 700, 600, 500 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 5G Host" rev 0x08
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 5300" rev 0x08
drm0 at inteldrm0
inteldrm0: msi, BROADWELL, gen 8
azalia0 at pci0 dev 3 function 0 "Intel Core 5G HD Audio" rev 0x08: msi
azalia_reset: resetting
azalia_reset: reset counter = 5000
azalia_reset: reset counter = 5000
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 3 output, 0 input, and 0 bidi streams
azalia0: found a codec at #0
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: codec[0] vid 0x80862808, subid 0x222b17aa, rev. 0.0, HDA version 1.0
azalia0: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 2 widgets in the audio function.
encodings=0
PCM formats=0
inamp: mute=0 size=0 steps=0 offset=0
outamp: mute=0 size=0 steps=0 offset=0
gpio: wake=0 unsol=0 gpis=0 gpos=0 gpios=0
azalia0: dac02 wcap=6611<POWER,DIGITAL,FORMATOV,STEREO>
encodings=5<AC3,PCM>
PCM formats=1e07f0<32bit,24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz,32kHz>
azalia0: unknown03 wcap=40778d<POWER,DIGITAL,CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
cap=9000094<OUTPUT,PRESENCE>
[01/00] color=unknown device=digital-out conn=jack conntype=digital
location=spec1 chassis=internal special=hdmi
outamp: mute=1 size=0 steps=0 offset=0
connections=0x2; selected=0x2
azalia_codec_sort_pins: analog out pins:
azalia_codec_sort_pins: digital out pins: 0x03->0x02
azalia_codec_sort_pins: analog in pins:
azalia_codec_sort_pins: digital in pins:
azalia0: dacgroup[0]: 02
azalia0: codecs: Intel/0x2808
audio0 at azalia0
"Intel Core 5G Thermal" rev 0x08 at pci0 dev 4 function 0 not configured
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x03: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 9 Series MEI" rev 0x03 at pci0 dev 22 function 0 not configured
ppb0 at pci0 dev 28 function 0 "Intel 9 Series PCIE" rev 0xe3
pci1 at ppb0 bus 2
ppb1 at pci0 dev 28 function 1 "Intel 9 Series PCIE" rev 0xe3: msi
pci2 at ppb1 bus 6
iwm0 at pci2 dev 0 function 0 "Intel AC 7265" rev 0x4b, msi
pcib0 at pci0 dev 31 function 0 "Intel 9 Series LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 9 Series AHCI" rev 0x03: msi, AHCI 1.3
ahci0: port 3: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 3 lun 0: <ATA, TOSHIBA THNSFJ25, JULA> naa.500080d9101fe699
sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
ichiic0 at pci0 dev 31 function 3 "Intel 9 Series SMBus" rev 0x03: apic 2 int 18
iic2 at ichiic0
pchtemp0 at pci0 dev 31 function 6 "Intel 9 Series Thermal" rev 0x03
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
uvideo0 at uhub0 port 1 configuration 1 interface 0 "8SSC20F26950L1GZ4AK04CN Integrated Rear Camera" rev 2.00/0.23 addr 2
video0 at uvideo0
uhub1 at uhub0 port 6 configuration 1 interface 0 "GENESYS USB 2.0 HUB" rev 2.00/85.36 addr 3
uhidev0 at uhub1 port 1 configuration 1 interface 0 "Lenovo ThinkPad Helix Ultrabook Keyboard" rev 2.00/0.13 addr 4
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev1 at uhub1 port 1 configuration 1 interface 1 "Lenovo ThinkPad Helix Ultrabook Keyboard" rev 2.00/0.13 addr 4
uhidev1: iclass 3/1, 9 report ids
uhid0 at uhidev1 reportid 1: input=1, output=0, feature=0
ums0 at uhidev1 reportid 2: 5 buttons, Z and W dir
wsmouse4 at ums0 mux 0
ucc0 at uhidev1 reportid 3: 16 usages, 5 keys, enum
wskbd2 at ucc0 mux 1
uhid1 at uhidev1 reportid 9: input=2, output=2, feature=0
uhidev2 at uhub1 port 1 configuration 1 interface 2 "Lenovo ThinkPad Helix Ultrabook Keyboard" rev 2.00/0.13 addr 4
uhidev2: no input interrupt endpoint
ulpt0 at uhub1 port 2 configuration 1 interface 0 "Samsung Electronics Co., Ltd. ML-1660 Series" rev 1.10/1.00 addr 5
ulpt0: using bi-directional mode
ugen0 at uhub0 port 7 "Intel Bluetooth" rev 2.01/0.01 addr 6
uvideo1 at uhub0 port 8 configuration 1 interface 0 "8SSC20F26951L1GZ4AA04MB Integrated Camera" rev 2.00/0.22 addr 7
video1 at uvideo1
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006>
sd1: 145894MB, 512 bytes/sector, 298791024 sectors
root on sd1a (f9353ad4c3d4fde6.a) swap on sd1b dump on sd1b
inteldrm0: 1920x1080, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0
wskbd1: connecting to wsdisplay0
wskbd2: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
iwm0: hw rev 0x180, fw ver 17.3216344376.0, address 00:15:00:ff:76:e8

No comments:

Post a Comment