From: Maxim Levitsky <maximlevitsky@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, mranostay@embeddedalley.com
Subject: [PATCH 001] fix a race in dynamic power managment
Date: Mon, 3 Sep 2007 15:16:12 +0300 [thread overview]
Message-ID: <200709031516.12768.maximlevitsky@gmail.com> (raw)
In-Reply-To: <200709031514.57875.maximlevitsky@gmail.com>
>From 90380fbb9865dda45a5be8085ef556f3ce203244 Mon Sep 17 00:00:00 2001
From: Maxim Levitsky <maximlevitsky@gmail.com>
Date: Mon, 3 Sep 2007 14:01:52 +0300
Subject: [PATCH] fix a race in dynamic power managment
codec->power_transition is supposed to be true while codec is going to be shut off
if in the mean time somebody calls snd_hda_power_up, hda_power_work will not shut down the codec,
but nether will clear codec->power_transition, thus it stays on forever. Fix this
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
---
pci/hda/hda_codec.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/pci/hda/hda_codec.c b/pci/hda/hda_codec.c
index 46d4253..08104e2 100644
--- a/pci/hda/hda_codec.c
+++ b/pci/hda/hda_codec.c
@@ -2195,8 +2195,10 @@ static void hda_power_work(struct work_struct *work)
struct hda_codec *codec =
container_of(work, struct hda_codec, power_work.work);
- if (!codec->power_on || codec->power_count)
+ if (!codec->power_on || codec->power_count) {
+ codec->power_transition = 0;
return;
+ }
hda_call_codec_suspend(codec);
if (codec->bus->ops.pm_notify)
--
1.5.2.3
next prev parent reply other threads:[~2007-09-03 13:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-03 12:14 HDA: STAC92xx: [PATCH v2] : add support for missing features + fix two bugs in new dynamic powersave mode Maxim Levitsky
2007-09-03 12:16 ` Maxim Levitsky [this message]
2007-09-03 12:17 ` [PATCH 2/6] Fix resume logic, when dynamic power managment is on Maxim Levitsky
2007-09-03 12:18 ` [PATCH 3/6] add support for swapping center/LFE channels Maxim Levitsky
2007-09-03 12:19 ` [PATCH 4/6] add support for analog loopback to STAC9204/9205/922x/927x Maxim Levitsky
2007-09-03 12:20 ` [PATCH 5/6] make volume knob, the master volume for sigmatel codecs that support it Maxim Levitsky
2007-09-03 12:21 ` [PATCH 6/6] Fix support for sigmatel codecs that have 2 or more ADCs Maxim Levitsky
2007-09-03 13:34 ` HDA: STAC92xx: [PATCH v2] : add support for missing features + fix two bugs in new dynamic powersave mode Takashi Iwai
2007-09-03 12:48 ` Maxim Levitsky
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=200709031516.12768.maximlevitsky@gmail.com \
--to=maximlevitsky@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=mranostay@embeddedalley.com \
--cc=tiwai@suse.de \
/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.