All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
@ 2015-07-30 14:35 Maciej S. Szmigiero
  2015-07-31  5:58 ` Markus Pargmann
  0 siblings, 1 reply; 14+ messages in thread
From: Maciej S. Szmigiero @ 2015-07-30 14:35 UTC (permalink / raw)
  To: alsa-devel
  Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, linuxppc-dev, linux-kernel,
	Fabio Estevam

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;
 	}
 
 	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)) {
+		/* Need to clear RXDIR when using SYNC or AC97 mode */
 		srcr &= ~CCSR_SSI_SRCR_RXDIR;
 		scr |= CCSR_SSI_SCR_SYN;
 	}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
  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
  0 siblings, 1 reply; 14+ messages in thread
From: Markus Pargmann @ 2015-07-31  5:58 UTC (permalink / raw)
  To: Maciej S. Szmigiero
  Cc: alsa-devel, Timur Tabi, Nicolin Chen, Xiubo Li, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, linuxppc-dev,
	linux-kernel, Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

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.

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

Regards,

Markus

> +		/* Need to clear RXDIR when using SYNC or AC97 mode */
>  		srcr &= ~CCSR_SSI_SRCR_RXDIR;
>  		scr |= CCSR_SSI_SCR_SYN;
>  	}
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
  2015-07-31  5:58 ` Markus Pargmann
@ 2015-07-31 15:13   ` Maciej S. Szmigiero
  2015-08-02 18:51     ` Markus Pargmann
  0 siblings, 1 reply; 14+ messages in thread
From: Maciej S. Szmigiero @ 2015-07-31 15:13 UTC (permalink / raw)
  To: Markus Pargmann
  Cc: alsa-devel, Timur Tabi, Nicolin Chen, Xiubo Li, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, linuxppc-dev,
	linux-kernel, Fabio Estevam

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.

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
  2015-07-31 15:13   ` Maciej S. Szmigiero
@ 2015-08-02 18:51     ` Markus Pargmann
  2015-08-02 22:44         ` Maciej S. Szmigiero
  2015-08-05 15:29         ` Maciej S. Szmigiero
  0 siblings, 2 replies; 14+ messages in thread
From: Markus Pargmann @ 2015-08-02 18:51 UTC (permalink / raw)
  To: Maciej S. Szmigiero
  Cc: alsa-devel, Timur Tabi, Nicolin Chen, Xiubo Li, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, linuxppc-dev,
	linux-kernel, Fabio Estevam

[-- 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 --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 6/6 v2] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
  2015-08-02 18:51     ` Markus Pargmann
@ 2015-08-02 22:44         ` Maciej S. Szmigiero
  2015-08-05 15:29         ` Maciej S. Szmigiero
  1 sibling, 0 replies; 14+ messages in thread
From: Maciej S. Szmigiero @ 2015-08-02 22:44 UTC (permalink / raw)
  To: alsa-devel
  Cc: Markus Pargmann, Timur Tabi, Nicolin Chen, Xiubo Li,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	linuxppc-dev, linux-kernel, Fabio Estevam

Adjust set DAI format function in fsl_ssi driver
so it doesn't fail and clears RXDIR in AC'97 mode.

Changes from v1: fix indentation to be consistent with rest
of the driver.

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..1ba63bd 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;
 	}
 
 	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)) {
+		/* Need to clear RXDIR when using SYNC or AC97 mode */
 		srcr &= ~CCSR_SSI_SRCR_RXDIR;
 		scr |= CCSR_SSI_SCR_SYN;
 	}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/6 v2] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
@ 2015-08-02 22:44         ` Maciej S. Szmigiero
  0 siblings, 0 replies; 14+ messages in thread
From: Maciej S. Szmigiero @ 2015-08-02 22:44 UTC (permalink / raw)
  To: alsa-devel
  Cc: Xiubo Li, Takashi Iwai, linux-kernel, Liam Girdwood, Timur Tabi,
	Nicolin Chen, Mark Brown, Fabio Estevam, Markus Pargmann,
	linuxppc-dev

Adjust set DAI format function in fsl_ssi driver
so it doesn't fail and clears RXDIR in AC'97 mode.

