From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Subject: Re: [alsa-devel] [PATCH 2/2] ASoC: samsung: Add machine driver for odroidx2 Date: Fri, 04 Jul 2014 13:28:22 +0200 Message-ID: <53B68FD6.4090601@metafoo.de> References: <1400759708-25831-1-git-send-email-s.nawrocki@samsung.com> <1400759708-25831-2-git-send-email-s.nawrocki@samsung.com> <20140522185334.GT12304@sirena.org.uk> <53B68A32.8000203@samsung.com> <53B68B96.9010708@metafoo.de> <53B68EF4.1090101@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53B68EF4.1090101@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org To: Sylwester Nawrocki Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, Chen Zhen , Mark Brown , linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org On 07/04/2014 01:24 PM, Sylwester Nawrocki wrote: > On 04/07/14 13:10, Lars-Peter Clausen wrote: >> On 07/04/2014 01:04 PM, Sylwester Nawrocki wrote: >>> On 22/05/14 20:53, Mark Brown wrote: >>>>> + ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S >>>>>> + | SND_SOC_DAIFMT_NB_NF >>>>>> + | SND_SOC_DAIFMT_CBM_CFM); >>>>>> + if (ret < 0) >>>>>> + return ret; >>>>>> + >>>>>> + ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S >>>>>> + | SND_SOC_DAIFMT_NB_NF >>>>>> + | SND_SOC_DAIFMT_CBM_CFM); >>>>>> + if (ret < 0) >>>>>> + return ret; >>>> >>>> These are constant, set these in the dai_link. >>> >>> set_fmt also sets master/slave mode of the I2S DAI, after I moved >>> this into the cpu_dai link data structure after suspend/resume cycle >>> the I2S IP block is not being properly re-configured. Should the >>> format setting be added in resume_post callback, or is there any >>> other preferred way ? Similarly the syclk settings are being lost >>> over suspend/resume cycle and nothing restores them. >> >> The I2S driver should save and restore it's register during suspend/resume. > > OK, thanks. I checked the I2S driver does it, but only when dai->active > flags is set [1]. However, during system resume this flag is not set > (in situation where playback or capture wasn't active right before > system suspend). Is the dai->active test wrong in that driver then ? > I'm not sure if it could just be removed. Yes, just remove the check. - Lars