ASoC: eukrea-tlv320: Add DT support.
Subsystems (4)
PATCH v6 1/4 ASoC: eukrea-tlv320: Add DT support.
--- .../devicetree/bindings/sound/eukrea-tlv320.txt | 23 ++++ sound/soc/fsl/Kconfig | 5 +- sound/soc/fsl/eukrea-tlv320.c | 135 ++++++++++++++++---- 3 files changed, 140 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/eukrea-tlv320.txt
Documentation/devicetree/bindings/sound/eukrea-tlv320.txt new file +23 -0
@@ -0,0 +1,23 @@ +Audio complex for Eukrea boards with tlv320aic23 codec. + +Required properties: +- compatible : "eukrea,eukrea-tlv320" +- model : The user-visible name of this sound complex. +- ssi-controller : The phandle of the SSI controller. +- audio-codec : The phandle of the tlv320aic23 audio codec. +- mux-int-port : The internal port of the i.MX audio muxer (AUDMUX). +- mux-ext-port : The external port of the i.MX audio muxer. + +Note: The AUDMUX port numbering should start at 1, which is consistent with +hardware manual. + +Example: + + sound { + compatible = "eukrea,eukrea-tlv320"; + model = "imx51-eukrea-tlv320aic23"; + ssi-controller = <&ssi2>; + fsl,audio-codec = <&tlv320aic23>; + mux-int-port = <2>; + mux-ext-port = <3>; + };
sound/soc/fsl/Kconfig +4 -1
@@ -161,12 +161,15 @@ config SND_SOC_EUKREA_TLV320 depends on MACH_EUKREA_MBIMX27_BASEBOARD \ || MACH_EUKREA_MBIMXSD25_BASEBOARD \ || MACH_EUKREA_MBIMXSD35_BASEBOARD \ - || MACH_EUKREA_MBIMXSD51_BASEBOARD + || MACH_EUKREA_MBIMXSD51_BASEBOARD \ + || OF depends on I2C select SND_SOC_TLV320AIC23 select SND_SOC_IMX_PCM_FIQ select SND_SOC_IMX_AUDMUX select SND_SOC_IMX_SSI + select SND_SOC_FSL_SSI + select SND_SOC_IMX_PCM_DMA help Enable I2S based access to the TLV320AIC23B codec attached to the SSI interface
sound/soc/fsl/eukrea-tlv320.c +113 -22
218 lines not on this page · raw message
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1382519766-17359-1-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org
PATCH v6 2/4 ARM: dts: mbimxsd51: Add sound support.
--- .../boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts +9 -0
@@ -48,6 +48,15 @@ linux,default-trigger = "heartbeat"; }; }; + + sound { + compatible = "eukrea,eukrea-tlv320"; + model = "imx51-eukrea-tlv320aic23"; + ssi-controller = <&ssi2>; + fsl,audio-codec = <&tlv320aic23>; + mux-int-port = <2>; + mux-ext-port = <3>; + }; }; &audmux {
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v6 3/4 ARM: dts: mbimxsd25: Add sound support.
In reply to a message not in the archive--- .../boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts +9 -0
@@ -48,6 +48,15 @@ linux,default-trigger = "heartbeat"; }; }; + + sound { + compatible = "eukrea,eukrea-tlv320"; + model = "imx25-eukrea-tlv320aic23"; + ssi-controller = <&ssi1>; + fsl,audio-codec = <&tlv320aic23>; + mux-int-port = <1>; + mux-ext-port = <5>; + }; }; &audmux {
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v6 4/4 ARM: dts: mbimxsd35: Add sound support.
In reply to a message not in the archive--- .../boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts +9 -0
@@ -48,6 +48,15 @@ linux,default-trigger = "heartbeat"; }; }; + + sound { + compatible = "eukrea,eukrea-tlv320"; + model = "imx35-eukrea-tlv320aic23"; + ssi-controller = <&ssi1>; + fsl,audio-codec = <&tlv320aic23>; + mux-int-port = <1>; + mux-ext-port = <4>; + }; }; &audmux {
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
maintainersound/soc/fsl/eukrea-tlv320.c line 58
Quoted 10 lines · Denis Carikli
sound/soc/fsl/eukrea-tlv320.c +10
-0+/* fsl_ssi lacks the set_fmt ops. */ +if (!priv->of) { + ret =snd_soc_dai_set_fmt (cpu_dai,SND_SOC_DAIFMT_I2S | +SND_SOC_DAIFMT_NB_NF | +SND_SOC_DAIFMT_CBM_CFM ); +if (ret) { +dev_err (cpu_dai->dev, +"Failed to set the cpu dai format\n" ); +return ret; + }
This is unrelated to OF support, whatever version of the DAI does have the operation might be used on an ACPI system for example. What would be better would be to check the return value for -ENOTSUPP and ignore that while still passing on other errors. The same thing applies to the other ops that aren't supported.
sound/soc/fsl/eukrea-tlv320.c line 67
Quoted 5 lines
sound/soc/fsl/eukrea-tlv320.c +2
-1if (ret) { -pr_err ("%s: failed set codec dai format\n" , __func__); +dev_err (cpu_dai->dev, +"Failed to set the codec dai format.\n" );return ret;
This is a useful cleanup but should be done in a separate patch.
sound/soc/fsl/eukrea-tlv320.c line 80
Quoted 3 lines
sound/soc/fsl/eukrea-tlv320.c +3
-0+/* fsl_ssi lacks the set_sysclk ops */ +if (!priv->of) { +snd_soc_dai_set_tdm_slot (cpu_dai,0xffffffc ,0xffffffc ,2 ,0 );
This is nothing to do with sysclk, but that's just a minor point about the grouping and commenting.
sound/soc/fsl/eukrea-tlv320.c static struct snd_soc_dai_link eukrea_tlv320_dai = { · line 83
Quoted 5 lines
sound/soc/fsl/eukrea-tlv320.c +0
-1@@ -80,7 +97,6 @@ static struct snd_soc_dai_link eukrea_tlv320_dai = { .name = "tlv320aic23", .stream_name = "TLV320AIC23", .codec_dai_name = "tlv320aic23-hifi", - .platform_name = "imx-ssi.0",
Does this not break existing users?
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel