NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/51707 (playing audio with mpg123 on sparc crashes)



The following reply was made to PR kern/51707; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: nat%NetBSD.org@localhost
Subject: Re: kern/51707 (playing audio with mpg123 on sparc crashes)
Date: Sun, 22 Jan 2017 14:56:13 +0100

 After fixes for PR kern/51703 went in, this started happening again, right
 at attach time.
 
 A simple fix is to avoid 0 blocksize returns form the MI round_blocksize
 function:
 
 Index: cs4231_ebus.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/ebus/cs4231_ebus.c,v
 retrieving revision 1.35
 diff -u -r1.35 cs4231_ebus.c
 --- cs4231_ebus.c	23 Nov 2011 23:07:31 -0000	1.35
 +++ cs4231_ebus.c	22 Jan 2017 13:53:57 -0000
 @@ -268,9 +268,13 @@
  cs4231_ebus_round_blocksize(void *addr, int blk, int mode,
  			    const audio_params_t *param)
  {
 +	int sz;
  
  	/* we want to use DMA burst size of 16 words */
 -	return blk & -64;
 +	sz = blk & -64;
 +	if (sz == 0)
 +		sz = 64;	/* zero is not a good blocksize */
 +	return sz;
  }
  
  
 
 This should be done anyway, but maybe this is indicator of some other problem?
 
 Martin
 


Home | Main Index | Thread Index | Old Index