Hello, I am trying OpenBSD-current/i386 on 86duino EduCake. It uses DM&P Vortex86EX SoC and its azalia fails to find ALC262 codec.
The diagnostic message says "RIRB is not running" (at azalia_get_response()), and I found Vortex86EX's azalia takes 2~4 DELAY(1)s to start RIRB DMA engine. (Vortex86EX's CORB DMA did not required any delay. It starts immediately.) Here is the patch to add delay. Regards, -- SASANO Takayoshi <u...@mx5.nisiq.net> Index: azalia.c =================================================================== RCS file: /cvs/src/sys/dev/pci/azalia.c,v retrieving revision 1.209 diff -u -p -r1.209 azalia.c --- azalia.c 30 Dec 2013 10:53:30 -0000 1.209 +++ azalia.c 24 Feb 2014 20:45:37 -0000 @@ -1110,7 +1110,7 @@ azalia_halt_rirb(azalia_t *az) int azalia_init_rirb(azalia_t *az, int resuming) { - int err; + int err, i; uint16_t rirbwp; uint8_t rirbctl; @@ -1161,6 +1161,14 @@ azalia_init_rirb(azalia_t *az, int resum rirbctl = AZ_READ_1(az, RIRBCTL); AZ_WRITE_1(az, RIRBCTL, rirbctl | HDA_RIRBCTL_RIRBDMAEN | HDA_RIRBCTL_RINTCTL); + + /* wait for RIRB DMA engine is running */ + for (i = 1000; i >= 0; i--) { + if (AZ_READ_1(az, RIRBCTL) & HDA_RIRBCTL_RIRBDMAEN) + break; + DELAY(1); + } + DPRINTF(("%s: wait counter = %d\n", __func__, i)); return (0); }