From: Mark Brown <broonie@kernel.org>
To: Oder Chiou <oder_chiou@realtek.com>
Cc: jack.yu@realtek.com, alsa-devel@alsa-project.org,
lgirdwood@gmail.com, john.lin@realtek.com, bardliao@realtek.com,
flove@realtek.com
Subject: Re: [PATCH] ASoC: rt5645: Power up the RC clock to make sure the speaker volume adjust properly
Date: Thu, 5 Nov 2015 12:12:30 +0000 [thread overview]
Message-ID: <20151105121230.GD18409@sirena.org.uk> (raw)
In-Reply-To: <1446724551-27762-1-git-send-email-oder_chiou@realtek.com>
[-- Attachment #1.1: Type: text/plain, Size: 900 bytes --]
On Thu, Nov 05, 2015 at 07:55:51PM +0800, Oder Chiou wrote:
> +static int rt5645_spk_put_volsw(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol)
> +{
> + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
> + struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component);
> + int ret;
> +
> + cancel_delayed_work_sync(&rt5645->rcclock_work);
> +
> + regmap_update_bits(rt5645->regmap, RT5645_MICBIAS,
> + RT5645_PWR_CLK25M_MASK, RT5645_PWR_CLK25M_PU);
> +
> + ret = snd_soc_put_volsw(kcontrol, ucontrol);
> +
> + queue_delayed_work(system_power_efficient_wq, &rt5645->rcclock_work,
> + msecs_to_jiffies(200));
A more idiomatic way of doing this is to just have the
queue_delayed_work() - there's no need to cancel a work item before
requeuing it, the workqueue code will do the right thing. Can you
please submit a followup patch cleaning that up?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2015-11-05 12:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 11:55 [PATCH] ASoC: rt5645: Power up the RC clock to make sure the speaker volume adjust properly Oder Chiou
2015-11-05 12:12 ` Mark Brown [this message]
2015-11-06 2:52 ` Oder Chiou
2015-11-06 10:44 ` Mark Brown
2015-11-09 3:13 ` Oder Chiou
2015-11-09 14:09 ` Mark Brown
2015-11-10 3:59 ` Oder Chiou
2015-11-10 8:47 ` Mark Brown
2015-11-05 12:14 ` Applied "ASoC: rt5645: Power up the RC clock to make sure the speaker volume adjust properly" to the asoc tree Mark Brown
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=20151105121230.GD18409@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=flove@realtek.com \
--cc=jack.yu@realtek.com \
--cc=john.lin@realtek.com \
--cc=lgirdwood@gmail.com \
--cc=oder_chiou@realtek.com \
/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.