[alsa-devel] [PATCH 0/5] ARM/ASoC: omap: n810 audio support
Hi,
The verification of the sdma-pcm on OMAP2 got delayed by non working audio on n810.
With the following patches audio works on n810 (both with the old omap-pcm and the new sdma-pcm).
I believe the DTS and ASoC patches are fine to go via different tree, but I wanted to keep the patches together for easier testing.
The series does not have any dependencies, I will rebase the sdma-pcm series on top of this and resend.
Regards, Peter --- Jarkko Nikula (1): ASoC: omap: Remove OMAP_MUX dependency from Nokia N810 audio support
Peter Ujfalusi (4): ARM: dts: omap2420-n810: Enable McBSP2 for audio ARM: dts: omap2420-n810: Correct the audio codec (tlv320aic33) node ASoC: omap: n810: Correct the card level dapm_route ASoC: omap: n810: Correct the cpu_dai, platform and codec name
arch/arm/boot/dts/omap2420-n810.dts | 38 +++++++++++++++++++++++++++-- sound/soc/omap/Kconfig | 1 - sound/soc/omap/n810.c | 10 ++++---- 3 files changed, 41 insertions(+), 8 deletions(-)
McBSP2 is used with the tlv320aic33 codec for audio. Pin mux change is needed to get the needed signals in/out from the SoC.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com --- arch/arm/boot/dts/omap2420-n810.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/arch/arm/boot/dts/omap2420-n810.dts b/arch/arm/boot/dts/omap2420-n810.dts index 7c485fbfa535..4c412a480c3e 100644 --- a/arch/arm/boot/dts/omap2420-n810.dts +++ b/arch/arm/boot/dts/omap2420-n810.dts @@ -8,9 +8,26 @@ compatible = "nokia,n810", "nokia,n8x0", "ti,omap2420", "ti,omap2"; };
+&omap2420_pmx { + mcbsp2_pins: mcbsp2_pins { + pinctrl-single,pins = < + OMAP2420_CORE_IOPAD(0x0124, PIN_INPUT | MUX_MODE1) /* eac_ac_sclk.mcbsp2_clkx */ + OMAP2420_CORE_IOPAD(0x0125, PIN_INPUT | MUX_MODE1) /* eac_ac_fs.mcbsp2_fsx */ + OMAP2420_CORE_IOPAD(0x0126, PIN_INPUT | MUX_MODE1) /* eac_ac_din.mcbsp2_dr */ + OMAP2420_CORE_IOPAD(0x0127, PIN_OUTPUT | MUX_MODE1) /* eac_ac_dout.mcbsp2_dx */ + >; + }; +}; + &i2c2 { aic3x@18 { compatible = "tlv320aic3x"; reg = <0x18>; }; }; +&mcbsp2 { + pinctrl-names = "default"; + pinctrl-0 = <&mcbsp2_pins>; + + status = "okay"; +};
On 04/26/18 14:51, Peter Ujfalusi wrote:
McBSP2 is used with the tlv320aic33 codec for audio. Pin mux change is needed to get the needed signals in/out from the SoC.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com
arch/arm/boot/dts/omap2420-n810.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) Tested-by: Jarkko Nikula jarkko.nikula@bitmer.com
The n810 uses tlv320aic33 codec. GPIO118 is used as reset GPIO for the codec, which was missing. The MCLK of the codec is connected to the SYS_CLKOUT2 of omap2420. The SYS_CLKOUT2 needs to be running at 12MHz.
Add the pinctrl entries to configure the pins for GPIO118 and SYS_CLKOUT2.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com --- arch/arm/boot/dts/omap2420-n810.dts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/omap2420-n810.dts b/arch/arm/boot/dts/omap2420-n810.dts index 4c412a480c3e..db4c8a7a1a84 100644 --- a/arch/arm/boot/dts/omap2420-n810.dts +++ b/arch/arm/boot/dts/omap2420-n810.dts @@ -17,14 +17,31 @@ OMAP2420_CORE_IOPAD(0x0127, PIN_OUTPUT | MUX_MODE1) /* eac_ac_dout.mcbsp2_dx */ >; }; + + aic33_pins: aic33_pins { + pinctrl-single,pins = < + OMAP2420_CORE_IOPAD(0x0129, PIN_OUTPUT | MUX_MODE3) /* eac_ac_rst.gpio118 */ + OMAP2420_CORE_IOPAD(0x00e8, PIN_OUTPUT | MUX_MODE2) /* vlynq_tx1.sys_clkout2 */ + >; + }; };
&i2c2 { - aic3x@18 { - compatible = "tlv320aic3x"; + aic33@18 { + compatible = "ti,tlv320aic33"; reg = <0x18>; + + pinctrl-names = "default"; + pinctrl-0 = <&aic33_pins>; + + gpio-reset = <&gpio4 22 GPIO_ACTIVE_LOW>; /* gpio118 */ + + assigned-clocks = <&sys_clkout2_src>, <&sys_clkout2>; + assigned-clock-parents = <&func_96m_ck>; + assigned-clock-rates = <0>, <12000000>; }; }; + &mcbsp2 { pinctrl-names = "default"; pinctrl-0 = <&mcbsp2_pins>;
On 04/26/18 14:51, Peter Ujfalusi wrote:
The n810 uses tlv320aic33 codec. GPIO118 is used as reset GPIO for the codec, which was missing. The MCLK of the codec is connected to the SYS_CLKOUT2 of omap2420. The SYS_CLKOUT2 needs to be running at 12MHz.
Add the pinctrl entries to configure the pins for GPIO118 and SYS_CLKOUT2.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com
arch/arm/boot/dts/omap2420-n810.dts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
Tested-by: Jarkko Nikula jarkko.nikula@bitmer.com
Fix the capture DAPM route due to core changes regarding to mic bias.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com --- sound/soc/omap/n810.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 71e5f31fa306..e44bb5baac41 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c @@ -231,8 +231,8 @@ static const struct snd_soc_dapm_route audio_map[] = { {"Ext Spk", NULL, "LLOUT"}, {"Ext Spk", NULL, "RLOUT"},
- {"DMic Rate 64", NULL, "Mic Bias"}, - {"Mic Bias", NULL, "DMic"}, + {"DMic Rate 64", NULL, "DMic"}, + {"DMic", NULL, "Mic Bias"}, };
static const char *spk_function[] = {"Off", "On"};
On 04/26/18 14:51, Peter Ujfalusi wrote:
Fix the capture DAPM route due to core changes regarding to mic bias.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com
sound/soc/omap/n810.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 71e5f31fa306..e44bb5baac41 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c @@ -231,8 +231,8 @@ static const struct snd_soc_dapm_route audio_map[] = { {"Ext Spk", NULL, "LLOUT"}, {"Ext Spk", NULL, "RLOUT"},
- {"DMic Rate 64", NULL, "Mic Bias"},
- {"Mic Bias", NULL, "DMic"},
- {"DMic Rate 64", NULL, "DMic"},
- {"DMic", NULL, "Mic Bias"},
};
I'd like to add tested-by here too, but didn't get capture path outputting anything but zeros for both ADC and DMIC. But that's most probably I had some knob in wrong position.
Acked-by: Jarkko Nikula jarkko.nikula@bitmer.com
The patch
ASoC: omap: n810: Correct the card level dapm_route
has been applied to the asoc tree at
https://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 9395b0042c4675c7f6d67c6c8c2f96e8e02e2a41 Mon Sep 17 00:00:00 2001
From: Peter Ujfalusi peter.ujfalusi@ti.com Date: Fri, 27 Apr 2018 11:17:12 +0300 Subject: [PATCH] ASoC: omap: n810: Correct the card level dapm_route
Fix the capture DAPM route due to core changes regarding to mic bias.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com Acked-by: Jarkko Nikula jarkko.nikula@bitmer.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/omap/n810.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 71e5f31fa306..e44bb5baac41 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c @@ -231,8 +231,8 @@ static const struct snd_soc_dapm_route audio_map[] = { {"Ext Spk", NULL, "LLOUT"}, {"Ext Spk", NULL, "RLOUT"},
- {"DMic Rate 64", NULL, "Mic Bias"}, - {"Mic Bias", NULL, "DMic"}, + {"DMic Rate 64", NULL, "DMic"}, + {"DMic", NULL, "Mic Bias"}, };
static const char *spk_function[] = {"Off", "On"};
The non DT boot is no longer supported and when booting with DT the device names are different.
Fix them up for now, but the n810.c should be updated to support probing via DT with proper bindings.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com --- sound/soc/omap/n810.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index e44bb5baac41..3a2c448a26dd 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c @@ -257,9 +257,9 @@ static const struct snd_kcontrol_new aic33_n810_controls[] = { static struct snd_soc_dai_link n810_dai = { .name = "TLV320AIC33", .stream_name = "AIC33", - .cpu_dai_name = "omap-mcbsp.2", - .platform_name = "omap-mcbsp.2", - .codec_name = "tlv320aic3x-codec.2-0018", + .cpu_dai_name = "48076000.mcbsp", + .platform_name = "48076000.mcbsp", + .codec_name = "tlv320aic3x-codec.1-0018", .codec_dai_name = "tlv320aic3x-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM,
On 04/26/18 14:51, Peter Ujfalusi wrote:
The non DT boot is no longer supported and when booting with DT the device names are different.
Fix them up for now, but the n810.c should be updated to support probing via DT with proper bindings.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com
sound/soc/omap/n810.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Acked-by: Jarkko Nikula jarkko.nikula@bitmer.com
The patch
ASoC: omap: n810: Correct the cpu_dai, platform and codec name
has been applied to the asoc tree at
https://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 6f4a7594a6271b61f06382c0d4ec0525016edec6 Mon Sep 17 00:00:00 2001
From: Peter Ujfalusi peter.ujfalusi@ti.com Date: Fri, 27 Apr 2018 11:17:13 +0300 Subject: [PATCH] ASoC: omap: n810: Correct the cpu_dai, platform and codec name
The non DT boot is no longer supported and when booting with DT the device names are different.
Fix them up for now, but the n810.c should be updated to support probing via DT with proper bindings.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com Acked-by: Jarkko Nikula jarkko.nikula@bitmer.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/omap/n810.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index e44bb5baac41..3a2c448a26dd 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c @@ -257,9 +257,9 @@ static const struct snd_kcontrol_new aic33_n810_controls[] = { static struct snd_soc_dai_link n810_dai = { .name = "TLV320AIC33", .stream_name = "AIC33", - .cpu_dai_name = "omap-mcbsp.2", - .platform_name = "omap-mcbsp.2", - .codec_name = "tlv320aic3x-codec.2-0018", + .cpu_dai_name = "48076000.mcbsp", + .platform_name = "48076000.mcbsp", + .codec_name = "tlv320aic3x-codec.1-0018", .codec_dai_name = "tlv320aic3x-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM,
From: Jarkko Nikula jarkko.nikula@bitmer.com
Commit e9f5f1e45608 ("ARM: OMAP2+: Remove legacy mux code") removed CONFIG_OMAP_MUX making impossible to build Nokia N810 audio support. Remove this dependency so we can do at least build tests.
Fixes: e9f5f1e45608 ("ARM: OMAP2+: Remove legacy mux code") Signed-off-by: Jarkko Nikula jarkko.nikula@bitmer.com --- sound/soc/omap/Kconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig index ba56d71c3ca7..65864a60d0e2 100644 --- a/sound/soc/omap/Kconfig +++ b/sound/soc/omap/Kconfig @@ -42,7 +42,6 @@ config SND_OMAP_SOC_HDMI_AUDIO config SND_OMAP_SOC_N810 tristate "SoC Audio support for Nokia N810" depends on SND_OMAP_SOC && MACH_NOKIA_N810 && I2C - depends on OMAP_MUX select SND_OMAP_SOC_MCBSP select SND_SOC_TLV320AIC3X help
On Thu, Apr 26, 2018 at 02:51:15PM +0300, Peter Ujfalusi wrote:
From: Jarkko Nikula jarkko.nikula@bitmer.com
Commit e9f5f1e45608 ("ARM: OMAP2+: Remove legacy mux code") removed CONFIG_OMAP_MUX making impossible to build Nokia N810 audio support. Remove this dependency so we can do at least build tests.
Fixes: e9f5f1e45608 ("ARM: OMAP2+: Remove legacy mux code") Signed-off-by: Jarkko Nikula jarkko.nikula@bitmer.com
You're missing your signoff here.
Mark,
On 2018-04-26 15:54, Mark Brown wrote:
On Thu, Apr 26, 2018 at 02:51:15PM +0300, Peter Ujfalusi wrote:
From: Jarkko Nikula jarkko.nikula@bitmer.com
Commit e9f5f1e45608 ("ARM: OMAP2+: Remove legacy mux code") removed CONFIG_OMAP_MUX making impossible to build Nokia N810 audio support. Remove this dependency so we can do at least build tests.
Fixes: e9f5f1e45608 ("ARM: OMAP2+: Remove legacy mux code") Signed-off-by: Jarkko Nikula jarkko.nikula@bitmer.com
You're missing your signoff here.
I have not changed the patch itself, just picked it from the list to include to the series. Afaik in this case my signoff is not needed.
Can you add my (or I can resend the series): Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com or Reviewed-by: Peter Ujfalusi peter.ujfalusi@ti.com or Acked-by: Peter Ujfalusi peter.ujfalusi@ti.com
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
On Thu, Apr 26, 2018 at 04:01:51PM +0300, Peter Ujfalusi wrote:
On 2018-04-26 15:54, Mark Brown wrote:
You're missing your signoff here.
I have not changed the patch itself, just picked it from the list to include to the series. Afaik in this case my signoff is not needed.
No, you need to add your signoff for *anything* you're submitting. It's about tracking the path the patch takes to mainline.
Can you add my (or I can resend the series): Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com
OK.
On 2018-04-26 16:03, Mark Brown wrote:
On Thu, Apr 26, 2018 at 04:01:51PM +0300, Peter Ujfalusi wrote:
On 2018-04-26 15:54, Mark Brown wrote:
You're missing your signoff here.
I have not changed the patch itself, just picked it from the list to include to the series. Afaik in this case my signoff is not needed.
No, you need to add your signoff for *anything* you're submitting. It's about tracking the path the patch takes to mainline.
OK. I left it off because recently there were replies from other maintainers saying otherwise (no need to singoff of unmodified patches from others). I agree that adding the signoff is the correct way.
Can you add my (or I can resend the series): Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com
OK.
Thank you,
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
On Thu, Apr 26, 2018 at 04:06:51PM +0300, Peter Ujfalusi wrote:
On 2018-04-26 16:03, Mark Brown wrote:
No, you need to add your signoff for *anything* you're submitting. It's about tracking the path the patch takes to mainline.
OK. I left it off because recently there were replies from other maintainers saying otherwise (no need to singoff of unmodified patches from others). I agree that adding the signoff is the correct way.
Oh dear, who was saying that - might cause lawyers to get upset...
participants (3)
-
Jarkko Nikula
-
Mark Brown
-
Peter Ujfalusi