NetBSD Problem Report #52256
From Manuel.Bouyer@lip6.fr Wed May 24 11:48:27 2017
Return-Path: <Manuel.Bouyer@lip6.fr>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 4B6957A1FD
for <gnats-bugs@gnats.NetBSD.org>; Wed, 24 May 2017 11:48:27 +0000 (UTC)
Message-Id: <20170524114823.60F73A91F@armandeche.soc.lip6.fr>
Date: Wed, 24 May 2017 13:48:23 +0200 (MEST)
From: Manuel.Bouyer@lip6.fr
Reply-To: Manuel.Bouyer@lip6.fr
To: gnats-bugs@NetBSD.org
Subject: panic: audio_init_ringbuffer: blksize=0
X-Send-Pr-Version: 3.95
>Number: 52256
>Category: kern
>Synopsis: panic: audio_init_ringbuffer: blksize=0
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: nat
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 24 11:50:00 +0000 2017
>Closed-Date: Mon May 29 21:44:13 +0000 2017
>Last-Modified: Mon May 29 21:44:13 +0000 2017
>Originator: Manuel Bouyer
>Release: NetBSD 7.99.72
>Organization:
>Environment:
System: NetBSD 7.99.72 NetBSD 7.99.72 (CUBIEBOARD) evbarm
Architecture: earmv7hf
Machine: evbarm
>Description:
running the test program from kern/52196, portaudio2 will try to open
all available audio devices, including audio1 which is:
awinhdmiaudio0 at awinio0: HDMI 1.3
audio1 at awinhdmiaudio0: half duplex, playback, mmap
awinhdmiaudio0: Virtual format configured - Format SLINEAR, precision 16, channels 2, frequency 48000
and this causes this panic:
login: panic: audio_init_ringbuffer: blksize=0
cpu0: Begin traceback...
0xb7d3db7c: netbsd:db_panic+0xc
0xb7d3db94: netbsd:vpanic+0x1b4
0xb7d3dbac: netbsd:snprintf
0xb7d3dbd4: netbsd:audio_initbufs
0xb7d3dcb4: netbsd:audio_open+0x40c
0xb7d3dcec: netbsd:audioopen+0xbc
0xb7d3dd5c: netbsd:spec_open+0x204
0xb7d3dd84: netbsd:VOP_OPEN+0x44
0xb7d3de5c: netbsd:vn_open+0x250
0xb7d3dedc: netbsd:do_open+0xb0
0xb7d3df0c: netbsd:do_sys_openat+0x7c
0xb7d3df34: netbsd:sys_open+0x38
0xb7d3dfac: netbsd:syscall+0x108
cpu0: End traceback...
awinhdmiaudio0 is play only, it can't record.
I tried this patch:
--- sys/arch/arm/allwinner/awin_hdmiaudio.c 19 Nov 2015 18:48:22 -0000 1.6
+++ sys/arch/arm/allwinner/awin_hdmiaudio.c 24 May 2017 11:46:37 -0000
@@ -225,7 +225,7 @@ awin_hdmiaudio_attach(device_t parent, d
return;
}
- sc->sc_format.mode = AUMODE_PLAY|AUMODE_RECORD;
+ sc->sc_format.mode = AUMODE_PLAY;
sc->sc_format.encoding = AUDIO_ENCODING_SLINEAR_LE;
sc->sc_format.validbits = 16;
sc->sc_format.precision = 16;
but it didn't help
>How-To-Repeat:
open audio1 on a cubieboard (or other allwinner-based board I guess)
>Fix:
workaround: disable awinhdmiaudio in kernel config
>Release-Note:
>Audit-Trail:
From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/52256 CVS commit: src/sys/dev
Date: Sat, 27 May 2017 13:55:58 +0000
Module Name: src
Committed By: nat
Date: Sat May 27 13:55:58 UTC 2017
Modified Files:
src/sys/dev: audio.c
Log Message:
Be even more carefull with devices that support only play back OR capture.
Addresses PR kern/52256.
To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 src/sys/dev/audio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: kern-bug-people->nat
Responsible-Changed-By: nat@NetBSD.org
Responsible-Changed-When: Sun, 28 May 2017 01:33:47 +0000
Responsible-Changed-Why:
Take.
State-Changed-From-To: open->feedback
State-Changed-By: nat@NetBSD.org
State-Changed-When: Sun, 28 May 2017 01:33:47 +0000
State-Changed-Why:
This should be fixed in a commit on May 27 to audio.c.
Does it work for you with the lastest version of audio.c?
From: Manuel Bouyer <manuel.bouyer@lip6.fr>
To: gnats-bugs@NetBSD.org
Cc: nat@NetBSD.org, kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org
Subject: Re: kern/52256 (panic: audio_init_ringbuffer: blksize=0)
Date: Mon, 29 May 2017 15:31:32 +0200
On Sun, May 28, 2017 at 01:33:47AM +0000, nat@NetBSD.org wrote:
> Synopsis: panic: audio_init_ringbuffer: blksize=0
>
> Responsible-Changed-From-To: kern-bug-people->nat
> Responsible-Changed-By: nat@NetBSD.org
> Responsible-Changed-When: Sun, 28 May 2017 01:33:47 +0000
> Responsible-Changed-Why:
> Take.
>
>
> State-Changed-From-To: open->feedback
> State-Changed-By: nat@NetBSD.org
> State-Changed-When: Sun, 28 May 2017 01:33:47 +0000
> State-Changed-Why:
> This should be fixed in a commit on May 27 to audio.c.
> Does it work for you with the lastest version of audio.c?
With today's kernel and
awinhdmiaudio0 at awinio0: HDMI 1.3
audio1 at awinhdmiaudio0: half duplex, playback, mmap
I don't get the panic any longer with my portaudio test program.
I didn't try to play to audio1 though (I don't have audio-enabled HDMI display)
thanks !
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
NetBSD: 26 ans d'experience feront toujours la difference
--
State-Changed-From-To: feedback->closed
State-Changed-By: nat@NetBSD.org
State-Changed-When: Mon, 29 May 2017 21:44:13 +0000
State-Changed-Why:
Confirmed fixed. Thanks!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.