From: PC Liao <pc.liao@mediatek.com>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: "broonie@kernel.org" <broonie@kernel.org>,
"tiwai@suse.de" <tiwai@suse.de>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
srv_heupstream <srv_heupstream@mediatek.com>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Koro Chen (陳思翰)" <koro.chen@mediatek.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3] ASoC: mediatek: Add second I2S on mt8173-rt5650 machine driver
Date: Thu, 7 Apr 2016 18:03:50 +0800 [thread overview]
Message-ID: <1460023430.9948.8.camel@mtksdaap41> (raw)
In-Reply-To: <57062D4C.5020905@gmail.com>
Hi Matthias,
On Thu, 2016-04-07 at 17:50 +0800, Matthias Brugger wrote:
>
> On 07/04/16 09:35, PC Liao wrote:
> > diff --git a/sound/soc/mediatek/mt8173-rt5650.c b/sound/soc/mediatek/mt8173-rt5650.c
> > index bb09bb1..9f56df9 100644
> > --- a/sound/soc/mediatek/mt8173-rt5650.c
> > +++ b/sound/soc/mediatek/mt8173-rt5650.c
> > @@ -85,12 +85,26 @@ static int mt8173_rt5650_init(struct snd_soc_pcm_runtime *runtime)
> > {
> > struct snd_soc_card *card = runtime->card;
> > struct snd_soc_codec *codec = runtime->codec_dais[0]->codec;
> > + const char *codec_dai_capture = runtime->codec_dais[1]->name;
> > int ret;
> >
> > rt5645_sel_asrc_clk_src(codec,
> > - RT5645_DA_STEREO_FILTER |
> > - RT5645_AD_STEREO_FILTER,
> > - RT5645_CLK_SEL_I2S1_ASRC);
> > + RT5645_DA_STEREO_FILTER,
> > + RT5645_CLK_SEL_I2S1_ASRC);
> > +
> > + if (!strcmp(codec_dai_capture, "rt5645-aif1")) {
> > + rt5645_sel_asrc_clk_src(codec,
> > + RT5645_AD_STEREO_FILTER,
> > + RT5645_CLK_SEL_I2S1_ASRC);
> > + } else if (!strcmp(codec_dai_capture, "rt5645-aif2")) {
> > + rt5645_sel_asrc_clk_src(codec,
> > + RT5645_AD_STEREO_FILTER,
> > + RT5645_CLK_SEL_I2S2_ASRC);
> > + } else {
> > + dev_err(card->dev, "Can't get the right codec dai\n");
> > + return -EINVAL;
>
> For compatibility issues we should enable RT5645_CLK_SEL_I2S1_ASRC as
> default. BTW in the old version you enabled DA and AD filter while in
> the new version you just enable AD filter. What is the reason for that?
>
> Regards,
> Matthias
Thanks for comment.
I separate rt5645_sel_asrc_clk_src function into two parts.
I have and enable DA filter for I2S1 first.
Then, I use codec_dai_capture to determine which I2S AD filter I need.
Thanks!
WARNING: multiple messages have this Message-ID (diff)
From: pc.liao@mediatek.com (PC Liao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] ASoC: mediatek: Add second I2S on mt8173-rt5650 machine driver
Date: Thu, 7 Apr 2016 18:03:50 +0800 [thread overview]
Message-ID: <1460023430.9948.8.camel@mtksdaap41> (raw)
In-Reply-To: <57062D4C.5020905@gmail.com>
Hi Matthias,
On Thu, 2016-04-07 at 17:50 +0800, Matthias Brugger wrote:
>
> On 07/04/16 09:35, PC Liao wrote:
> > diff --git a/sound/soc/mediatek/mt8173-rt5650.c b/sound/soc/mediatek/mt8173-rt5650.c
> > index bb09bb1..9f56df9 100644
> > --- a/sound/soc/mediatek/mt8173-rt5650.c
> > +++ b/sound/soc/mediatek/mt8173-rt5650.c
> > @@ -85,12 +85,26 @@ static int mt8173_rt5650_init(struct snd_soc_pcm_runtime *runtime)
> > {
> > struct snd_soc_card *card = runtime->card;
> > struct snd_soc_codec *codec = runtime->codec_dais[0]->codec;
> > + const char *codec_dai_capture = runtime->codec_dais[1]->name;
> > int ret;
> >
> > rt5645_sel_asrc_clk_src(codec,
> > - RT5645_DA_STEREO_FILTER |
> > - RT5645_AD_STEREO_FILTER,
> > - RT5645_CLK_SEL_I2S1_ASRC);
> > + RT5645_DA_STEREO_FILTER,
> > + RT5645_CLK_SEL_I2S1_ASRC);
> > +
> > + if (!strcmp(codec_dai_capture, "rt5645-aif1")) {
> > + rt5645_sel_asrc_clk_src(codec,
> > + RT5645_AD_STEREO_FILTER,
> > + RT5645_CLK_SEL_I2S1_ASRC);
> > + } else if (!strcmp(codec_dai_capture, "rt5645-aif2")) {
> > + rt5645_sel_asrc_clk_src(codec,
> > + RT5645_AD_STEREO_FILTER,
> > + RT5645_CLK_SEL_I2S2_ASRC);
> > + } else {
> > + dev_err(card->dev, "Can't get the right codec dai\n");
> > + return -EINVAL;
>
> For compatibility issues we should enable RT5645_CLK_SEL_I2S1_ASRC as
> default. BTW in the old version you enabled DA and AD filter while in
> the new version you just enable AD filter. What is the reason for that?
>
> Regards,
> Matthias
Thanks for comment.
I separate rt5645_sel_asrc_clk_src function into two parts.
I have and enable DA filter for I2S1 first.
Then, I use codec_dai_capture to determine which I2S AD filter I need.
Thanks!
next prev parent reply other threads:[~2016-04-07 10:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-07 7:35 [PATCH v3] ASoC: mediatek: Add second I2S on mt8173-rt5650 machine driver PC Liao
2016-04-07 7:35 ` PC Liao
2016-04-07 7:35 ` PC Liao
2016-04-07 9:50 ` Matthias Brugger
2016-04-07 9:50 ` Matthias Brugger
2016-04-07 10:03 ` PC Liao [this message]
2016-04-07 10:03 ` PC Liao
2016-04-18 11:36 ` PC Liao
2016-04-18 11:36 ` PC Liao
2016-04-18 12:03 ` Mark Brown
2016-04-18 12:03 ` Mark Brown
2016-04-18 12:59 ` PC Liao
2016-04-18 12:59 ` PC Liao
2016-04-18 12:59 ` PC Liao
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=1460023430.9948.8.camel@mtksdaap41 \
--to=pc.liao@mediatek.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=koro.chen@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=srv_heupstream@mediatek.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 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.