All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: Mark Hahn <hahn@physics.mcmaster.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: i810_audio driver v0.19 still freezes machine
Date: Thu, 10 Jan 2002 16:34:01 -0500	[thread overview]
Message-ID: <3C3E08C9.6030701@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0201101513410.31079-100000@coffee.psychology.mcmaster.ca>

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

Mark Hahn wrote:

>>So it hangs with artsd then?  Get me the output of ps ax | grep artsd and 
>>that will tell me the artsd configuration on both machines.  Also, just 
>>using artsd is all you are doing, not anything else to trigger the lockup?
>>
> 
> to be honest, I haven't a clue - I've never looked at audio
> stuff much.  on the bad machine, it plays a few silly kde
> sound effects, and then everything stops.  (RH 7.2, 2.4.18-pre2
> and your i810.c)


Duh!!!  All of the reports thus far have been artsd.  My guess is that we 
are getting a signal during drain_dac() and returning with -ERESTARTSYS on 
close.  Well, as it turns out i810_release() isn't checking the return value 
of drain_dac() and if we take a signal in drain_dac() then i810_release() 
releases the card's data structs without actually shutting down the card: 
Lockup.  So, try this patch and see if it doesn't solve your problem.





-- 

  Doug Ledford <dledford@redhat.com>  http://people.redhat.com/dledford
       Please check my web site for aic7xxx updates/answers before
                       e-mailing me about problems

[-- Attachment #2: test.patch --]
[-- Type: text/plain, Size: 822 bytes --]

--- i810_audio.c.19	Wed Jan  9 04:58:41 2002
+++ i810_audio.c.20	Thu Jan 10 16:32:29 2002
@@ -1739,7 +1739,8 @@ static int i810_ioctl(struct inode *inod
 #endif
 		if (dmabuf->enable != DAC_RUNNING || file->f_flags & O_NONBLOCK)
 			return 0;
-		drain_dac(state);
+		if(val = drain_dac(state))
+			return val;
 		dmabuf->total_bytes = 0;
 		return 0;
 
@@ -2417,12 +2418,16 @@ static int i810_release(struct inode *in
 	struct i810_card *card = state->card;
 	struct dmabuf *dmabuf = &state->dmabuf;
 	unsigned long flags;
+	int ret;
 
 	lock_kernel();
 
 	/* stop DMA state machine and free DMA buffers/channels */
 	if(dmabuf->trigger & PCM_ENABLE_OUTPUT) {
-		drain_dac(state);
+		if(ret = drain_dac(state)) {
+			unlock_kernel();
+			return ret;
+		}
 	}
 	if(dmabuf->trigger & PCM_ENABLE_INPUT) {
 		stop_adc(state);

       reply	other threads:[~2002-01-10 21:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.33.0201101513410.31079-100000@coffee.psychology.mcmaster.ca>
2002-01-10 21:34 ` Doug Ledford [this message]
2002-01-10 10:58 i810_audio driver v0.19 still freezes machine Andris Pavenis
2002-01-10 18:16 ` Doug Ledford
2002-01-10 19:35   ` Alan Cox
2002-01-10 19:26     ` Doug Ledford
2002-01-11  7:42       ` Andris Pavenis
2002-01-11  8:44         ` Doug Ledford
2002-01-11 11:47           ` Andris Pavenis
2002-01-11 15:54             ` Doug Ledford
2002-01-11 18:25               ` Andris Pavenis
2002-01-11  9:28   ` Martin Dalecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C3E08C9.6030701@redhat.com \
    --to=dledford@redhat.com \
    --cc=hahn@physics.mcmaster.ca \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.