On Tue, Jan 03, 2023 at 09:51:46PM -0400, Jose Maldonado wrote:
> Hi, everyone!
> 
> Right now I'm using OBSD 7.2 (my first time in OBSD) and the only issue is
> my onboard audio. The audio randomly stuck (listen music or not, with high
> CPU use or not) and only a hard reboot give me back audio to next stuck.
> 
> In dmesg donĀ“t show nothing, but sndiod -dddd give me this output:
> 
> * snd/0 watchdog timeout *
> 
> The error appear in debug info and my audio is gone. The issue is not new
> more info in this links:
> 
> https://www.reddit.com/r/openbsd/comments/mybklx/keep_losing_audio_with_azalia_on_current/
> 
> https://www.mail-archive.com/tech@openbsd.org/msg46701.html
> 
> https://deftly.net/posts/2018-10-15-openbsd-on-lenovo-a485.html
> 
> With this info I realized this patch (directly on OBSD-stable source, sorry)
> and...work! Not audio problems in my PC using this patch (one day testing,
> multiple apps using audio, not stuck/not latency problems).
> 
> If anybody can test, verify and give OK to this simple patch, I would
> appreciate it (and I'm sure others would too, specially living in -release
> versions).
> 
> PATCH:
> 
> Index: azalia_codec.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v
> retrieving revision 1.189
> diff -u -p -u -r1.189 azalia_codec.c
> --- azalia_codec.c    8 Sep 2022 01:35:39 -0000       1.189
> +++ azalia_codec.c    2 Jan 2023 19:42:28 -0000
> @@ -312,6 +312,9 @@ azalia_codec_init_vtbl(codec_t *this)
>               break;
>       case 0x10ec0892:
>               this->name = "Realtek ALC892";
> +             if (this->subid == 0x1462ec95) {
> +                     this->qrks |= AZ_QRK_WID_CDIN_1C | AZ_QRK_WID_BEEP_1D;
> +             }
>               break;
>       case 0x10ec0897:
>               this->name = "Realtek ALC897";
> 
> 

Your device seems to stop because the azalia pci host stops (probably
interrupts stop and a reboot is needed), while this diff is about the
azalia codec (i.e. about handling the "analog" parts). So, I'm very
surprised this fixes the random audio hangs (though any strange
interaction between the host and the codec can't be excluded).

Are there other changes that may have fixed audio? Any BIOS tweaks?
Suspend-resume cycles? Any devices disabled meanwhile?

Could you test with and without the diff applied in exactly the same
conditions?

These hangs are a longstanding problem (and hard to debug because of
the randomness of the hangs), so I'm very intested in understanding
what's causing it. Thanks

Reply via email to