Changes from v1: fix indentation to be consistent with rest
of the driver.

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..1ba63bd 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;
 	}
 
 	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)) {
+		/* Need to clear RXDIR when using SYNC or AC97 mode */
 		srcr &= ~CCSR_SSI_SRCR_RXDIR;
 		scr |= CCSR_SSI_SCR_SYN;
 	}

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6 v2] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
  2015-08-02 22:44         ` Maciej S. Szmigiero
  (?)
@ 2015-08-03 16:21         ` Mark Brown
  2015-08-03 22:42             ` Maciej S. Szmigiero
  -1 siblings, 1 reply; 14+ messages in thread
From: Mark Brown @ 2015-08-03 16:21 UTC (permalink / raw)
  To: Maciej S. Szmigiero
  Cc: alsa-devel, Markus Pargmann, Timur Tabi, Nicolin Chen, Xiubo Li,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, linuxppc-dev,
	linux-kernel, Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

On Mon, Aug 03, 2015 at 12:44:11AM +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.
> 
> Changes from v1: fix indentation to be consistent with rest
> of the driver.

Inter version changelogs go after the --- as covered in
SubmittingPatches.

> 
> Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>

Please don't bury new patches in reply to old submissions, especially
not individual patches - it makes it hard to work out what's going on
and make sure that the most current version of everything is being
applied.  In order to avoid confusion I'm not going to look at these,
please resubmit as a new thread.

Please also try to thread your patch series together (git send-email can
do this for you) - it also helps people keep track of things.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6 v2] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
  2015-08-03 16:21         ` Mark Brown
@ 2015-08-03 22:42             ` Maciej S. Szmigiero
  0 siblings, 0 replies; 14+ messages in thread
From: Maciej S. Szmigiero @ 2015-08-03 22:42 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Markus Pargmann, Timur Tabi, Nicolin Chen, Xiubo Li,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, linuxppc-dev,
	linux-kernel, Fabio Estevam

On 03.08.2015 18:21, Mark Brown wrote:
> On Mon, Aug 03, 2015 at 12:44:11AM +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.
>>
>> Changes from v1: fix indentation to be consistent with rest
>> of the driver.
> 
> Inter version changelogs go after the --- as covered in
> SubmittingPatches.
> 
>>
>> Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
> 
> Please don't bury new patches in reply to old submissions, especially
> not individual patches - it makes it hard to work out what's going on
> and make sure that the most current version of everything is being
> applied.  In order to avoid confusion I'm not going to look at these,
> please resubmit as a new thread.
> 
> Please also try to thread your patch series together (git send-email can
> do this for you) - it also helps people keep track of things.

Thanks for information.

In cases like this where only one patch of six patch series is updated
should other ones be resubmitted as well to keep the full patch series
together?

Best regards,
Maciej Szmigiero


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6 v2] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
@ 2015-08-03 22:42             ` Maciej S. Szmigiero
  0 siblings, 0 replies; 14+ messages in thread
From: Maciej S. Szmigiero @ 2015-08-03 22:42 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Xiubo Li, Takashi Iwai, linux-kernel, Liam Girdwood,
	Timur Tabi, Nicolin Chen, Fabio Estevam, Markus Pargmann,
	linuxppc-dev

On 03.08.2015 18:21, Mark Brown wrote:
> On Mon, Aug 03, 2015 at 12:44:11AM +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.
>>
>> Changes from v1: fix indentation to be consistent with rest
>> of the driver.
> 
> Inter version changelogs go after the --- as covered in
> SubmittingPatches.
> 
>>
>> Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
> 
> Please don't bury new patches in reply to old submissions, especially
> not individual patches - it makes it hard to work out what's going on
> and make sure that the most current version of everything is being
> applied.  In order to avoid confusion I'm not going to look at these,
> please resubmit as a new thread.
> 
> Please also try to thread your patch series together (git send-email can
> do this for you) - it also helps people keep track of things.

Thanks for information.

In cases like this where only one patch of six patch series is updated
should other ones be resubmitted as well to keep the full patch series
together?

Best regards,
Maciej Szmigiero

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6 v2] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
  2015-08-03 22:42             ` Maciej S. Szmigiero
  (?)
@ 2015-08-04  9:07             ` Mark Brown
  -1 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2015-08-04  9:07 UTC (permalink / raw)
  To: Maciej S. Szmigiero
  Cc: alsa-devel, Markus Pargmann, Timur Tabi, Nicolin Chen, Xiubo Li,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, linuxppc-dev,
	linux-kernel, Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

On Tue, Aug 04, 2015 at 12:42:48AM +0200, Maciej S. Szmigiero wrote:

> In cases like this where only one patch of six patch series is updated
> should other ones be resubmitted as well to keep the full patch series
> together?

