dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: amd-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org,
	dri-devel@lists.freedesktop.org, broonie@kernel.org,
	Vijendar.Mukunda@amd.com
Cc: Bard Liao <bardliao@realtek.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	lgirdwood@gmail.com, Akshu Agrawal <akshu.agrawal@amd.com>
Subject: [PATCH v2 2/3] ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2
Date: Wed,  8 Nov 2017 12:24:03 -0500	[thread overview]
Message-ID: <20171108172404.19118-3-alexander.deucher@amd.com> (raw)
In-Reply-To: <20171108172404.19118-1-alexander.deucher@amd.com>

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.

 sound/soc/codecs/rt5645.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 23cc2cb8393f..ce5d2c3c6976 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",
@@ -3786,6 +3788,13 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
 	}
 	regmap_read(regmap, RT5645_VENDOR_ID2, &val);
 
+	/*
+	 * 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) {
 	case RT5645_DEVICE_ID:
 		rt5645->regmap = devm_regmap_init_i2c(i2c, &rt5645_regmap);
-- 
2.13.6

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-11-08 17:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 17:24 [PATCH v2 0/3] Fixes for AMD Stoney ACP audio Alex Deucher
     [not found] ` <20171108172404.19118-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-11-08 17:24   ` [PATCH 1/3] ASoC: AMD: Make the driver name consistent across files Alex Deucher
2017-11-08 18:08     ` Mark Brown
2017-11-08 18:12       ` Deucher, Alexander
2017-11-08 18:34         ` Mark Brown
2017-11-08 17:24   ` [PATCH 3/3] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma Alex Deucher
     [not found]     ` <20171108172404.19118-4-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-11-08 17:29       ` Guenter Roeck
     [not found]         ` <CABXOdTdgxOFJb0B7VRivFaf1ihfKQWiyXRX9hFnKetTanmjd5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-08 17:42           ` Alex Deucher
2017-11-08 17:45             ` Alex Deucher
2017-11-08 18:00               ` Mark Brown
2017-11-08 21:43     ` Applied "ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds" to the asoc tree Mark Brown
2017-11-08 17:24 ` Alex Deucher [this message]
2017-11-08 18:09   ` [PATCH v2 2/3] ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2 Mark Brown
     [not found]     ` <20171108180957.ddcdyzu2fschypbx-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
2017-11-09  9:14       ` Agrawal, Akshu

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=20171108172404.19118-3-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=amd-gfx@lists.freedesktop.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lgirdwood@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox