From: Alex Deucher <alexdeucher@gmail.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org,
Vijendar.Mukunda@amd.com
Cc: tiwai@suse.de, Bard Liao <bardliao@realtek.com>,
Alex Deucher <alexander.deucher@amd.com>,
lgirdwood@gmail.com, Akshu Agrawal <akshu.agrawal@amd.com>
Subject: [PATCH v3] ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2
Date: Thu, 9 Nov 2017 12:35:51 -0500 [thread overview]
Message-ID: <20171109173552.21438-1-alexander.deucher@amd.com> (raw)
From: Akshu Agrawal <akshu.agrawal@amd.com>
Minimum time required between power On of codec and read
of RT5645_VENDOR_ID2 is 400msec. We should wait that long
before reading the value.
TEST=Cold boot the device and check for sound device.
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
v2: rework the patch based on mailing list discussion.
Just wait before reading the register.
v3: Drop the extra read
sound/soc/codecs/rt5645.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 23cc2cb8393f..5f24df4fae8e 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -55,6 +55,8 @@ MODULE_PARM_DESC(quirk, "RT5645 pdata quirk override");
#define RT5645_HWEQ_NUM 57
+#define TIME_TO_POWER_MS 400
+
static const struct regmap_range_cfg rt5645_ranges[] = {
{
.name = "PR",
@@ -3784,6 +3786,12 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
ret);
return ret;
}
+
+ /*
+ * Read after 400msec, as it is the interval required between
+ * read and power On.
+ */
+ msleep(TIME_TO_POWER_MS);
regmap_read(regmap, RT5645_VENDOR_ID2, &val);
switch (val) {
--
2.13.6
next reply other threads:[~2017-11-09 17:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 17:35 Alex Deucher [this message]
2017-11-09 17:35 ` [PATCH] ASoC: amd: Modified DMA transfer Mechanism for Playback Alex Deucher
2017-11-09 17:42 ` Applied "ASoC: amd: Modified DMA transfer Mechanism for Playback" to the asoc tree Mark Brown
2017-11-09 17:42 ` Applied "ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2" " 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=20171109173552.21438-1-alexander.deucher@amd.com \
--to=alexdeucher@gmail.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=akshu.agrawal@amd.com \
--cc=alexander.deucher@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox