Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933387AbcDYSbp (ORCPT ); Mon, 25 Apr 2016 14:31:45 -0400 Received: from mail-oi0-f53.google.com ([209.85.218.53]:32912 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933271AbcDYSbn (ORCPT ); Mon, 25 Apr 2016 14:31:43 -0400 MIME-Version: 1.0 In-Reply-To: <20160425180613.GR3217@sirena.org.uk> References: <1461606624-130216-1-git-send-email-caleb@crome.org> <20160425180613.GR3217@sirena.org.uk> From: Caleb Crome Date: Mon, 25 Apr 2016 11:31:22 -0700 Message-ID: Subject: Re: [PATCH 1/1] ASoC: fsl_ssi: add CCSR_SSI_SOR to volatile register list To: Mark Brown Cc: Timur Tabi , Nicolin Chen , Xiubo Li , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "alsa-devel@alsa-project.org" , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1423 Lines: 35 On Mon, Apr 25, 2016 at 11:06 AM, Mark Brown wrote: > On Mon, Apr 25, 2016 at 10:50:24AM -0700, Caleb Crome wrote: > >> Due to caching, SOR wasn't written when it should have been. This >> patch simply adds SOR to the volatile list. > > Could you expand on when it wasn't written and why it needed to be > please? Yes, sorry. The CCSR_SSI_SOR is a register that clears the TX and/or the RX fifo on the i.MX6 SSI port. The fsl_ssi_trigger writes this register in order to clear the fifo at trigger time. However, since the CCSR_SSI_SOR register is not in the volatile list, the caching mechanism prevented the register write in the trigger function. This caused the fifo to not be cleared (because the value was unchanged from the last time the register was written), and thus causes the channels in both TDM or simple I2S mode to slip and be in the wrong time slots on SSI restart. By adding CCSR_SSI_SOR to the volatile list, along with arnaud's patches that I just tested (and sent tested-by slugs), fix most of the problems with the SSI port drivers for multi-channel operation (there is one more to come that I think really fixes the last bit). Most people never noticed the problem because with simple stereo mode, the consequence is that left and right are swapped, which isn't that noticeable. I can re-submit the patch if you like with this more descriptive comment. Thanks, -Caleb