From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roberto Fichera Subject: Re: fsl_ssi.c: Getting channel slips with fsl_ssi.c in TDM (network) mode. Date: Wed, 28 Oct 2015 15:05:18 +0100 Message-ID: <5630D61E.3030101@tekno-soft.it> References: <5625EF02.30602@invoxia.com> <56273F75.2040702@invoxia.com> <20151027071344.GC25728@pengutronix.de> <5630833B.10309@tekno-soft.it> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.tekno-soft.it (li153-180.members.linode.com [109.74.206.180]) by alsa0.perex.cz (Postfix) with ESMTP id D19D7261A80 for ; Wed, 28 Oct 2015 15:05:36 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Caleb Crome Cc: Fabio Estevam , "alsa-devel@alsa-project.org" , Shengjiu Wang , Nicolin Chen , "arnaud.mouiche@invoxia.com" , Markus Pargmann , "shawn.guo@linaro.org" , Fabio Estevam List-Id: alsa-devel@alsa-project.org On 10/28/2015 02:59 PM, Caleb Crome wrote: > On Wed, Oct 28, 2015 at 1:11 AM, Roberto Fichera wrote: >> On 10/27/2015 07:57 PM, Fabio Estevam wrote: >>> [Adding Roberto in the thread as he is also trying to get SSI TDM support/ >> Thanks Fabio, >> >> I'm also having the same issue but employing SSI in TDM master mode against a SLIC Si32178 >> using its PCM mode. PCLK is at 2048KHz, FSYNC is 8KHz slot length is 32 bits (SSI wants >> this since when in master mode) but valid data set to be 8bits in the SSI register. >> >> My Current situation is that I've a custom fsl_ssi.c driver to control the SSI in TDM master mode >> both PCLK and FSYNC works perfectly fine, the SLIC has a register that I can check via SPI for >> such purpose, I can see the clocking status from its side. The main problem I've is exactly the same >> Caleb is having, after a certain amount of SDMA transfers, roughly 1000 or so, everything stops >> without any apparent reason. > My problem is that the channels randomly slip a slot and all words end > up in the wrong slot. I suspect this is a DMA issue, but I really > haven't diagnosed it yet. I don't get a full stop on the data. Ah! Ok! > FYI, I'm using a very recent 4.3 kernel from linus's repo, but 4.2 > behaved the same. Can you please post the code you are using to setup the SSI, what PCLK and FSYNC rates? Did you have your own DMA handling? > > -Caleb > >>> On Tue, Oct 27, 2015 at 2:45 PM, Fabio Estevam wrote: >>>> On Tue, Oct 27, 2015 at 2:42 PM, Caleb Crome wrote: >>>>> On Tue, Oct 27, 2015 at 9:10 AM, Fabio Estevam wrote: >>>>>> On Tue, Oct 27, 2015 at 2:02 PM, Caleb Crome wrote: >>>>>> >>>>>>>> Could you please try it without using the external SDMA firmware? >>>>>>> I do need *some* SDMA firmware, correct? The firmware that I'm using >>>>>>> ends up in /lib/firmware/imx/sdma/sdma-imx6q.bin and is md5sum >>>>>>> 5d4584134cc4cba62e1be2f382cd6f3a. >>>>>> SSI can operate with the ROM SDMA firmware. >>>>>> >>>>>> I would like to know if this issue also happens if you don't pass the >>>>>> external firmware and use the internal ROM SDMA firmware instead. >>>>> Ah, good to know. Do I just remove reference in the .dtsi file? >>>>> Remove the file from the filesystem? I'll do both to be doubly sure >>>>> :-) >>>> Just remove it from the rootfs. Then you will see a message from the >>>> kernel saying that no external SDMA firmware could be found and that >>>> the internal one is going to be used. >>>> >>>>>> Also, could you try bumping the SSI and SDMA clock rates at the maximum? >>>>> Any idea how I do that? I guess it's in the .dtsi file perhaps? I'll >>>>> poke around. >>>> You can try to call clk_set_rate() with the maximum allowed frequency >>>> inside the ssi driver. I don't recall on top of my head what is this >>>> value though. >>>> >>>> Regards, >>>> >>>> Fabio Estevam >>> _______________________________________________ >>> Alsa-devel mailing list >>> Alsa-devel@alsa-project.org >>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >>> > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >