linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Minor bugs in via_dsp_release in via82cxxx_audio.c in 2.4.22
@ 2003-12-09 18:08 Chad Kitching
  0 siblings, 0 replies; only message in thread
From: Chad Kitching @ 2003-12-09 18:08 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

There are two bugs in the via_dsp_release function for this sound driver.
The first is just a typo, that prevents it from suppressing "via_audio: 
ignoring drain playback error -512" errors.  

The other bug (which I don't know the correct way to fix) in this same 
area is the "via_audio: ignoring drain playback error -11", which is 
caused when the via_dsp_drain_playback is called with nonblock != 0, and 
the function returns -EAGAIN.  Setting nonblock to zero certainly 
supresses the error, but I'm not sure what the dangers of blocking in the 
release function would be when an application specifically requests non-
blocking.  Ignoring this error as with -ERESTARTSYS is also possible (and 
would cause no more harm than currently happens).

Both bugs are pretty minor, I was just getting annoyed with my logfiles filling up with useless messages.

[-- Attachment #2: viaaud.diff --]
[-- Type: application/octet-stream, Size: 555 bytes --]

--- linux-2.4.22/drivers/sound/via82cxxx_audio.c.orig	2003-12-09 11:49:03.000000000 -0600
+++ linux-2.4.22/drivers/sound/via82cxxx_audio.c	2003-12-09 11:49:21.000000000 -0600
@@ -3363,7 +3363,7 @@
 
 	if (file->f_mode & FMODE_WRITE) {
 		rc = via_dsp_drain_playback (card, &card->ch_out, nonblock);
-		if (rc && rc != ERESTARTSYS)	/* Nobody needs to know about ^C */
+		if (rc && rc != -ERESTARTSYS)	/* Nobody needs to know about ^C */
 			printk (KERN_DEBUG "via_audio: ignoring drain playback error %d\n", rc);
 
 		via_chan_free (card, &card->ch_out);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-09 18:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-09 18:08 Minor bugs in via_dsp_release in via82cxxx_audio.c in 2.4.22 Chad Kitching

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).