linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "jeff_chang(張世佳)" <jeff_chang@richtek.com>
To: Mark Brown <broonie@kernel.org>,
	Jeff Chang <richtek.jeff.chang@gmail.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"perex@perex.cz" <perex@perex.cz>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH] ASoC: MT6660 update to 1.0.8_G
Date: Tue, 11 Feb 2020 02:04:42 +0000	[thread overview]
Message-ID: <a9895e583c9b47608aeb3e29d7852f47@ex1.rt.l> (raw)
In-Reply-To: <20200210185121.GC14166@sirena.org.uk>

Dear Mark:

Thanks for your replying.

This INIT SETTING is always be set, and we don't want anyone to modify it.

What should I do is just apply them to be hard code into the driver? I cannot use event a table to descript it like below?

static const struct codec_reg_val e4_reg_inits[] = {
        { MT6660_REG_WDT_CTRL, 0x80, 0x00 },
        { MT6660_REG_SPS_CTRL, 0x01, 0x00 },
        { MT6660_REG_AUDIO_IN2_SEL, 0x1c, 0x04 },
        { MT6660_REG_RESV11, 0x0c, 0x00 },
        { MT6660_REG_RESV31, 0x03, 0x03 },
        { MT6660_REG_RESV40, 0x01, 0x00 },
        { MT6660_REG_RESV0, 0x44, 0x04 },
        { MT6660_REG_RESV19, 0xff, 0x82 },
        { MT6660_REG_RESV17, 0x7777, 0x7273 },
        { MT6660_REG_RESV16, 0x07, 0x03 },
        { MT6660_REG_DRE_CORASE, 0xe0, 0x20 },
        { MT6660_REG_ADDA_CLOCK, 0xff, 0x70 },
        { MT6660_REG_RESV21, 0xff, 0x20 },
        { MT6660_REG_DRE_THDMODE, 0xff, 0x40 },
        { MT6660_REG_RESV23, 0xffff, 0x17f8 },
        { MT6660_REG_PWM_CTRL, 0xff, 0x15 },
        { MT6660_REG_ADC_USB_MODE, 0xff, 0x00 },
        { MT6660_REG_PROTECTION_CFG, 0xff, 0x1d },
        { MT6660_REG_HPF1_COEF, 0xffffffff, 0x7fdb7ffe },
        { MT6660_REG_HPF2_COEF, 0xffffffff, 0x7fdb7ffe },
        { MT6660_REG_SIG_GAIN, 0xff, 0x58 },
        { MT6660_REG_RESV6, 0xff, 0xce },
        { MT6660_REG_SIGMAX, 0xffff, 0x7fff },
        { MT6660_REG_DA_GAIN, 0xffff, 0x0116 },
        { MT6660_REG_TDM_CFG3, 0x1800, 0x0800 },
        { MT6660_REG_DRE_CTRL, 0x1f, 0x07 },
};

Just hard coded??


Thanks & BRs
Jeff Chang
Tel 886-3-5526789 Ext 2357
14F, No. 8, Taiyuen 1st st., Zhubei City,
Hsinchu County, Taiwan 30288



-----Original Message-----
From: Mark Brown [mailto:broonie@kernel.org]
Sent: Tuesday, February 11, 2020 2:51 AM
To: Jeff Chang <richtek.jeff.chang@gmail.com>
Cc: lgirdwood@gmail.com; perex@perex.cz; tiwai@suse.com; matthias.bgg@gmail.com; alsa-devel@alsa-project.org; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; jeff_chang(張世佳) <jeff_chang@richtek.com>
Subject: Re: [PATCH] ASoC: MT6660 update to 1.0.8_G

On Tue, Feb 04, 2020 at 11:41:37AM +0800, Jeff Chang wrote:
> From: Jeff Chang <jeff_chang@richtek.com>
>
> 1. add parsing register initial table via device tree.
> 2. add applying initial register value function at component driver.

OK, so there's still a problem with the whole concept of putting "initial register settings" in the device tree - this is clearly not idiomatic for an ASoC driver.  If there are machine specific settings that need to be done unconditionally (eg, values controlled by external passive components) there should be specific properties for them.  If there are runtime options these should be normal ALSA controls with the default values being whatever the hardware defaults are.  If there are things that should just always be set no matter what then they should just be hard coded into the driver.
************* Email Confidentiality Notice ********************

The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-02-11  2:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04  3:41 [PATCH] ASoC: MT6660 update to 1.0.8_G Jeff Chang
2020-02-10 18:51 ` Mark Brown
2020-02-11  2:04   ` jeff_chang(張世佳) [this message]
2020-02-11 12:23     ` 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=a9895e583c9b47608aeb3e29d7852f47@ex1.rt.l \
    --to=jeff_chang@richtek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --cc=richtek.jeff.chang@gmail.com \
    --cc=tiwai@suse.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).