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: <20150802185103.GD19600@pengutronix.de>
Date:	Sun, 2 Aug 2015 20:51:03 +0200
From:	Markus Pargmann <mpa@...gutronix.de>
To:	"Maciej S. Szmigiero" <mail@...iej.szmigiero.name>
Cc:	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	Timur Tabi <timur@...i.org>,
	Nicolin Chen <nicoleotsuka@...il.com>,
	Xiubo Li <Xiubo.Lee@...il.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
	linuxppc-dev@...ts.ozlabs.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Fabio Estevam <festevam@...il.com>
Subject: Re: [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode

On Fri, Jul 31, 2015 at 05:13:06PM +0200, Maciej S. Szmigiero wrote:
> 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 <mail@...iej.szmigiero.name>
> >> ---
> >>  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.

I looked at the wrong switch/case the DAIFMT_AC97 is actually used
but this patch is about the master clocks. It's fine then.

Thanks,

Markus

> 
> >>  	}
> >>  
> >>  	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
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