diff mbox

ASoC: fsl: select SND_SOC_FSL_SAI or SND_SOC_FSL_SSI depending on SoC type

Message ID 1453293038-16032-1-git-send-email-LW@KARO-electronics.de (mailing list archive)
State New, archived
Headers show

Commit Message

Lothar Waßmann Jan. 20, 2016, 12:30 p.m. UTC
i.MX6UL does not provide an SSI interface like the other i.MX6 SoCs,
but only an SAI interface.
Select the appropriate interface(s) depending on the enabled SoC types.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
 sound/soc/fsl/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Mark Brown Jan. 28, 2016, 10:33 p.m. UTC | #1
On Wed, Jan 20, 2016 at 01:30:38PM +0100, Lothar Waßmann wrote:

> -	select SND_SOC_FSL_SSI
> +	select SND_SOC_FSL_SAI if SOC_IMX6UL
> +	select SND_SOC_FSL_SSI if SOC_IMX6Q || SOC_IMX6SL || SOC_IMX6SX

Does this card not work for older i.MXs (which had the same SSI/AUDMUX
combination as the majority of the i.MX6 family) as well?
Nicolin Chen Jan. 28, 2016, 11:08 p.m. UTC | #2
On Thu, Jan 28, 2016 at 11:33:52PM +0100, Mark Brown wrote:
> On Wed, Jan 20, 2016 at 01:30:38PM +0100, Lothar Waßmann wrote:
> 
> > -	select SND_SOC_FSL_SSI
> > +	select SND_SOC_FSL_SAI if SOC_IMX6UL
> > +	select SND_SOC_FSL_SSI if SOC_IMX6Q || SOC_IMX6SL || SOC_IMX6SX
> 
> Does this card not work for older i.MXs (which had the same SSI/AUDMUX
> combination as the majority of the i.MX6 family) as well?

It's widely used in older i.MXs according to their DTS files. So
it should be safer to just leave SSI over here.

And I actually doubt the feasibility of running this driver with
i.MX6UL as there might not be an AUDMUX on i.MX6UL since it does
not have SSI any more while the driver always touches the address
space of AUDMUX which may not exist on i.MX6UL.
Lothar Waßmann Jan. 29, 2016, 5:51 a.m. UTC | #3
Hi,

On Thu, 28 Jan 2016 15:08:47 -0800 Nicolin Chen wrote:
> On Thu, Jan 28, 2016 at 11:33:52PM +0100, Mark Brown wrote:
> > On Wed, Jan 20, 2016 at 01:30:38PM +0100, Lothar Waßmann wrote:
> > 
> > > -	select SND_SOC_FSL_SSI
> > > +	select SND_SOC_FSL_SAI if SOC_IMX6UL
> > > +	select SND_SOC_FSL_SSI if SOC_IMX6Q || SOC_IMX6SL || SOC_IMX6SX
> > 
> > Does this card not work for older i.MXs (which had the same SSI/AUDMUX
> > combination as the majority of the i.MX6 family) as well?
> 
> It's widely used in older i.MXs according to their DTS files. So
> it should be safer to just leave SSI over here.
> 
Nothing prevents you to enable the SSI driver on any i.MX6 module.
The only change I made is to select the SAI driver instead of the SSI
driver on i.MX6UL because the i.MX6UL does not have an SSI unit!

> And I actually doubt the feasibility of running this driver with
> i.MX6UL as there might not be an AUDMUX on i.MX6UL since it does
> not have SSI any more while the driver always touches the address
> space of AUDMUX which may not exist on i.MX6UL.
>
#define this driver
The FSL_SAI driver does not touch the audmux address space in any way.
The simple-card audio driver works perfectly well with the FSL_SAI
driver on i.MX6UL.


Lothar Waßmann
Lothar Waßmann Jan. 29, 2016, 5:59 a.m. UTC | #4
Hi,

On Thu, 28 Jan 2016 23:33:52 +0100 Mark Brown wrote:
> On Wed, Jan 20, 2016 at 01:30:38PM +0100, Lothar Waßmann wrote:
> 
> > -	select SND_SOC_FSL_SSI
> > +	select SND_SOC_FSL_SAI if SOC_IMX6UL
> > +	select SND_SOC_FSL_SSI if SOC_IMX6Q || SOC_IMX6SL || SOC_IMX6SX
> 
> Does this card not work for older i.MXs (which had the same SSI/AUDMUX
> combination as the majority of the i.MX6 family) as well?
>
Our baseboard contains an SGTL5000 codec which is working with
i.MX25, i.MX27, i.MX5, i.MX6Q, i.MX6DL with the fsl_ssi and imx-sgtl5000
+ imx-audmux driver, on i.MX28 with the mxs-saif and mxs-sgtl5000 driver
and on i.MX6UL with the fsl_sai + simple-card driver.