Yes, any unapplied patches should be resubmitted.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 6/6 v2][RESEND] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
  2015-08-02 18:51     ` Markus Pargmann
@ 2015-08-05 15:29         ` Maciej S. Szmigiero
  2015-08-05 15:29         ` Maciej S. Szmigiero
  1 sibling, 0 replies; 14+ messages in thread
From: Maciej S. Szmigiero @ 2015-08-05 15:29 UTC (permalink / raw)
  To: alsa-devel
  Cc: Markus Pargmann, Timur Tabi, Nicolin Chen, Xiubo Li,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	linuxppc-dev, linux-kernel, Fabio Estevam

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>
---
Changes from v1: fix indentation to be consistent with rest
of the driver.

 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..1ba63bd 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;
 	}
 
 	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)) {
+		/* Need to clear RXDIR when using SYNC or AC97 mode */
 		srcr &= ~CCSR_SSI_SRCR_RXDIR;
 		scr |= CCSR_SSI_SCR_SYN;
 	}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/6 v2][RESEND] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
@ 2015-08-05 15:29         ` Maciej S. Szmigiero
  0 siblings, 0 replies; 14+ messages in thread
From: Maciej S. Szmigiero @ 2015-08-05 15:29 UTC (permalink / raw)
  To: alsa-devel
  Cc: Xiubo Li, Takashi Iwai, linux-kernel, Liam Girdwood, Timur Tabi,
	Nicolin Chen, Mark Brown, Fabio Estevam, Markus Pargmann,
	linuxppc-dev

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>
---
Changes from v1: fix indentation to be consistent with rest
of the driver.

 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..1ba63bd 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;
 	}
 
 	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)) {
+		/* Need to clear RXDIR when using SYNC or AC97 mode */
 		srcr &= ~CCSR_SSI_SRCR_RXDIR;
 		scr |= CCSR_SSI_SCR_SYN;
 	}

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Applied "ASoC: fsl_ssi: adjust set DAI format in AC'97 mode" to the asoc tree
  2015-08-02 22:44         ` Maciej S. Szmigiero
  (?)
  (?)
@ 2015-08-15  2:13         ` Mark Brown
  -1 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2015-08-15  2:13 UTC (permalink / raw)
  To: Maciej Szmigiero, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: fsl_ssi: adjust set DAI format in AC'97 mode

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From dce0332c85c4d9eb5d96182c56f63cd20566f073 Mon Sep 17 00:00:00 2001
From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Date: Wed, 5 Aug 2015 17:29:02 +0200
Subject: [PATCH] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode

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>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/fsl/fsl_ssi.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index e79dc16..f03d57e 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;
 	}
 
 	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)) {
+		/* Need to clear RXDIR when using SYNC or AC97 mode */
 		srcr &= ~CCSR_SSI_SRCR_RXDIR;
 		scr |= CCSR_SSI_SCR_SYN;
 	}
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/6] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
@ 2015-06-28 13:49 Maciej S. Szmigiero
  0 siblings, 0 replies; 14+ messages in thread
From: Maciej S. Szmigiero @ 2015-06-28 13:49 UTC (permalink / raw)
  To: alsa-devel
  Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, linuxppc-dev, linux-kernel,
	Fabio Estevam

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 e79dc16..d043c7c 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;
 	}
 
 	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)) {
+		/* Need to clear RXDIR when using SYNC or AC97 mode */
 		srcr &= ~CCSR_SSI_SRCR_RXDIR;
 		scr |= CCSR_SSI_SCR_SYN;
 	}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-08-15  2:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-08-02 22:44       ` [PATCH 6/6 v2] " Maciej S. Szmigiero
2015-08-02 22:44         ` Maciej S. Szmigiero
2015-08-03 16:21         ` Mark Brown
2015-08-03 22:42           ` Maciej S. Szmigiero
2015-08-03 22:42             ` Maciej S. Szmigiero
2015-08-04  9:07             ` Mark Brown
2015-08-15  2:13         ` Applied "ASoC: fsl_ssi: adjust set DAI format in AC'97 mode" to the asoc tree Mark Brown
2015-08-05 15:29       ` [PATCH 6/6 v2][RESEND] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode Maciej S. Szmigiero
2015-08-05 15:29         ` Maciej S. Szmigiero
  -- strict thread matches above, loose matches on Subject: below --
2015-06-28 13:49 [PATCH 6/6] " Maciej S. Szmigiero

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.