From: Markus Pargmann <mpa@pengutronix.de>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
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>
Subject: Re: [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
Date: Sun, 2 Aug 2015 20:51:03 +0200 [thread overview]
Message-ID: <20150802185103.GD19600@pengutronix.de> (raw)
In-Reply-To: <55BB9082.4030206@maciej.szmigiero.name>
[-- Attachment #1: Type: text/plain, Size: 2435 bytes --]
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 |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-08-02 18:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 14:35 [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode Maciej S. Szmigiero
2015-07-31 5:58 ` Markus Pargmann
2015-07-31 15:13 ` Maciej S. Szmigiero
2015-08-02 18:51 ` Markus Pargmann [this message]
2015-08-02 22:44 ` [PATCH 6/6 v2] " Maciej S. Szmigiero
2015-08-03 16:21 ` Mark Brown
2015-08-03 22:42 ` Maciej S. Szmigiero
2015-08-04 9:07 ` Mark Brown
2015-08-05 15:29 ` [PATCH 6/6 v2][RESEND] " Maciej S. Szmigiero
-- strict thread matches above, loose matches on Subject: below --
2015-06-28 13:49 [PATCH 6/6] " Maciej S. Szmigiero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150802185103.GD19600@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mail@maciej.szmigiero.name \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=timur@tabi.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).