diff mbox

ASoC: fsl: select SND_SOC_IMX_PCM_DMA where needed

Message ID 4270904.84oGcCXL4B@wuerfel
State New
Headers show

Commit Message

Arnd Bergmann April 29, 2014, 10:37 a.m. UTC
On Tuesday 29 April 2014 07:07:33 Alexander Shiyan wrote:
> Mon, 28 Apr 2014 23:12:14 +0200 от Arnd Bergmann <arnd@arndb.de>:
> > On Tuesday 29 April 2014 00:35:41 Alexander Shiyan wrote:
> > > 
> > > So, I don't understand why this error happen, as well as I can not
> > > reproduce this...
> > 
> > It's probably CONFIG_SND_SOC_IMX_PCM_DMA=m and CONFIG_SND_SOC_FSL_SSI=y then.
> > What is the intended behavior in this case? Should CONFIG_SND_SOC_FSL_SSI
> > be forced to be a module as well?
> 
> Hmm, yes...
> I thought that I had already solved a similar problem for the earlier
> version of the patch ...

How about this?

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Comments

Lars-Peter Clausen April 29, 2014, 10:57 a.m. UTC | #1
On 04/29/2014 12:37 PM, Arnd Bergmann wrote:
> On Tuesday 29 April 2014 07:07:33 Alexander Shiyan wrote:
>> Mon, 28 Apr 2014 23:12:14 +0200 от Arnd Bergmann <arnd@arndb.de>:
>>> On Tuesday 29 April 2014 00:35:41 Alexander Shiyan wrote:
>>>>
>>>> So, I don't understand why this error happen, as well as I can not
>>>> reproduce this...
>>>
>>> It's probably CONFIG_SND_SOC_IMX_PCM_DMA=m and CONFIG_SND_SOC_FSL_SSI=y then.
>>> What is the intended behavior in this case? Should CONFIG_SND_SOC_FSL_SSI
>>> be forced to be a module as well?
>>
>> Hmm, yes...
>> I thought that I had already solved a similar problem for the earlier
>> version of the patch ...
>
> How about this?

Having FSL_SSI/FSL_SPDIF, but not SND_SOC_IMX_PCM_DMA does not make sense on 
iMX.
So how about:

	select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC

and remove all the other 'select SND_SOC_IMX_PCM_DMA' statements. That's in 
my opinion much nicer.

- Lars


>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
> index fb26345..af0bb92 100644
> --- a/sound/soc/fsl/Kconfig
> +++ b/sound/soc/fsl/Kconfig
> @@ -9,6 +9,7 @@ config SND_SOC_FSL_SAI
>
>   config SND_SOC_FSL_SSI
>   	tristate "Synchronous Serial Interface module support"
> +	depends on m || SND_SOC_IMX_PCM_DMA != m
>   	help
>   	  Say Y if you want to add Synchronous Serial Interface (SSI)
>   	  support for the Freescale CPUs.
> @@ -18,6 +19,7 @@ config SND_SOC_FSL_SSI
>   config SND_SOC_FSL_SPDIF
>   	tristate "Sony/Philips Digital Interface module support"
>   	select REGMAP_MMIO
> +	depends on m || SND_SOC_IMX_PCM_DMA != m
>   	help
>   	  Say Y if you want to add Sony/Philips Digital Interface (SPDIF)
>   	  support for the Freescale CPUs.
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
Arnd Bergmann April 29, 2014, 1:30 p.m. UTC | #2
On Tuesday 29 April 2014 12:57:24 Lars-Peter Clausen wrote:
> On 04/29/2014 12:37 PM, Arnd Bergmann wrote:
> > On Tuesday 29 April 2014 07:07:33 Alexander Shiyan wrote:
> >> Mon, 28 Apr 2014 23:12:14 +0200 от Arnd Bergmann <arnd@arndb.de>:
> >>> On Tuesday 29 April 2014 00:35:41 Alexander Shiyan wrote:
> >>>>
> >>>> So, I don't understand why this error happen, as well as I can not
> >>>> reproduce this...
> >>>
> >>> It's probably CONFIG_SND_SOC_IMX_PCM_DMA=m and CONFIG_SND_SOC_FSL_SSI=y then.
> >>> What is the intended behavior in this case? Should CONFIG_SND_SOC_FSL_SSI
> >>> be forced to be a module as well?
> >>
> >> Hmm, yes...
> >> I thought that I had already solved a similar problem for the earlier
> >> version of the patch ...
> >
> > How about this?
> 
> Having FSL_SSI/FSL_SPDIF, but not SND_SOC_IMX_PCM_DMA does not make sense on 
> iMX.
> So how about:
> 
>         select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC
> 
> and remove all the other 'select SND_SOC_IMX_PCM_DMA' statements. That's in 
> my opinion much nicer.