Lothar Waßmann
Nicolin Chen Jan. 29, 2016, 6:25 a.m. UTC | #5
On Fri, Jan 29, 2016 at 06:51:33AM +0100, Lothar Waßmann wrote:
> Hi,
> 
> On Thu, 28 Jan 2016 15:08:47 -0800 Nicolin Chen wrote:
> > On Thu, Jan 28, 2016 at 11:33:52PM +0100, Mark Brown wrote:
> > > On Wed, Jan 20, 2016 at 01:30:38PM +0100, Lothar Waßmann wrote:
> > > 
> > > > -	select SND_SOC_FSL_SSI
> > > > +	select SND_SOC_FSL_SAI if SOC_IMX6UL
> > > > +	select SND_SOC_FSL_SSI if SOC_IMX6Q || SOC_IMX6SL || SOC_IMX6SX
> > > 
> > > Does this card not work for older i.MXs (which had the same SSI/AUDMUX
> > > combination as the majority of the i.MX6 family) as well?
> > 
> > It's widely used in older i.MXs according to their DTS files. So
> > it should be safer to just leave SSI over here.
> > 
> Nothing prevents you to enable the SSI driver on any i.MX6 module.

What about i.MX2, 3 and 5 series? Will they still be able to enable
SSI without changing .config file as usual?

> The only change I made is to select the SAI driver instead of the SSI
> driver on i.MX6UL because the i.MX6UL does not have an SSI unit!
> 
> > And I actually doubt the feasibility of running this driver with
> > i.MX6UL as there might not be an AUDMUX on i.MX6UL since it does
> > not have SSI any more while the driver always touches the address
> > space of AUDMUX which may not exist on i.MX6UL.
> >
> #define this driver

Your change is applied to "SND_SOC_IMX_SGTL5000" whose corresponding
driver is the imx-sgtl5000.c file.

> The FSL_SAI driver does not touch the audmux address space in any way.

This imx-sgtl5000 driver does access AUDMUX registers. And I thought
you tried to use this one which made me very confused.

> The simple-card audio driver works perfectly well with the FSL_SAI
> driver on i.MX6UL.

It seems like you are using simple-card while letting the other driver
(imx-sgtl5000) select SAI for you. It doesn't sound so right to me.
Nicolin Chen Jan. 29, 2016, 6:30 a.m. UTC | #6
On Fri, Jan 29, 2016 at 06:59:38AM +0100, Lothar Waßmann wrote:
> Hi,
> 
> On Thu, 28 Jan 2016 23:33:52 +0100 Mark Brown wrote:
> > On Wed, Jan 20, 2016 at 01:30:38PM +0100, Lothar Waßmann wrote:
> > 
> > > -	select SND_SOC_FSL_SSI
> > > +	select SND_SOC_FSL_SAI if SOC_IMX6UL
> > > +	select SND_SOC_FSL_SSI if SOC_IMX6Q || SOC_IMX6SL || SOC_IMX6SX
> > 
> > Does this card not work for older i.MXs (which had the same SSI/AUDMUX
> > combination as the majority of the i.MX6 family) as well?
> >
> Our baseboard contains an SGTL5000 codec which is working with
> i.MX25, i.MX27, i.MX5, i.MX6Q, i.MX6DL with the fsl_ssi and imx-sgtl5000
> + imx-audmux driver, on i.MX28 with the mxs-saif and mxs-sgtl5000 driver
> and on i.MX6UL with the fsl_sai + simple-card driver.

Have you tried fsl-asoc-card to connect SSI/SAI with sgtl5000? If it
works for you directly, I believe things should be easier for you
instead of dealing with Kconfig.
Lothar Waßmann Jan. 29, 2016, 9:43 a.m. UTC | #7
Hi,

On Thu, 28 Jan 2016 22:30:13 -0800 Nicolin Chen wrote:
> On Fri, Jan 29, 2016 at 06:59:38AM +0100, Lothar Waßmann wrote:
> > Hi,
> > 
> > On Thu, 28 Jan 2016 23:33:52 +0100 Mark Brown wrote:
> > > On Wed, Jan 20, 2016 at 01:30:38PM +0100, Lothar Waßmann wrote:
> > > 
> > > > -	select SND_SOC_FSL_SSI
> > > > +	select SND_SOC_FSL_SAI if SOC_IMX6UL
> > > > +	select SND_SOC_FSL_SSI if SOC_IMX6Q || SOC_IMX6SL || SOC_IMX6SX
> > > 
> > > Does this card not work for older i.MXs (which had the same SSI/AUDMUX
> > > combination as the majority of the i.MX6 family) as well?
> > >
> > Our baseboard contains an SGTL5000 codec which is working with
> > i.MX25, i.MX27, i.MX5, i.MX6Q, i.MX6DL with the fsl_ssi and imx-sgtl5000
> > + imx-audmux driver, on i.MX28 with the mxs-saif and mxs-sgtl5000 driver
> > and on i.MX6UL with the fsl_sai + simple-card driver.
> 
> Have you tried fsl-asoc-card to connect SSI/SAI with sgtl5000? If it
> works for you directly, I believe things should be easier for you
> instead of dealing with Kconfig.
>
My patch simply selects the FSL_SAI instead of the FSL_SSI interface for
i.MX6UL since the latter is NOT AVAILABLE on i.MX6UL and thus it doesn't
make any sense to select it on this SoC.

