lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Jul 2014 18:54:19 +0000
From:	"Murphy, Dan" <dmurphy@...com>
To:	Mark Brown <broonie@...nel.org>
CC:	"linux-sound@...r.kernel.org" <linux-sound@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>
Subject: Re: [PATCH 2/2] ASoC: tas2552: Add DAPM calls for amp and PLL

On 07/21/2014 06:54 AM, Mark Brown wrote:
> On Fri, Jul 18, 2014 at 12:31:08PM -0500, Dan Murphy wrote:
> 
>> +static int tas2552_class_d_en(struct snd_soc_dapm_widget *w,
>> +			   struct snd_kcontrol *kcontrol, int event)
>> +{
>> +	switch (event) {
>> +	case SND_SOC_DAPM_PRE_PMU:
>> +		snd_soc_update_bits(w->codec, TAS2552_CFG_2,
>> +						 TAS2552_CLASSD_EN_MASK, TAS2552_CLASSD_EN_MASK);
>> +		break;
>> +	case SND_SOC_DAPM_POST_PMD:
>> +		snd_soc_update_bits(w->codec, TAS2552_CFG_2,
>> +						 TAS2552_CLASSD_EN_MASK, 0);
>> +		break;
>> +	}
>> +
>> +	return 0;
>> +}
>> +
>> +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"}
};

Any information would help here

Thanks in advance

-- 
------------------
Dan Murphy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