All of lore.kernel.org
 help / color / mirror / Atom feed
* hda-intel "nobody cared"
@ 2006-08-16 19:57 Ben B
  2006-08-16 20:24 ` Lee Revell
  0 siblings, 1 reply; 5+ messages in thread
From: Ben B @ 2006-08-16 19:57 UTC (permalink / raw)
  To: alsa-devel


I've been trying to get pesky suspend/resume working on an HP NC6400
notebook, and have got almost everything worked out except for audio
resume, which is not quite right.

During a suspend, if any process has the DSP devices open, upon resume I
see the following kernel message:

[ 3493.252000] irq 177: nobody cared (try booting with the "irqpoll" option)
[ 3493.252000]  [<c0148bc4>] __report_bad_irq+0x24/0x90
[ 3493.252000]  [<c0148e48>] note_interrupt+0x218/0x250
[ 3493.252000]  [<c0148113>] handle_IRQ_event+0x3 3/0x70
[ 3493.252000]  [<c0148252>] __do_IRQ+0x102/0x120
[ 3493.252000]  [<c0105b41>] do_IRQ+0x31/0x70
[ 3493.252000]  [<c0103bba>] common_interrupt+0x1a/0x20
[ 3493.252000]  [<f8b0a6c9>] acpi_processor_idle+0x1ec/0x37f [processor]
[ 3493.252000]  [<c0101d96>] cpu_idle+0x76/0xd0
[ 3493.252000]  [<c03c4230>] unknown_bootoption+0x0/0x270
[ 3493.252000]  [<c03c47c6>] start_kernel+0x326/0x3b0
[ 3493.252000]  [<c03c4230>] unknown_bootoption+0x0/0x270
[ 3493.252000] handlers:
[ 3493.252000] [<f8979ba0>] (azx_interrupt+0x0/0x150 [snd_hda_intel])
[ 3493.252000] Disabling IRQ #177

If I make sure all DSP-hogging processes are closed before suspend,
things are fine on resume, but this is not practical with current
desktop environments.

I also tried booting with "irqpoll", and yes that basically solved it,
but it made the machine eventually hard freeze.

More info:

bb@gromit:/proc/asound$ cat version
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22
13:55:50 2006 UTC).
bb@gromit:/proc/asound$ cat cards
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xf4780000 irq 177

I tried booting with "acpi=noirq" and the irq changed to 10, and then
upon suspend/resume with dsp open, the next time anything tries to write
to the dsp, the process hangs whilst opening the device.

So I'm hoping that the intel hda driver can be made to handle this a
little more gracefully.

Ben


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hda-intel "nobody cared"
  2006-08-16 19:57 hda-intel "nobody cared" Ben B
@ 2006-08-16 20:24 ` Lee Revell
  2006-08-16 21:08   ` Ben B
  0 siblings, 1 reply; 5+ messages in thread
From: Lee Revell @ 2006-08-16 20:24 UTC (permalink / raw)
  To: Ben B; +Cc: alsa-devel

On Wed, 2006-08-16 at 21:57 +0200, Ben B wrote:
> I've been trying to get pesky suspend/resume working on an HP NC6400
> notebook, and have got almost everything worked out except for audio
> resume, which is not quite right.
> 
> During a suspend, if any process has the DSP devices open, upon resume I
> see the following kernel message:
> 

By DSP do you literally mean /dev/dsp (aka ALSA's OSS emulation), or do
you mean any process that uses an audio device?  ALSA does not
use /dev/dsp.

Is there any difference in behavior if you configure your apps to use
OSS vs. ALSA?

Lee



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hda-intel "nobody cared"
  2006-08-16 20:24 ` Lee Revell
@ 2006-08-16 21:08   ` Ben B
  2006-08-16 21:16     ` Lee Revell
  0 siblings, 1 reply; 5+ messages in thread
From: Ben B @ 2006-08-16 21:08 UTC (permalink / raw)
  To: Lee Revell; +Cc: alsa-devel

