[OLPC-devel] Re: Audio suspend/resume status
Jim Gettys
jg at laptop.org
Wed Jun 14 11:22:04 EDT 2006
Jaya, Jordan, Marcelo,
We're having trouble getting *any* audio input to work, much less the
analog input "sensor" mode to work.
If any of you have time to look into this, it would be greatly
appreciated.
Regards,
- Jim Gettys
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
-------------- next part --------------
An embedded message was scrubbed...
From: "Mark J. Foster" <mfoster at laptop.org>
Subject: Re: "Sensor Mode" and A-Test Schematics
Date: Wed, 07 Jun 2006 14:01:03 -0700
Size: 891283
URL: <http://lists.laptop.org/pipermail/devel/attachments/20060614/594b2997/attachment.mht>
More information about the Devel
mailing list