[OLPC-devel] Re: Audio suspend/resume status

Jim Gettys jg at laptop.org
Tue Jun 13 11:35:03 EDT 2006


Thank you very much for the status report and the quick experiments.  I
suspect it may be of general interest, so I'm sending it to the devel
list.
                              Best Regards,
                                  - Jim
                              

On Tue, 2006-06-13 at 22:26 +0800, Jaya Kumar wrote:
> Hi guys,
> 
> Just a note about the current status of audio suspend/resume. I just
> tested cs5535audio suspend/resume. It does not work on the OLPC board.
> 
> Here's what you will see with the current driver + the cs5535audio PM
> patch (which is in the ALSA as well as Jordan's tree):
> 
> insmod /tree/linux-2.6.17-rc5/sound/pci/cs5535audio/snd-cs5535audio.ko
> amixer set PCM 100 on && amixer set Master 100 on
> aplay /tree/test.wav
> # this will work fine, ie: you should hear something
> echo -n 3 > /sys/devices/pci0000\:00/0000\:00\:0f.3/power/state
> # this should suspend everything. i'm not getting the typical dmesg
> output i'm used to. so i suspect something weird at this point.
> aplay /tree/test.wav
> # playback is blocked as expected
> echo -n 0 > /sys/devices/pci0000\:00/0000\:00\:0f.3/power/state
> # ought to resume the playback, we appear to get interrupts but no
> sound comes out. that suggests ad1888 codec is still down.
> # nothing plays back at this point. no sound until i reload the driver
> 
> So I suspect there's a problem with the AD1888 suspend or resume
> sequence in this case even prior to attempting enhanced suspend.
> 
> Here are my notes about Howard Ho (Insyde)'s (AD1888) patch which was
> in the code drop labeled 1888:
> - the patch is for the geode driver as opposed to current work which
> is on the cs5535audio driver
> - he mentions going into PR5 mode, but what I believe we want to go to
> is Standby mode which is the 0 static power state. That is different
> from PR5 as far as I can tell. The datasheet states:
> 
> Parameter PR[K:I]1PR[6:0]1DVDD Typ AVDD Typ Unit
> Standby 111 011 1111 0 0 mA
> 
> - He mentions using alsactl to suspend/resume the codec and suggests
> using the older release of alsa to get that ioctl. I believe that path
> was deprecated. We switched to generic /sys based suspend/resume as
> shown above since alsa 1.0.11 or so.
> 
> - The code in the patch itself is not something that could be merged
> into a generic tree. For example:
> 
> pci/geode/amd_geode.c
> #ifdef CONFIG_AD1888_PM
>         snd_geode_SetPowerState(pGeode, GEODEAUDIO_D4);
> #else
>         snd_geode_SetPowerState(pGeode, GEODEAUDIO_D3);
> #endif
>         pci_disable_device(pAmd->pci);
> #ifdef CONFIG_AD1888_PM
>         snd_power_change_state(card, SNDRV_CTL_POWER_D3cold);
>         --pm_f;
> #else
>         snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
> #endif
> 
> What we need to do is something that takes advantage of ALSA's
> build_ops->suspend/resume layer so that the fix becomes generic and
> applicable to all AD1888 boards rather than a hardcoded suspend. It's
> not a lot of code to do it properly within the framework of ALSA so
> I've started doing that.
> 
> The next steps in the audio area are:
> 1. resolve current codec suspend/resume problem
> 2. develop Standby state support in ad1888 suspend/resume
> 3. add mixer control for VREFOUT disable for sensor mode.
> 
> I'll CC you guys on emails to Takashi/Jaroslav to figure out the least
> intrusive path for 2.
> 
> Thanks,
> jaya
-- 
Jim Gettys
One Laptop Per Child





More information about the Devel mailing list