From: Giuliano Pochini <pochini@shiny.it>
To: Alsa-devel <alsa-devel@alsa-project.org>
Subject: [PATCH, beta] Echoaudio, add suspend/resume support
Date: Thu, 7 Jan 2010 23:44:37 +0100 [thread overview]
Message-ID: <20100107234437.33f9a2ec@Jay> (raw)
The following patched add suspend/resume support to all echoaudio drivers.
They seem to work fine, but more testing is needed. Some testing have been
performed on an IndigoIOx and a Layla3G (thanks to Mark Hills). The most
important part which has not been tested is rawmidi.
Is someone willing to try ? The following patches are against
alsa-driver-1.0.22.1, but should be possible to apply them cleanly on other
versions as well because no changes have been done recently.
1/4 Add firmware cache #1:
When CONFIG_PM is enabled the firmware cannot be released because
the driver may need it again to resume the card.
With this patch the firmware is passed as an index of the struct
firmware card_fw[] in place of a pointer. That same index is then
uses to locate the firmware in the firmware cache.
2/4 Add firmware cache #2:
This patch changes get_firmware(), free_firmware() and adds
free_firmware_cache(). The first two functions implement a very
simple cache and the latter is used to actually release all the
stored firmwares when the module is unloaded.
When CONFIG_PM is not enabled those functions act as before and
free_firmware_cache() is a nop.
3/4 Add suspend support:
This patch adds snd_echo_suspend() and snd_echo_resume() callbacks
and suspend/resume trigger event handlers.
It also makes hardware initialization and mixer setup two clearly
distinct stages, so they can be used also in the resume procedure
without messing the settings up. As a bonus all init_hw() functions
(one for each card) are a little shorter and cleaner.
4/4 patch the patch:
Updates pci/echoaudio/echoaudio.patch
The patches are here, in the same order as above:
http://www.webalice.it/g_pochini/ead/fw_cache_1.patch
http://www.webalice.it/g_pochini/ead/fw_cache_2.patch
http://www.webalice.it/g_pochini/ead/pm_suspend_10.patch
http://www.webalice.it/g_pochini/ead/echoaudio.patch.patch
Or if you prefer a single patch (54KB):
http://www.webalice.it/g_pochini/ead/all_echoaudio_suspend.patch
Please test and report, especially the rawmidi part. TIA.
--
Giuliano.
reply other threads:[~2010-01-07 22:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100107234437.33f9a2ec@Jay \
--to=pochini@shiny.it \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.