Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1198279

Re: [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Markus Pargmann <mpa@pengutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
Date Sun, 02 Aug 2015 21:00:01 +0200
Message-ID <pT6Eh-49c-3@gated-at.bofh.it> (permalink)
References <pRXa1-19k-9@gated-at.bofh.it> <pSbwm-4Ye-9@gated-at.bofh.it> <pSkgh-19Y-13@gated-at.bofh.it>
X-Original-To "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
MIME-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ylS2wUBXLOxYXZFQ"
Content-Disposition inline
X-Sent-From Pengutronix Hildesheim
X-URL http://www.pengutronix.de/
X-Irc #ptxdist @freenode
X-Accept-Language de,en
X-Accept-Content-Type text/plain
X-Uptime 20:48:26 up 22:22, 31 users, load average: 2.97, 1.69, 0.82
User-Agent Mutt/1.5.23 (2014-03-12)
X-Sa-Exim-Connect-IP 2001:67c:670:100:1d::7
X-Sa-Exim-Mail-From mpa@pengutronix.de
X-Sa-Exim-Scanned No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false
X-Ptx-Original-Recipient linux-kernel@vger.kernel.org
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 109
Organization linux.* mail to news gateway
X-Original-Cc "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>, Timur Tabi <timur@tabi.org>, Nicolin Chen <nicoleotsuka@gmail.com>, Xiubo Li <Xiubo.Lee@gmail.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>, linuxppc-dev@lists.ozlabs.org, linux-kernel <linux-kernel@vger.kernel.org>, Fabio Estevam <festevam@gmail.com>
X-Original-Date Sun, 2 Aug 2015 20:51:03 +0200
X-Original-Message-ID <20150802185103.GD19600@pengutronix.de>
X-Original-References <55BA364E.1000803@maciej.szmigiero.name> <20150731055843.GX30895@pengutronix.de> <55BB9082.4030206@maciej.szmigiero.name>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1198279

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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@maciej.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 |

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> - 2015-07-30 16:40 +0200
  Re: [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> - 2015-07-31 17:20 +0200
    Re: [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode Markus Pargmann <mpa@pengutronix.de> - 2015-08-02 21:00 +0200
      [PATCH 6/6 v2] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> - 2015-08-03 00:50 +0200
        Re: [PATCH 6/6 v2] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode Mark Brown <broonie@kernel.org> - 2015-08-03 18:30 +0200
          Re: [PATCH 6/6 v2] ASoC: fsl_ssi: adjust set DAI format in AC'97  mode "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> - 2015-08-04 00:50 +0200
            Re: [PATCH 6/6 v2] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode Mark Brown <broonie@kernel.org> - 2015-08-04 11:10 +0200

csiph-web