NetBSD Problem Report #48792

From dholland@netbsd.org  Wed May  7 19:45:03 2014
Return-Path: <dholland@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 870BDA5851
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  7 May 2014 19:45:03 +0000 (UTC)
Message-Id: <20140507194503.1BF1D14A28C@mail.netbsd.org>
Date: Wed,  7 May 2014 19:45:03 +0000 (UTC)
From: dholland@netbsd.org
Reply-To: dholland@netbsd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: hdaudio(4) doesn't support mmap
X-Send-Pr-Version: 3.95

>Number:         48792
>Category:       kern
>Synopsis:       hdaudio(4) doesn't support mmap
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed May 07 19:50:00 +0000 2014
>Closed-Date:    
>Last-Modified:  Sun Jun 27 18:25:00 +0000 2021
>Originator:     David A. Holland
>Release:        NetBSD 6.99.40 (20140507)
>Organization:
>Environment:
System: NetBSD valkyrie 6.99.28 NetBSD 6.99.28 (VALKYRIE) #14: Tue Dec 10 15:15:49 EST 2013  dholland@valkyrie:/usr/src/sys/arch/amd64/compile/VALKYRIE amd64
Architecture: x86_64
Machine: amd64
>Description:

hdaudio(4) doesn't support mmap. grepping in src/dev/pci/hdaudio reveals

dev/pci/hdaudio/hdafg.c:        /* TODO: AUDIO_PROP_MMAP */
dev/pci/hdaudio/hdaudio.c:      .d_mmap = nommap,

One consequence of this is that sound in games/tyrquake doesn't work.

There doesn't seem to be a PR already on file for this, so I'm
creating one.

>How-To-Repeat:

>Fix:

I have no idea what this entails.

>Release-Note:

>Audit-Trail:
From: "Jonathan A. Kollasch" <jakllsch@kollasch.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48792: hdaudio(4) doesn't support mmap
Date: Fri, 9 May 2014 13:29:05 -0500

 See also kern/35961 and port-i386/42010

From: "Jonathan A. Kollasch" <jakllsch@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48792 CVS commit: src/sys/dev/pci/hdaudio
Date: Fri, 9 May 2014 20:10:49 +0000

 Module Name:	src
 Committed By:	jakllsch
 Date:		Fri May  9 20:10:49 UTC 2014

 Modified Files:
 	src/sys/dev/pci/hdaudio: hdafg.c

 Log Message:
 Enable AUDIO_PROP_MMAP in hdafg(4).

 Addresses PR#48792 and PR#35961.


 To generate a diff of this commit:
 cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/hdaudio/hdafg.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: jakllsch@NetBSD.org
State-Changed-When: Fri, 09 May 2014 20:17:15 +0000
State-Changed-Why:
existing hdafg(4) mmap support enabled, please test


State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 01 Sep 2014 03:50:35 +0000
State-Changed-Why:
tyrquake now starts, but the sound doesn't work - generates static in the
rhythm of a horse galloping.


From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/48792 (hdaudio(4) doesn't support mmap)
Date: Mon, 1 Sep 2014 03:52:31 +0000

 On Mon, Sep 01, 2014 at 03:50:35AM +0000, dholland@NetBSD.org wrote:
  > State-Changed-From-To: feedback->open
  > State-Changed-By: dholland@NetBSD.org
  > State-Changed-When: Mon, 01 Sep 2014 03:50:35 +0000
  > State-Changed-Why:
  > tyrquake now starts, but the sound doesn't work - generates static in the
  > rhythm of a horse galloping.

 My guess is that the application and the driver are disagreeing on the
 format of the mmap buffers; it doesn't sound like signed vs. unsigned
 but it could be 8-bit vs. 16-bit.

 -- 
 David A. Holland
 dholland@netbsd.org

Responsible-Changed-From-To: kern-bug-people->nat
Responsible-Changed-By: nat@NetBSD.org
Responsible-Changed-When: Mon, 08 May 2017 00:34:15 +0000
Responsible-Changed-Why:
Take.


State-Changed-From-To: open->feedback
State-Changed-By: nat@NetBSD.org
State-Changed-When: Mon, 08 May 2017 00:34:15 +0000
State-Changed-Why:
Due to recent changes in audio hw->mappage is no longer required for audio_mmap to work.
Does games/tyrquake work now with a current kernel?


State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 05 Dec 2017 22:06:35 +0000
State-Changed-Why:
As of today's kernel it still doesn't work. However, it works better than it
used to, in that the sounds coming out are recognizably similar to the sounds
that are supposed to happen (just stuttery/truncated) and this was not true
before.


Responsible-Changed-From-To: nat->kern-bug-people
Responsible-Changed-By: nat@NetBSD.org
Responsible-Changed-When: Wed, 08 May 2019 21:50:15 +0000
Responsible-Changed-Why:


From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48792 (hdaudio(4) doesn't support mmap)
Date: Sun, 27 Jun 2021 18:24:05 +0000

 On Tue, Dec 05, 2017 at 10:06:36PM +0000, dholland@NetBSD.org wrote:
  > As of today's kernel it still doesn't work. However, it works
  > better than it used to, in that the sounds coming out are
  > recognizably similar to the sounds that are supposed to happen
  > (just stuttery/truncated) and this was not true before.

 Update: with 9.99.85 of 20210623 the sound from tyrquake is more or
 less right, except that (a) it echos (no clue why this would happen)
 and (b) there's a second or two latency between the game triggering
 sounds and actually hearing them.

 -- 
 David A. Holland
 dholland@netbsd.org

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.