Alexandre Ratchov <a...@caoua.org> wrote:
> On Fri, May 24, 2024 at 04:30:52PM +0000, Ali Farzanrad wrote:
> > Hi again,
> > 
> > During my tests it seems that this version of kernel works fine:
> > 
> > # TZ=UTC cvs -Qd /cvs get -D "2024-05-17 19:30" -P src
> > 
> > But this version of kernel will cause sudden reboots without any kernel
> > panic or message after 5-60 minutes in my Minisforum UM790:
> > 
> > # TZ=UTC cvs -Qd /cvs get -D "2024-05-17 20:00" -P src
> > 
> > After investigation I found this patch could fix my problem:
> > 
> > Index: azalia.c
> > ===================================================================
> > RCS file: /home/cvs/src/sys/dev/pci/azalia.c,v
> > diff -u -p -r1.287 azalia.c
> > --- azalia.c        17 May 2024 19:43:45 -0000      1.287
> > +++ azalia.c        24 May 2024 16:26:38 -0000
> > @@ -557,6 +557,16 @@ azalia_pci_attach(struct device *parent,
> >             azalia_pci_write(sc->pc, sc->tag, ICH_PCI_MMC, reg);
> >     }
> >  
> > +   /* disable MSI for AMD Summit Ridge/Raven Ridge HD Audio */
> > +   if (PCI_VENDOR(sc->pciid) == PCI_VENDOR_AMD) {
> > +           switch (PCI_PRODUCT(sc->pciid)) {
> > +           case PCI_PRODUCT_AMD_17_HDA:
> > +           case PCI_PRODUCT_AMD_17_1X_HDA:
> > +           case PCI_PRODUCT_AMD_HUDSON2_HDA:
> > +                   pa->pa_flags &= ~PCI_FLAGS_MSI_ENABLED;
> > +           }
> > +   }
> > +
> >     /* interrupt */
> >     if (pci_intr_map_msi(pa, &ih) && pci_intr_map(pa, &ih)) {
> >             printf(": can't map interrupt\n");
> > 
> > However it breaks my front 3.5mm audio port and I should use my
> > USB-to-3.5mm audio port adapter again.
> > 
> > How may I investigate more?
> > 
> 
> could you confirm that the system reboots only while you're using the
> azalia device?

I disabled sndiod, and unplugged my USB-to-3.5mm audio adapter and also
unplugged front 3.5mm audio port, then reboot my OpenBSD and waited on
xenodm login screen for few minutes; most of the time it reboots in
less than 10 minutes... without any interaction from me, or playing
anything...

> when you apply above diff, is audio unstable or it doesn't work at
> all?

It doesn't work at all.  No input, no output.  Even sndioctl will
freeze.

However when I plug my USB-to-3.5mm audio adapter, and run sndiod with
these arguments: -f rsnd/0 -F rsnd/1
I have audio output.  However I don't have audio input for such a long
time, maybe 2 months (if it could help I can search for latest version
of kernel which my mic works with USB-to-3.5mm audio adapter).

With latest kernel front 3.5mm audio port works great, both as input and
as output; the only problem that I have with it is sudden reboots :(

Reply via email to