Lee Revell <rlrevell@joe-job.com> uttered the following thing:
> On Wed, 2006-08-16 at 21:57 +0200, Ben B wrote:
> > I've been trying to get pesky suspend/resume working on an HP NC6400
> > notebook, and have got almost everything worked out except for audio
> > resume, which is not quite right.
> > 
> By DSP do you literally mean /dev/dsp (aka ALSA's OSS emulation), or do
> you mean any process that uses an audio device?  ALSA does not
> use /dev/dsp.

By DSP I mean something that plays audio (eg as opposed to mixer or
midi devices) via ALSA.

> Is there any difference in behavior if you configure your apps to use
> OSS vs. ALSA?

I just had more of a poke around and it seems I'm only getting this
problem when artsd is running under KDE. Artsd is configured to use
ALSA, as so:

  artsd -F 10 -S 4096 -a alsa -d -s 30 -m artsmessage -c drkonqui -l -f

If I kill artsd and then suspend whilst audio is playing via another app,
in this case ogg123, both with OSS and ALSA output devices configured, 
I don't get the problem.

Perhaps this could go to the arts people, but I think if I'm seeing a
kernel problem, then this should be dealt with in the kernel drivers.

Ben


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hda-intel "nobody cared"
  2006-08-16 21:08   ` Ben B
@ 2006-08-16 21:16     ` Lee Revell
  2006-08-17 15:09       ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Lee Revell @ 2006-08-16 21:16 UTC (permalink / raw)
  To: Ben B; +Cc: alsa-devel

On Wed, 2006-08-16 at 23:08 +0200, Ben B wrote:
> Lee Revell <rlrevell@joe-job.com> uttered the following thing:
> > On Wed, 2006-08-16 at 21:57 +0200, Ben B wrote:
> > > I've been trying to get pesky suspend/resume working on an HP NC6400
> > > notebook, and have got almost everything worked out except for audio
> > > resume, which is not quite right.
> > > 
> > By DSP do you literally mean /dev/dsp (aka ALSA's OSS emulation), or do
> > you mean any process that uses an audio device?  ALSA does not
> > use /dev/dsp.
> 
> By DSP I mean something that plays audio (eg as opposed to mixer or
> midi devices) via ALSA.
> 

OK.

> > Is there any difference in behavior if you configure your apps to use
> > OSS vs. ALSA?
> 
> I just had more of a poke around and it seems I'm only getting this
> problem when artsd is running under KDE. Artsd is configured to use
> ALSA, as so:
> 
>   artsd -F 10 -S 4096 -a alsa -d -s 30 -m artsmessage -c drkonqui -l -f
> 
> If I kill artsd and then suspend whilst audio is playing via another app,
> in this case ogg123, both with OSS and ALSA output devices configured, 
> I don't get the problem.
> 
> Perhaps this could go to the arts people, but I think if I'm seeing a
> kernel problem, then this should be dealt with in the kernel drivers.

Yes, it's certainly a kernel problem (though it may be with ACPI rather
than the sound driver).  It's interesting that some apps work and some
don't.  Can you try some more sound applications?  It might help narrow
down the problem.

Lee


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hda-intel "nobody cared"
  2006-08-16 21:16     ` Lee Revell
@ 2006-08-17 15:09       ` Takashi Iwai
  0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2006-08-17 15:09 UTC (permalink / raw)
  To: Lee Revell; +Cc: alsa-devel

At Wed, 16 Aug 2006 17:16:06 -0400,
Lee Revell wrote:
> 
> > > Is there any difference in behavior if you configure your apps to use
> > > OSS vs. ALSA?
> > 
> > I just had more of a poke around and it seems I'm only getting this
> > problem when artsd is running under KDE. Artsd is configured to use
> > ALSA, as so:
> > 
> >   artsd -F 10 -S 4096 -a alsa -d -s 30 -m artsmessage -c drkonqui -l -f
> > 
> > If I kill artsd and then suspend whilst audio is playing via another app,
> > in this case ogg123, both with OSS and ALSA output devices configured, 
> > I don't get the problem.
> > 
> > Perhaps this could go to the arts people, but I think if I'm seeing a
> > kernel problem, then this should be dealt with in the kernel drivers.
> 
> Yes, it's certainly a kernel problem (though it may be with ACPI rather
> than the sound driver).  It's interesting that some apps work and some
> don't.  Can you try some more sound applications?  It might help narrow
> down the problem.

Actually, it's a bit strange that the irq is issued there.
All the PCM substreams have to be marked as suspended and the
power-lock is set, no new or restarted stream should occur after
suspend.

If it's a problem with irq handling, the patch below might help. 
A similar trick is implemented in intel8x0.c that had shown problems
with some devices.


Takashi

diff -r 3a8525957a59 pci/hda/hda_intel.c
--- a/pci/hda/hda_intel.c	Thu Aug 17 16:59:28 2006 +0200
+++ b/pci/hda/hda_intel.c	Thu Aug 17 17:04:45 2006 +0200
@@ -1355,6 +1355,8 @@ static int azx_suspend(struct pci_dev *p
 		snd_pcm_suspend_all(chip->pcm[i]);
 	snd_hda_suspend(chip->bus, state);
 	azx_free_cmd_io(chip);
+	if (chip->irq >= 0)
+		free_irq(chip->irq, chip);
 	pci_disable_device(pci);
 	pci_save_state(pci);
 	return 0;
@@ -1368,6 +1370,9 @@ static int azx_resume(struct pci_dev *pc
 	pci_restore_state(pci);
 	pci_enable_device(pci);
 	pci_set_master(pci);
+	request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
+		    "HDA Intel", chip);
+	chip->irq = pci->irq;
 	azx_init_chip(chip);
 	snd_hda_resume(chip->bus);
 	snd_power_change_state(card, SNDRV_CTL_POWER_D0);

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-08-17 15:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-16 19:57 hda-intel "nobody cared" Ben B
2006-08-16 20:24 ` Lee Revell
2006-08-16 21:08   ` Ben B
2006-08-16 21:16     ` Lee Revell
2006-08-17 15:09       ` Takashi Iwai

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.