public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Murphy, Dan" <dmurphy@ti.com>
Cc: "linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH 2/2] ASoC: tas2552: Add DAPM calls for amp and PLL
Date: Tue, 29 Jul 2014 18:51:46 +0000	[thread overview]
Message-ID: <20140729185146.GF17528@sirena.org.uk> (raw)
In-Reply-To: <00FC9A978A94B7418C33AFAE8A35ED49DA8D1E@DFLE09.ent.ti.com>

[-- Attachment #1: Type: text/plain, Size: 2056 bytes --]

On Fri, Jul 25, 2014 at 06:54:19PM +0000, Murphy, Dan wrote:
> On 07/21/2014 06:54 AM, Mark Brown wrote:
> > On Fri, Jul 18, 2014 at 12:31:08PM -0500, Dan Murphy wrote:

> >> +static const struct snd_soc_dapm_widget tas2552_dapm_widgets[] =
> >> +{
> >> +SND_SOC_DAPM_PRE("Class D Enable", tas2552_class_d_en),
> >> +SND_SOC_DAPM_POST("Class D Disable", tas2552_class_d_en),
> >> +SND_SOC_DAPM_POST("PLL Disable", tas2552_pll_disable),
> >> +};

> > This seems broken, having to use _PRE or _POST widgets for simple
> > register writes (or almost anything really) should never be required and
> > error prone - what is this actually trying to do?  I'd expect the class
> > D to be a PGA or OUTPUT widget and the PLL to be a SUPPLY widget.

> I need a little help here.
> I am not seeing the PLL being disabled or Class D being disabled when
> I am using the DAPM calls

> My implementation is like this.  And I use set these widgets and audio
> map in the call back functions in the struct snd_soc_codec_driver.

> When I look at the registers after stream playback I see that
> the TAS2552_CFG_2 register is untouched

> static const struct snd_soc_dapm_widget tas2552_dapm_widgets[] =
> {
> SND_SOC_DAPM_AIF_IN("DAC IN", NULL, 0, SND_SOC_NOPM, 0, 0),
> SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0),
> SND_SOC_DAPM_OUT_DRV("ClassD Enable", TAS2552_CFG_2, 7, 0, NULL, 0),
> SND_SOC_DAPM_OUT_DRV("ClassD Disable", TAS2552_CFG_2, 7, 1, NULL, 0),
> SND_SOC_DAPM_SUPPLY("PLL Disable", TAS2552_CFG_2, 3, 1, NULL, 0),
> SND_SOC_DAPM_OUTPUT("OUT")
> };

> static const struct snd_soc_dapm_route tas2552_audio_map[] = {
>     {"DAC", NULL, "DAC IN"},
>     {"ClassD Enable", NULL, "DAC"},
>     {"OUT", NULL, "ClassD Enable"},
>     {"ClassD Disable", NULL, "OUT"},
>     {"PLL Disable", NULL, "ClassD Disable"}
> };

This looks very confused, why do you have separate enable and disable
things - what do you think the effect of the above should be?  That's
probably what's going wrong.  I'd expect to see one DAPM widget for the
class D and one for the PLL.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-07-29 18:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18 17:31 [PATCH 1/2] ASoC: tas2552: Fix PM sequencing Dan Murphy
2014-07-18 17:31 ` [PATCH 2/2] ASoC: tas2552: Add DAPM calls for amp and PLL Dan Murphy
2014-07-21 11:53   ` Mark Brown
2014-07-25 18:54     ` Murphy, Dan
2014-07-29 18:51       ` Mark Brown [this message]
2014-07-21 12:19 ` [PATCH 1/2] ASoC: tas2552: Fix PM sequencing Mark Brown
2014-07-21 13:23   ` Murphy, Dan

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=20140729185146.GF17528@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=dmurphy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    /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