Yes, makes sense. Should I do another version of the patch?

	Arnd
Lars-Peter Clausen April 29, 2014, 2:30 p.m. UTC | #3
On 04/29/2014 03:30 PM, Arnd Bergmann wrote:
> On Tuesday 29 April 2014 12:57:24 Lars-Peter Clausen wrote:
>> On 04/29/2014 12:37 PM, Arnd Bergmann wrote:
>>> On Tuesday 29 April 2014 07:07:33 Alexander Shiyan wrote:
>>>> Mon, 28 Apr 2014 23:12:14 +0200 от Arnd Bergmann <arnd@arndb.de>:
>>>>> On Tuesday 29 April 2014 00:35:41 Alexander Shiyan wrote:
>>>>>>
>>>>>> So, I don't understand why this error happen, as well as I can not
>>>>>> reproduce this...
>>>>>
>>>>> It's probably CONFIG_SND_SOC_IMX_PCM_DMA=m and CONFIG_SND_SOC_FSL_SSI=y then.
>>>>> What is the intended behavior in this case? Should CONFIG_SND_SOC_FSL_SSI
>>>>> be forced to be a module as well?
>>>>
>>>> Hmm, yes...
>>>> I thought that I had already solved a similar problem for the earlier
>>>> version of the patch ...
>>>
>>> How about this?
>>
>> Having FSL_SSI/FSL_SPDIF, but not SND_SOC_IMX_PCM_DMA does not make sense on
>> iMX.
>> So how about:
>>
>>          select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC
>>
>> and remove all the other 'select SND_SOC_IMX_PCM_DMA' statements. That's in
>> my opinion much nicer.
>
> Yes, makes sense. Should I do another version of the patch?

Yes. The patch should also add a select for SND_SOC_IMX_PCM_FIQ as that is 
used in the same way in the fsl_ssi driver. If anybody is afraid that 
selecting both SND_SOC_IMX_PCM_FIQ and SND_SOC_IMX_PCM_DMA by default adds 
too much overhead you could add boolean sub-options that allow to 
enable/disable support individually.

- Lars
Mark Brown April 29, 2014, 4:56 p.m. UTC | #4
On Tue, Apr 29, 2014 at 04:30:43PM +0200, Lars-Peter Clausen wrote:

> Yes. The patch should also add a select for SND_SOC_IMX_PCM_FIQ as that is
> used in the same way in the fsl_ssi driver. If anybody is afraid that
> selecting both SND_SOC_IMX_PCM_FIQ and SND_SOC_IMX_PCM_DMA by default adds
> too much overhead you could add boolean sub-options that allow to
> enable/disable support individually.

Yes, the overhead should be negligable since the FIQ code is tiny.
Arnd, please CC maintainers on patches - you've sent this to my
Linaro address again and not added Liam.
Mark Brown May 1, 2014, 8:54 p.m. UTC | #5
On Tue, Apr 29, 2014 at 09:36:22PM +0200, Arnd Bergmann wrote:
> Since commit 204dec93eaa "ASoC: fsl: Allow to select individual common
> options", it is possible to enable SND_SOC_FSL_SSI and SND_SOC_FSL_SPDIF
> manually, either as loadable modules or built-in. This unfortunately
> leads to a link error if one or both of them are built-in, while
> the imx-pcm-dma framework is a loadable module:

Applied, thanks.  Please don't send patches in reply to existing threads
(especially with the Re - it makes it look like ongoing discussion, I at
least often leave these discussions among people working on the platform
to grind on).
diff mbox

Patch

diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index fb26345..af0bb92 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -9,6 +9,7 @@  config SND_SOC_FSL_SAI
 
 config SND_SOC_FSL_SSI
 	tristate "Synchronous Serial Interface module support"
+	depends on m || SND_SOC_IMX_PCM_DMA != m
 	help
 	  Say Y if you want to add Synchronous Serial Interface (SSI)
 	  support for the Freescale CPUs.
@@ -18,6 +19,7 @@  config SND_SOC_FSL_SSI
 config SND_SOC_FSL_SPDIF
 	tristate "Sony/Philips Digital Interface module support"
 	select REGMAP_MMIO
+	depends on m || SND_SOC_IMX_PCM_DMA != m
 	help
 	  Say Y if you want to add Sony/Philips Digital Interface (SPDIF)
 	  support for the Freescale CPUs.