[alsa-devel] Aureal issues on resume

Takashi Iwai tiwai at suse.de
Tue Sep 20 09:09:49 CEST 2011


At Sat, 17 Sep 2011 10:16:19 +0800,
Raymond Yau wrote:
> 
> 2011/9/16 Takashi Iwai <tiwai at suse.de>:
> > At Fri, 16 Sep 2011 10:16:11 +0800,
> > Raymond Yau wrote:
> >>
> >> 2011/9/12 Takashi Iwai <tiwai at suse.de>:
> >> > At Mon, 12 Sep 2011 09:53:28 +0200,
> >> > Takashi Iwai wrote:
> >> >>
> >> >> At Sun, 04 Sep 2011 22:32:44 +0200,
> >> >> Clemens Ladisch wrote:
> >> >> >
> >> >> > Raymond Yau wrote:
> >> >> > > The possible way is to save the contents of 128K memory mapped I/O
> >> >> > > ports before suspend to non-volatile memory and restore them after
> >> >> > > resume
> >> >> > >
> >> >> > > Is there any way for alsa driver to allocate non-volatile memory ?
> >> >> >
> >> >> > 'Normal' memory is saved over suspend.  Just use {k|v}malloc.
> >> >>
> >> >> If it's a 128kB bulk memory, vmalloc() is a more sensible choice.
> >> >
> >> > BTW, in many cases, you don't have to save/restore the whole mmio
> >> > region.  Instead, stop the stream, save / restore some important
> >> > registers and do the similar procedure for the normal prepare callback
> >> > in the resume, and restart the stream again.
> >> >
> >> >
> >> > Takashi
> >> >
> >>
> >> The current au8830 alsa driver seem use less than 192Kbytes out of
> >> 256Kbytes mmio
> >>
> >> http://thread.gmane.org/gmane.linux.kernel/564963/focus=47907
> >>
> >> your patch seem initialse the request queue in figure 16 of pat 6167465
> >>
> >> and the driver need to restore mixer and equalizer mmio for au8830 in figure 13
> >
> > Yeah, that's what I mentioned in the thread.
> >
> > Basically you'll need to restore the values assigned in hw_params()
> > for PCM.
> >
> 
> The error messages are due to snd_vortex_suspend() call snd_vortex_adb_init()
> 
> There are static routes for the codec, mixin, mixout and equalizer and
> dynamic routes of playback/capture streams
> 
> Those VORTEX_ADB_RTBASE and VORTEX_ADB_CHNBASE mmio ports are two
> linked list, those vortex_route_* function are adding the routes to
> the tail of those linked lists
> 
> so the only is to restore the routes since the driver does not keep
> track of the order of routes of the playback stream  or capture stream
> to the linked list
> 
> > The mixer is ac97, so it's restored by ac97_codec.c.  The rest are the
> > equalizer and a3d values to be restored separately.
> 
> I mean the hardware mixer (mixin and mixout) inside au88x0 chip.
> 
> May be need to initialise mpu401_uart or joystick
> 
> 
> Is there any way to force the system to suspend, it seem that gnome
> power management in Fedora 10 does not provide any way to suspend
> while playing an audio ? ( screen saver set to 1 minutes, put the
> computer into sleep when inactive for 2 minutes )

See files in Documentation/power directory.
You may call s2ram, powersave, or whatever command directly, too.


Takashi


More information about the Alsa-devel mailing list