From: Fabio Estevam <festevam@gmail.com>
To: Jonathan Bennett <jbscience87@gmail.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Aaron Kling <webgeek1234@gmail.com>,
Igor Grinberg <grinberg@compulab.co.il>,
valentin@compulab.co.il
Subject: Re: Help with wm8731 support for the Utilite (imx6q)
Date: Mon, 20 Oct 2014 14:29:01 -0200 [thread overview]
Message-ID: <CAOMZO5CU+Y8cGJsn4O1ccFZUSjLM1iH3QN2fAv4UyaLMk5yAEg@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5AVr0xJjf9JjYNuXG-jJC3ft84+fO-5ToSieP9NFP=-+g@mail.gmail.com>
On Mon, Oct 20, 2014 at 10:06 AM, Fabio Estevam <festevam@gmail.com> wrote:
>> clocks = <&clks IMX6QDL_CLK_SSI2>;
>
> This 'clocks' entry does not seem correct.
>
> IMX6QDL_CLK_SSI2 is the clock from SSI2 module, which is turned on by
> the ssi driver.
>
> Who provides the MCLK for wm8731 on utilite board? Isn't it mx6 CLKO pin?
>
> Are you able to monitor this clock with a scope and make sure that it
> is actually being turned on?
>
> We use CLKO output to drive MCLK pins on mx6qdl-sabresd board with
> wm8762 codec. You can use it as a reference.
>
> Adding the Compulab's folks on Cc.
Do the changes below help? (using IMX6QDL_CLK_CKO)
codec: wm8731@1a {
#sound-dai-cells = <0>;
compatible = "wlf,wm8731";
reg = <0x1a>;
AVDD-supply = <®_3p3v>;
HPVDD-supply = <®_3p3v>;
DCVDD-supply = <®_3p3v>;
DBVDD-supply = <®_3p3v>;
clocks = <&clks IMX6QDL_CLK_CKO>;
with this one applied:
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -13,6 +13,7 @@
* published by the Free Software Foundation.
*/
+#include <linux/clk.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
@@ -46,6 +47,7 @@ struct wm8731_priv {
struct regmap *regmap;
struct regulator_bulk_data supplies[WM8731_NUM_SUPPLIES];
const struct snd_pcm_hw_constraint_list *constraints;
+ struct clk *mclk;
unsigned int sysclk;
int sysclk_type;
int playback_fs;
@@ -742,6 +744,21 @@ static int wm8731_i2c_probe(struct i2c_client *i2c,
return ret;
}
+ wm8731->mclk = devm_clk_get(&i2c->dev, NULL);
+ if (IS_ERR(wm8731->mclk)) {
+ ret = PTR_ERR(wm8731->mclk);
+ dev_err(&i2c->dev, "Failed to get mclock: %d\n", ret);
+ /* Defer the probe to see if the clk will be provided later */
+ if (ret == -ENOENT)
+ return -EPROBE_DEFER;
+ }
+
+ if (!IS_ERR(wm8731->mclk)) {
+ ret = clk_prepare_enable(wm8731->mclk);
+ if (ret)
+ return ret;
+ }
+
i2c_set_clientdata(i2c, wm8731);
ret = snd_soc_register_codec(&i2c->dev,
next prev parent reply other threads:[~2014-10-20 16:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 16:57 Help with wm8731 support for the Utilite (imx6q) Jonathan Bennett
2014-10-18 19:13 ` Fabio Estevam
2014-10-19 5:35 ` Jonathan Bennett
2014-10-19 5:58 ` Jonathan Bennett
2014-10-20 12:06 ` Fabio Estevam
2014-10-20 16:29 ` Fabio Estevam [this message]
2014-10-20 19:59 ` Jonathan Bennett
2014-10-21 12:06 ` Valentin Raevsky
2014-10-21 18:04 ` Jonathan Bennett
2014-10-21 18:12 ` Fabio Estevam
2014-10-21 18:49 ` Jonathan Bennett
2014-10-21 22:37 ` Jonathan Bennett
2014-10-22 8:04 ` Valentin Raevsky
2014-10-22 12:13 ` Jonathan Bennett
2014-10-22 12:17 ` Fabio Estevam
2014-10-22 13:32 ` Jonathan Bennett
2014-10-22 14:29 ` Fabio Estevam
2014-10-22 16:02 ` Fabio Estevam
2014-10-22 17:43 ` Jonathan Bennett
2016-04-06 8:25 ` Karolina
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=CAOMZO5CU+Y8cGJsn4O1ccFZUSjLM1iH3QN2fAv4UyaLMk5yAEg@mail.gmail.com \
--to=festevam@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=grinberg@compulab.co.il \
--cc=jbscience87@gmail.com \
--cc=valentin@compulab.co.il \
--cc=webgeek1234@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;
as well as URLs for NNTP newsgroup(s).