At Sat, 1 Sep 2007 11:11:24 +0300, Maxim Levitsky wrote: > > On Friday 31 August 2007 13:56:19 Takashi Iwai wrote: > > At Tue, 28 Aug 2007 12:46:01 +0200, > > I wrote: > > > > > > At Tue, 28 Aug 2007 05:07:48 +0300, > > > Maxim Levitsky wrote: > > > > > > > > From c9392b0293f7d39e40e4a5e07e7b140d5a385079 Mon Sep 17 00:00:00 2001 > > > > From: Maxim Levitsky <maximlevitsky@xxxxxxxxx> > > > > Date: Mon, 27 Aug 2007 22:49:49 +0300 > > > > Subject: [PATCH] HDA : patch_sigmatel.c : cleanups > > > > > > OK, it's a nice clean-up. Can be merged as is. > > > > Now merged to ALSA HG tree. > > > > If the fixes for other patches are ready, please let me know. > > I'll merge them to HG tree, too. > > > > > > Thanks, > > > > Takashi > > > > > Hi, > > I run into unexpected problems: > latest hg adds a power saving mode to hda codec, and while the idea is nice, it plays very bad with my patches. > > 1) The analog loop-back becomes a nightmare, since power-saving code turns the codec off, but for loopback to function it has to be powered. > I tried to add a snd_hda_power_up/down calls to .put function, and while it did stop the unwanted powerdown of codec, on resume from ram , analog loopback vanishes. > any access to device (arecord/aplay or any mixer change make analog loop work again). > Can you tell me how I properly tell the core that user _uses_ the device, and device should be powered. > > 2) on resume all playback apps hang, and recording (arecord) exits with message "Resource temporary unavailable" > restarting apps help. First, you need to use snd_hda_codec_write_cache() for values to be resumed, especially in control put callbacks. The amp values accessed via snd_hda_codec_amp_update() are always cached, but snd_hda_codec_write() doesn't cache. The second thing is analog-loopback. The driver should keep the power when the analog-loopback is on, and enables power-saving again when it's off. So far, I thought only the amp controls, but now it's a different one. In this case, the put callback would need to call snd_hda_pwoer_up() and snd_hda_power_down() appropriately to turn on/off power-save. They should be called only at transition. Namely, when 0->1 transition of spec->aloopback occurs in put callback, it calls snd_hda_power_up(). When 1->0 occurs, call snd_hda_power_down(). Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel