[alsa-devel] [PATCH] eukrea-tlv320: add support for our i.MX25 board
* tdm slot has to be configured to get sound working on i.MX25
Signed-off-by: Eric Bénard eric@eukrea.com --- sound/soc/imx/Kconfig | 2 +- sound/soc/imx/eukrea-tlv320.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig index fd292f1..fd616ae 100644 --- a/sound/soc/imx/Kconfig +++ b/sound/soc/imx/Kconfig @@ -31,7 +31,7 @@ config SND_SOC_PHYCORE_AC97
config SND_SOC_EUKREA_TLV320 bool "Eukrea TLV320" - depends on MACH_EUKREA_MBIMX27_BASEBOARD + depends on MACH_EUKREA_MBIMX27_BASEBOARD || MACH_EUKREA_MBIMXSD_BASEBOARD select SND_MXC_SOC_SSI select SND_SOC_TLV320AIC23 help diff --git a/sound/soc/imx/eukrea-tlv320.c b/sound/soc/imx/eukrea-tlv320.c index 968380a..45f5e4b 100644 --- a/sound/soc/imx/eukrea-tlv320.c +++ b/sound/soc/imx/eukrea-tlv320.c @@ -60,6 +60,7 @@ static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream, pr_err("%s: failed setting codec sysclk\n", __func__); return ret; } + snd_soc_dai_set_tdm_slot(cpu_dai, 0xffffffc, 0xffffffc, 2, 0);
ret = snd_soc_dai_set_sysclk(cpu_dai, IMX_SSP_SYS_CLK, 0, SND_SOC_CLOCK_IN); @@ -100,7 +101,7 @@ static int __init eukrea_tlv320_init(void) { int ret;
- if (!machine_is_eukrea_cpuimx27()) + if (!machine_is_eukrea_cpuimx27() && !machine_is_eukrea_cpuimx25sd()) /* return happy. We might run on a totally different machine */ return 0;
On Thu, 2010-06-17 at 15:44 +0200, Eric Bénard wrote:
- tdm slot has to be configured to get sound working on i.MX25
Signed-off-by: Eric Bénard eric@eukrea.com
sound/soc/imx/Kconfig | 2 +- sound/soc/imx/eukrea-tlv320.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig index fd292f1..fd616ae 100644 --- a/sound/soc/imx/Kconfig +++ b/sound/soc/imx/Kconfig @@ -31,7 +31,7 @@ config SND_SOC_PHYCORE_AC97
config SND_SOC_EUKREA_TLV320 bool "Eukrea TLV320"
- depends on MACH_EUKREA_MBIMX27_BASEBOARD
- depends on MACH_EUKREA_MBIMX27_BASEBOARD || MACH_EUKREA_MBIMXSD_BASEBOARD select SND_MXC_SOC_SSI select SND_SOC_TLV320AIC23 help
diff --git a/sound/soc/imx/eukrea-tlv320.c b/sound/soc/imx/eukrea-tlv320.c index 968380a..45f5e4b 100644 --- a/sound/soc/imx/eukrea-tlv320.c +++ b/sound/soc/imx/eukrea-tlv320.c @@ -60,6 +60,7 @@ static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream, pr_err("%s: failed setting codec sysclk\n", __func__); return ret; }
snd_soc_dai_set_tdm_slot(cpu_dai, 0xffffffc, 0xffffffc, 2, 0);
ret = snd_soc_dai_set_sysclk(cpu_dai, IMX_SSP_SYS_CLK, 0, SND_SOC_CLOCK_IN);
@@ -100,7 +101,7 @@ static int __init eukrea_tlv320_init(void) { int ret;
- if (!machine_is_eukrea_cpuimx27())
- if (!machine_is_eukrea_cpuimx27() && !machine_is_eukrea_cpuimx25sd()) /* return happy. We might run on a totally different machine */ return 0;
Acked-by: Liam Girdwood lrg@slimlogic.co.uk
On Thu, Jun 17, 2010 at 03:44:01PM +0200, Eric Bénard wrote:
- tdm slot has to be configured to get sound working on i.MX25
Signed-off-by: Eric Bénard eric@eukrea.com
Applied but I had to hand apply the Kconfig update, please check that it applied correctly.
Hi Mark,
Le 18/06/2010 02:56, Mark Brown a écrit :
On Thu, Jun 17, 2010 at 03:44:01PM +0200, Eric Bénard wrote:
- tdm slot has to be configured to get sound working on i.MX25
Signed-off-by: Eric Bénarderic@eukrea.com
Applied but I had to hand apply the Kconfig update, please check that it applied correctly.
Yes this seems fine, sorry I wasn't rebased against the right tree.
This Kconfig seems to have unecessary things into it : - config SND_MXC_SOC_SSI : not used in the kernel - 1st board : depends on SND_IMX_SOC select SND_MXC_SOC_SSI - 2nd board : select SND_MXC_SOC_SSI but doesn't depends on SND_IMX_SOC - 3rd board : select SND_IMX_SOC
Do you have any idea what SND_MXC_SOC_SSI is used for ?
Please find attached a patch which should clean this Kconfig. If it's ok for you, I'll submit it the right way.
Eric
On Fri, Jun 18, 2010 at 09:10:33AM +0200, Eric Bénard wrote:
This Kconfig seems to have unecessary things into it :
- config SND_MXC_SOC_SSI : not used in the kernel
That's supposed to be being used to build the SSI driver as a separate module.
- 1st board :
It'd be helpful to use actual names to make your mails legible, otherwise it's like Outlook style mail.
depends on SND_IMX_SOC select SND_MXC_SOC_SSI
- 2nd board : select SND_MXC_SOC_SSI but doesn't depends on SND_IMX_SOC
- 3rd board : select SND_IMX_SOC
Do you have any idea what SND_MXC_SOC_SSI is used for ?
Please find attached a patch which should clean this Kconfig. If it's ok for you, I'll submit it the right way.
This isn't the best approach, converting things so SND_IMX_SOC is a menu and we don't need to reference that at all from the individual items would be nicer since it saves having to do per-board handling.
Le 19/06/2010 02:29, Mark Brown a écrit :
On Fri, Jun 18, 2010 at 09:10:33AM +0200, Eric Bénard wrote:
This Kconfig seems to have unecessary things into it :
- config SND_MXC_SOC_SSI : not used in the kernel
That's supposed to be being used to build the SSI driver as a separate module.
ok, we can suppose that if someone introduce the possibility to build the SSI driver as a separate module, he will add the right Kconfig option.
- 1st board :
It'd be helpful to use actual names to make your mails legible, otherwise it's like Outlook style mail.
I don't understand what you mean here. What is "Outlook style mail" ?
Please find attached a patch which should clean this Kconfig. If it's ok for you, I'll submit it the right way.
This isn't the best approach, converting things so SND_IMX_SOC is a menu and we don't need to reference that at all from the individual items would be nicer since it saves having to do per-board handling.
OK, if I understood correctly what you mean here, the following patch should be better.
Thanks, Eric
On Sat, Jun 19, 2010 at 10:45:04AM +0200, Eric Bénard wrote:
Le 19/06/2010 02:29, Mark Brown a écrit :
That's supposed to be being used to build the SSI driver as a separate module.
ok, we can suppose that if someone introduce the possibility to build the SSI driver as a separate module, he will add the right Kconfig option.
This should just be a matter of a simple Makefile edit.
- 1st board :
It'd be helpful to use actual names to make your mails legible, otherwise it's like Outlook style mail.
I don't understand what you mean here. What is "Outlook style mail" ?
Replying by adding text at the top of a message without trimming any context.
Le 19/06/2010 13:06, Mark Brown a écrit :
On Sat, Jun 19, 2010 at 10:45:04AM +0200, Eric Bénard wrote:
Le 19/06/2010 02:29, Mark Brown a écrit :
That's supposed to be being used to build the SSI driver as a separate module.
ok, we can suppose that if someone introduce the possibility to build the SSI driver as a separate module, he will add the right Kconfig option.
This should just be a matter of a simple Makefile edit.
this should be simple but unless yoou accept it as an untested change, it would require testing when built as a module and I don't have the bandwitdh to do this testing.
- 1st board :
It'd be helpful to use actual names to make your mails legible, otherwise it's like Outlook style mail.
I don't understand what you mean here. What is "Outlook style mail" ?
Replying by adding text at the top of a message without trimming any context.
there was no top posting in my email and the only goal of 1st/2nd/3rd board enumeration was to provide a simple context showing the fact that 3 MXC boards are handling the Kconfig options in 3 different ways (providing the exact CONFIG name of each boards didn't seems to me as a necessary information for readers to understand this fact in this context).
Eric
Hi Mark,
Le 19/06/2010 13:06, Mark Brown a écrit :
On Sat, Jun 19, 2010 at 10:45:04AM +0200, Eric Bénard wrote:
ok, we can suppose that if someone introduce the possibility to build the SSI driver as a separate module, he will add the right Kconfig option.
This should just be a matter of a simple Makefile edit.
OK, I gave this a quick try and it doesn't seem actually possible to compile imx-ssi.c as a module without changing some code to separate ssi and pcm parts which are actually mixed in imx-ssi.c. So actually, selecting SND_IMX_SOC as a module produces snd-soc.imx.ko which integrates the SSI driver + the PCM drivers.
So actually the 3 following configurations are possible (and tested on my i.MX27 board) with the patch I sent for Kconfig : - imx soc driver in kernel, board driver in kernel - imx soc driver in kernel, board driver (snd-soc-eukrea-tlv320.ko) as a module - imx soc driver (snd-soc-imx.ko) and board driver (snd-soc-eukrea-tlv320.ko) as 2 modules.
Also thanks for suggesting this Makefile edit, this allowed me to fix sound support for my board when soc is compiled as a module ;-)
Eric
Signed-off-by: Eric Bénard eric@eukrea.com
Cc: lrg@slimlogic.co.uk Cc: broonie@opensource.wolfsonmicro.com Cc: s.hauer@pengutronix.de --- sound/soc/imx/Kconfig | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig index 6ef57e0..2f0d6d3 100644 --- a/sound/soc/imx/Kconfig +++ b/sound/soc/imx/Kconfig @@ -1,4 +1,4 @@ -config SND_IMX_SOC +menuconfig SND_IMX_SOC tristate "SoC Audio for Freescale i.MX CPUs" depends on ARCH_MXC select SND_PCM @@ -8,14 +8,12 @@ config SND_IMX_SOC Say Y or M if you want to add support for codecs attached to the i.MX SSI interface.
-config SND_MXC_SOC_SSI - tristate +if SND_IMX_SOC
config SND_MXC_SOC_WM1133_EV1 tristate "Audio on the the i.MX31ADS with WM1133-EV1 fitted" - depends on SND_IMX_SOC && MACH_MX31ADS_WM1133_EV1 && EXPERIMENTAL + depends on MACH_MX31ADS_WM1133_EV1 && EXPERIMENTAL select SND_SOC_WM8350 - select SND_MXC_SOC_SSI help Enable support for audio on the i.MX31ADS with the WM1133-EV1 PMIC board with WM8835x fitted. @@ -23,17 +21,17 @@ config SND_MXC_SOC_WM1133_EV1 config SND_SOC_PHYCORE_AC97 tristate "SoC Audio support for Phytec phyCORE (and phyCARD) boards" depends on MACH_PCM043 || MACH_PCA100 - select SND_MXC_SOC_SSI select SND_SOC_WM9712 help Say Y if you want to add support for SoC audio on Phytec phyCORE and phyCARD boards in AC97 mode
config SND_SOC_EUKREA_TLV320 - bool "Eukrea TLV320" + tristate "Eukrea TLV320" depends on MACH_EUKREA_MBIMX27_BASEBOARD || MACH_EUKREA_MBIMXSD_BASEBOARD - select SND_IMX_SOC select SND_SOC_TLV320AIC23 help Enable I2S based access to the TLV320AIC23B codec attached to the SSI4 interface + +endif # SND_IMX_SOC
Hi Mark,
Le 19/06/2010 10:47, Eric Bénard a écrit :
Signed-off-by: Eric Bénarderic@eukrea.com
Cc: lrg@slimlogic.co.uk Cc: broonie@opensource.wolfsonmicro.com Cc: s.hauer@pengutronix.de
sound/soc/imx/Kconfig | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig index 6ef57e0..2f0d6d3 100644 --- a/sound/soc/imx/Kconfig +++ b/sound/soc/imx/Kconfig @@ -1,4 +1,4 @@ -config SND_IMX_SOC +menuconfig SND_IMX_SOC tristate "SoC Audio for Freescale i.MX CPUs" depends on ARCH_MXC select SND_PCM @@ -8,14 +8,12 @@ config SND_IMX_SOC Say Y or M if you want to add support for codecs attached to the i.MX SSI interface.
-config SND_MXC_SOC_SSI
- tristate
+if SND_IMX_SOC
config SND_MXC_SOC_WM1133_EV1 tristate "Audio on the the i.MX31ADS with WM1133-EV1 fitted"
- depends on SND_IMX_SOC&& MACH_MX31ADS_WM1133_EV1&& EXPERIMENTAL
- depends on MACH_MX31ADS_WM1133_EV1&& EXPERIMENTAL select SND_SOC_WM8350
- select SND_MXC_SOC_SSI help Enable support for audio on the i.MX31ADS with the WM1133-EV1 PMIC board with WM8835x fitted.
@@ -23,17 +21,17 @@ config SND_MXC_SOC_WM1133_EV1 config SND_SOC_PHYCORE_AC97 tristate "SoC Audio support for Phytec phyCORE (and phyCARD) boards" depends on MACH_PCM043 || MACH_PCA100
select SND_MXC_SOC_SSI select SND_SOC_WM9712 help Say Y if you want to add support for SoC audio on Phytec phyCORE and phyCARD boards in AC97 mode
config SND_SOC_EUKREA_TLV320
bool "Eukrea TLV320"
- tristate "Eukrea TLV320" depends on MACH_EUKREA_MBIMX27_BASEBOARD || MACH_EUKREA_MBIMXSD_BASEBOARD
- select SND_IMX_SOC select SND_SOC_TLV320AIC23 help Enable I2S based access to the TLV320AIC23B codec attached to the SSI4 interface
+endif # SND_IMX_SOC
is this patch OK or should I rework it ?
Thanks, Eric
On Thu, 2010-06-24 at 12:47 +0100, Mark Brown wrote:
On 24 Jun 2010, at 12:46, Eric Bénard wrote:
is this patch OK or should I rework it ?
Liam needs to review it.
Eric, sorry I missed this one.
Acked-by: Liam Girdwood lrg@slimlogic.co.uk
On Sat, Jun 19, 2010 at 10:47:56AM +0200, Eric Bénard wrote:
Signed-off-by: Eric Bénard eric@eukrea.com
Applied but please try to use a standard subject line for your patches and avoid listing large numbers of CCs in the body of the mail that's sent out, these things mean that I need to hand-modify your changelog after applying.
participants (3)
-
Eric Bénard
-
Liam Girdwood
-
Mark Brown