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]
Message-ID: <CANKRQnhxAW-tXB3jbwctWRRTZJLrmPUfS2DfRXug=inQVW5OZw@mail.gmail.com>
Date:	Thu, 15 Mar 2012 13:51:07 +0900
From:	Tomoya MORINAGA <tomoya.rohm@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	alsa-devel@...a-project.org, qi.wang@...el.com,
	Takashi Iwai <tiwai@...e.de>, linux-kernel@...r.kernel.org,
	yong.y.wang@...el.com, kok.howg.ewe@...el.com,
	Liam Girdwood <lrg@...com>, joel.clark@...el.com
Subject: Re: [alsa-devel] [PATCH v7] sound/soc/codecs: add LAPIS Semiconductor ML26124

On Wed, Mar 14, 2012 at 11:39 PM, Mark Brown
<broonie@...nsource.wolfsonmicro.com> wrote:
> On Fri, Mar 09, 2012 at 03:37:06PM +0900, Tomoya MORINAGA wrote:
>> +     /* SAI configuration */
>> +     if (priv->channels == 1) {
>> +             ml26124_update_bits(codec, ML26124_SAI_TRANS_CTL, mask,
>> +                             ML26124_SAI_NO_DELAY | ML26124_SAI_FRAME_SYNC);
>> +             ml26124_update_bits(codec, ML26124_SAI_RCV_CTL, mask,
>> +                             ML26124_SAI_NO_DELAY | ML26124_SAI_FRAME_SYNC);
>> +     } else {
>> +             ml26124_update_bits(codec, ML26124_SAI_TRANS_CTL, mask,
>> +                                 ML26124_SAI_NO_DELAY);
>> +             ml26124_update_bits(codec, ML26124_SAI_RCV_CTL, mask,
>> +                                 ML26124_SAI_NO_DELAY);
>> +     }
>
> What happens if the system switches between 1 channel mode and
> multi-channel mode at runtime?  It looks like _SYNC will never be
> cleared.

Sorry,  'priv->channels == 1' means for telephone codec.
However, we don't support this function.
So, I'll delete these lines.

>> +static int ml26124_set_dai_sysclk(struct snd_soc_dai *codec_dai,
>> +             int clk_id, unsigned int freq, int dir)
>> +{
>> +     struct snd_soc_codec *codec = codec_dai->codec;
>> +     struct ml26124_priv *priv = snd_soc_codec_get_drvdata(codec);
>> +
>> +     switch (clk_id) {
>> +     case ML26124_USE_PLL:
>> +             ml26124_update_bits(codec, ML26124_CLK_CTL,
>> +                                 BIT(0) | BIT(1), 0);
>> +             break;
>> +     case ML26124_USE_MCLKI_256FS:
>> +             ml26124_update_bits(codec, ML26124_CLK_CTL,
>> +                                 BIT(0) | BIT(1), 1);
>> +             break;
>> +     case ML26124_USE_MCLKI_512FS:
>> +             ml26124_update_bits(codec, ML26124_CLK_CTL,
>> +                                 BIT(0) | BIT(1), 2);
>> +             break;
>> +     case ML26124_USE_MCLKI_1024FS:
>> +             ml26124_update_bits(codec, ML26124_CLK_CTL,
>> +                                 BIT(0) | BIT(1), 3);
>> +             break;
>
> Why not just specify the MCLK rate and then calculate the division based
> on the sample rate?

OK, I'll do like your saying.

>
>> +     case SND_SOC_BIAS_STANDBY:
>> +             /* VMID ON */
>> +             ml26124_update_bits(codec, ML26124_PW_REF_PW_MNG,
>> +                                 ML26124_VMID, ML26124_VMID);
>> +             msleep(500);
>
> This will sleep for 500ms when powering down which probably isn't what's
> desired...

I'll Move into "if (codec->dapm.bias_level == SND_SOC_BIAS_OFF)" condition.

thanks.
-- 
ROHM Co., Ltd.
tomoya
--
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