snd_hda suspend/resume support

Alexander Motin mav at
Tue Sep 9 23:08:57 UTC 2008

Rui Paulo wrote:
> On Tue, Sep 09, 2008 at 03:36:45PM +0300, Alexander Motin wrote:
>> Rui Paulo wrote:
>>> On Tue, Sep 09, 2008 at 12:12:15AM +0300, Alexander Motin wrote:
>>>> Rui Paulo wrote:
>>>>> Great work! This works fine! I just wish I didn't had to stop my media
>>>>> player before resume. That probably needs more work on the sound layer.
>>>> When I am calling suspend and resume myself on alive system for several 
>>>> seconds playback restores fine. Whats happening if you don't stop media 
>>>> player?
>>> No sound is output after resume. I can't play anything after resume and
>>> only a reboot fixes it (kldunload/kldload doesn't do the job).
>> Any errors? Player progress bar is moving? What happens if you press
>> stop and then play?
> No errors whatsoever. I hear nothing if I press stop and then play.

I have changed suspend/resume sequences a bit. Now I am doing more 
complete codec power up on resume. On my system I am able to call 
suspend() and then 15 seconds later resume() call successfully restores 
the sound after complete HDA controller, bus and codecs.

If you still have a problem - try to reproduce my experiment using 
temporal hack in a last version:
sysctl dev.hdac.0.pindump=100  <= hdac_suspend()
sysctl dev.hdac.0.pindump=101  <= hdac_resume()

Also I have made suspend() to left HDA bus in reset state which saves 
about 200mW of power according to my laptop battery stats.

Alexander Motin

More information about the freebsd-multimedia mailing list