But maybe the select statements should be removed altogether since they
are a case of the frowned-upon "select for user visible symbols".


Lothar Waßmann
Mark Brown Jan. 29, 2016, 11:16 a.m. UTC | #8
On Fri, Jan 29, 2016 at 06:59:38AM +0100, Lothar Waßmann wrote:
> On Thu, 28 Jan 2016 23:33:52 +0100 Mark Brown wrote:
> > On Wed, Jan 20, 2016 at 01:30:38PM +0100, Lothar Waßmann wrote:

> > > -	select SND_SOC_FSL_SSI
> > > +	select SND_SOC_FSL_SAI if SOC_IMX6UL
> > > +	select SND_SOC_FSL_SSI if SOC_IMX6Q || SOC_IMX6SL || SOC_IMX6SX

> > Does this card not work for older i.MXs (which had the same SSI/AUDMUX
> > combination as the majority of the i.MX6 family) as well?

> Our baseboard contains an SGTL5000 codec which is working with
> i.MX25, i.MX27, i.MX5, i.MX6Q, i.MX6DL with the fsl_ssi and imx-sgtl5000
> + imx-audmux driver, on i.MX28 with the mxs-saif and mxs-sgtl5000 driver
> and on i.MX6UL with the fsl_sai + simple-card driver.

That's your base board but that doesn't really help other users who may
be using this driver (and even for your system I'm not clear how
any configuration without an i.MX6 will enable a CPU DAI driver with
this change).
Lothar Waßmann Jan. 29, 2016, 11:33 a.m. UTC | #9
Hi,

On Thu, 28 Jan 2016 22:25:30 -0800 Nicolin Chen wrote:
> On Fri, Jan 29, 2016 at 06:51:33AM +0100, Lothar Waßmann wrote:
> > Hi,
> > 
> > On Thu, 28 Jan 2016 15:08:47 -0800 Nicolin Chen wrote:
> > > On Thu, Jan 28, 2016 at 11:33:52PM +0100, Mark Brown wrote:
> > > > On Wed, Jan 20, 2016 at 01:30:38PM +0100, Lothar Waßmann wrote:
> > > > 
> > > > > -	select SND_SOC_FSL_SSI
> > > > > +	select SND_SOC_FSL_SAI if SOC_IMX6UL
> > > > > +	select SND_SOC_FSL_SSI if SOC_IMX6Q || SOC_IMX6SL || SOC_IMX6SX
> > > > 
> > > > Does this card not work for older i.MXs (which had the same SSI/AUDMUX
> > > > combination as the majority of the i.MX6 family) as well?
> > > 
> > > It's widely used in older i.MXs according to their DTS files. So
> > > it should be safer to just leave SSI over here.
> > > 
> > Nothing prevents you to enable the SSI driver on any i.MX6 module.
> 
> What about i.MX2, 3 and 5 series? Will they still be able to enable
> SSI without changing .config file as usual?
> 
> > The only change I made is to select the SAI driver instead of the SSI
> > driver on i.MX6UL because the i.MX6UL does not have an SSI unit!
> > 
> > > And I actually doubt the feasibility of running this driver with
> > > i.MX6UL as there might not be an AUDMUX on i.MX6UL since it does
> > > not have SSI any more while the driver always touches the address
> > > space of AUDMUX which may not exist on i.MX6UL.
> > >
> > #define this driver
> 
> Your change is applied to "SND_SOC_IMX_SGTL5000" whose corresponding
> driver is the imx-sgtl5000.c file.
> 
> > The FSL_SAI driver does not touch the audmux address space in any way.
> 
> This imx-sgtl5000 driver does access AUDMUX registers. And I thought
> you tried to use this one which made me very confused.
> 
That change is obsolete, because as Mark Brown suggested, the
simple-card driver works perfectly well.

> > The simple-card audio driver works perfectly well with the FSL_SAI
> > driver on i.MX6UL.
> 
> It seems like you are using simple-card while letting the other driver
> (imx-sgtl5000) select SAI for you. It doesn't sound so right to me.
>
That was before I found out that the simple-card driver works.


Lothar Waßmann
diff mbox

Patch

diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 14dfdee..c128823 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -258,7 +258,8 @@  config SND_SOC_IMX_SGTL5000
 	select SND_SOC_SGTL5000
 	select SND_SOC_IMX_PCM_DMA
 	select SND_SOC_IMX_AUDMUX
-	select SND_SOC_FSL_SSI
+	select SND_SOC_FSL_SAI if SOC_IMX6UL
+	select SND_SOC_FSL_SSI if SOC_IMX6Q || SOC_IMX6SL || SOC_IMX6SX
 	help
 	  Say Y if you want to add support for SoC audio on an i.MX board with
 	  a sgtl5000 codec.