From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754517AbbGaPN0 (ORCPT ); Fri, 31 Jul 2015 11:13:26 -0400 Received: from vi37-28-154-113.vibiznes.pl ([37.28.154.113]:49605 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753837AbbGaPNY (ORCPT ); Fri, 31 Jul 2015 11:13:24 -0400 Message-ID: <55BB9082.4030206@maciej.szmigiero.name> Date: Fri, 31 Jul 2015 17:13:06 +0200 From: "Maciej S. Szmigiero" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Markus Pargmann CC: "alsa-devel@alsa-project.org" , Timur Tabi , Nicolin Chen , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , linuxppc-dev@lists.ozlabs.org, linux-kernel , Fabio Estevam Subject: Re: [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode References: <55BA364E.1000803@maciej.szmigiero.name> <20150731055843.GX30895@pengutronix.de> In-Reply-To: <20150731055843.GX30895@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31.07.2015 07:58, Markus Pargmann wrote: > On Thu, Jul 30, 2015 at 04:35:58PM +0200, Maciej S. Szmigiero wrote: >> Adjust set DAI format function in fsl_ssi driver so it >> doesn't fail and clears RXDIR in AC'97 mode. >> >> Signed-off-by: Maciej Szmigiero >> --- >> sound/soc/fsl/fsl_ssi.c | 8 +++++--- >> 1 files changed, 5 insertions(+), 3 deletions(-) >> >> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c >> index 8e5ff5e..37aabe3 100644 >> --- a/sound/soc/fsl/fsl_ssi.c >> +++ b/sound/soc/fsl/fsl_ssi.c >> @@ -900,14 +900,16 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev, >> scr &= ~CCSR_SSI_SCR_SYS_CLK_EN; >> break; >> default: >> - return -EINVAL; >> + if (!fsl_ssi_is_ac97(ssi_private)) >> + return -EINVAL; > > I think it would be better to add another case for the other mode which > is supported (AC97) instead of using the default case. This is a switch of DAI clock masters and AC'97 is none of them: while "case 0:" can be added this would be very similar to the current code. Alternatively, the whole switch statement could be wrapped inside "if (!fsl_ssi_is_ac97(ssi_private))" if that would be better with regards to code style. >> } >> >> stcr |= strcr; >> srcr |= strcr; >> >> - if (ssi_private->cpu_dai_drv.symmetric_rates) { >> - /* Need to clear RXDIR when using SYNC mode */ >> + if (ssi_private->cpu_dai_drv.symmetric_rates >> + || fsl_ssi_is_ac97(ssi_private)) { > > Please fix this indention. Most of the driver is written with 2 tab > indention after a line break and the new policy seems to be to indent on > the opening bracket. Will reindent this. > > Regards, > > Markus Best regards, Maciej Szmigiero