Kernel Bug Tracker – Bug 7220
saa7134: no sound after suspend to disk
Last modified: 2007-10-12 03:18:03 UTC
I have observed the following problem with all kernels I tried
(up to 2.6.18-rc6-mm2):
After suspend-from-disk, everything works fine except for my saa7134
card: The picture is still fine, but there is no sound.
It seems saa7134 needs some initialization after resume?
Try unloading/reloading saa7134 around resume. If that helps, port insmod/rmmod
parts of the driver into suspend/resume and you are done.
It does help, but I failed to get this "porting" done in a working way when I
To initialize the board after resume, you will need parts of saa7134_initdev, like:
/* initialize hardware #1 */
/* initialize hardware #2 */
Taking a closer look at the code, I suspect we will need to split some hardware
initialization code there from the subsystem initializations taken in place by
those init stuff.
For unregister, it calls:
You should notice, however, that some of the code called by fini will unregister
some devices (like input). So, you will need to do a better check on that. At a
first glance, i would just call, at suspend:
to disable audio output.
Is the bug still present in 2.6.22-rc3 and/or in the latest -git ?
The code is in (I see it in 2.6.22-rc4), just needs some testing and the bug can be closed.
Adrian, can you please try it and confirm the code works now?
Sorry, I somehow didn't get around to test this one.
I tested with 2.6.23-rc2:
The good news is:
Sound works after resuming when I'm not watching TV when suspending.
The bad news is:
I wanted to know whether it also works when watching TV while suspending, so I tried watching analog TV with tvtime and DVB-T with kaffeine (the card supports doing both at the same time) when suspending.
During suspend I got kernel BUG at drivers/media/video/video-buf-dvb.c:59.
Bad page state in process 'tvtime'
page:c15b0e40 flags:0x40000000 mapping:00000000 mapcount:0 count:-1
Trying to fix it up, but a reboot is needed
After resuming processes randomly (but quickly) segfaulted.
After typing in a console "shutdown -h now" the kernel panic'ed.
Created attachment 12355 [details]
Hm, the bug was triggered during the freezing of tasks.
I think this patch will help:
[You'll need to apply the previous patches from the series before it.]
There are also another fix removing the BUG_ON() on video-buf-dvb that may help:
I just tried 2.6.23-rc3-mm1 that contains both patches, and except for some minor issues it's now working fine: :-)
When only running tvtime (analog TV) when suspending tvtime continues running after resuming (perfect!).
When only running kaffeine (DVB-T) when suspending, kaffeine only shows a freeze frame after resuming. After closing and restarting kaffeine it works again.
Most likely the tuning of the device wasn't restored when resuming?
When running both tvtime and kaffeine when suspending, kaffeine has the problem described above plus tvtime doesn't has sound. After closing both applications and restarting them it works again.
After the latest v4l-dvb merge into Linus' tree everything is working fine. :-)
I don't even have to restart kaffeine anymore (only the channel needs to be reselected).
tvtime also continues to work when both were running (but this might also have improved due to me switching to saa7134-alsa).
Thanks a lot for these improvements!