NetBSD Problem Report #56166
From www@netbsd.org Fri May 14 13:57:56 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 1B3281A9243
for <gnats-bugs@gnats.NetBSD.org>; Fri, 14 May 2021 13:57:56 +0000 (UTC)
Message-Id: <20210514135754.D82C21A9287@mollari.NetBSD.org>
Date: Fri, 14 May 2021 13:57:54 +0000 (UTC)
From: nia@pkgsrc.org
Reply-To: nia@pkgsrc.org
To: gnats-bugs@NetBSD.org
Subject: audioplay fails to play 24-bit wave files
X-Send-Pr-Version: www-1.0
>Number: 56166
>Category: bin
>Synopsis: audioplay fails to play 24-bit wave files
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 14 14:00:00 +0000 2021
>Last-Modified: Fri May 14 16:25:00 +0000 2021
>Originator: nia
>Release: current
>Organization:
>Environment:
current
>Description:
audioplay expects to be able to pass the kernel audio stack raw 24-bit
PCM, but this doesn't work. the kernel only supports 8/16/32-bit PCM
PCM, so it fails with EINVAL.
>How-To-Repeat:
play a 24-bit wave file with audioplay
>Fix:
audioplay should pack the 24-bit samples into 32-bit samples,
as libao in pkgsrc does.
>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/56166: audioplay fails to play 24-bit wave files
Date: Fri, 14 May 2021 15:15:35 -0000 (UTC)
nia@pkgsrc.org writes:
>audioplay expects to be able to pass the kernel audio stack raw 24-bit
>PCM, but this doesn't work. the kernel only supports 8/16/32-bit PCM
>PCM, so it fails with EINVAL.
You could enable the 24bit code in the audio driver:
/*
* Whether supports [US]LINEAR24/24 as userland format.
*/
/* #define AUDIO_SUPPORT_LINEAR24 */
From: nia <nia@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/56166: audioplay fails to play 24-bit wave files
Date: Fri, 14 May 2021 16:22:15 +0000
On Fri, May 14, 2021 at 03:20:01PM +0000, Michael van Elst wrote:
> From: mlelstv@serpens.de (Michael van Elst)
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: bin/56166: audioplay fails to play 24-bit wave files
> Date: Fri, 14 May 2021 15:15:35 -0000 (UTC)
>
> nia@pkgsrc.org writes:
>
> >audioplay expects to be able to pass the kernel audio stack raw 24-bit
> >PCM, but this doesn't work. the kernel only supports 8/16/32-bit PCM
> >PCM, so it fails with EINVAL.
>
> You could enable the 24bit code in the audio driver:
>
> /*
> * Whether supports [US]LINEAR24/24 as userland format.
> */
> /* #define AUDIO_SUPPORT_LINEAR24 */
>
>
I'm not sure the 24-bit format in the kernel is correct.
Solaris does not natively handle 24-bit precision from
userspace - https://illumos.org/man/7i/audio
The OSS 24-bit format is packed into a 32-bit integer -
http://manuals.opensound.com/developer/formats.html,
while the format in the NetBSD kernel is purely 24-bit
IIRC.
I think it is better to use 32-bit to avoid ambiguity.
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.