Hi all,
I am using i.Mx6 processor and trying to port audio with the latest kernel (Linux-3.10.17).
I am trying to port my audio codec using SSI AC97 interface.
I am seeing there is no AC97 support in the SSI driver file (fsl_ssi.c). But the support is added in one more driver file (imx-ssi.c).
Since we are using DTS, it is accessing fsl_ssi and not the imx-ssi. I want to know how to add AC97 mode in fsl_ssi and in DTS.
Please provide the solution for the same.
Thanks in advance.
Regards,
Salih
Here are the pieces from my .dts:
----
sound {
compatible = "fsl,imx6-emx6-wm9712";
model = "imx6-emx6-wm9712";
ssi-controller = <&ssi1>;
audio-routing =
"Headphone", "HPOUTL",
"Headphone", "HPOUTR",
"LineIn", "LINEINL",
"LineIn", "LINEINR",
"Mic", "MIC1";
mux-int-port = <1>;
mux-ext-port = <4>;
};
…
pinctrl_audmux: audmuxgrp {
fsl,pins = <
MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x130b0
MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x130b0
MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x110b0
MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x130b0
>;
};
ac97link_reset: audmuxgrp_reset {
fsl,pins = <
MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0x1b0b0
MX6QDL_PAD_SD2_DAT2__GPIO1_IO13 0x1b0b0
>;
};
ac97link_warm_reset: audmuxgrp_warmreset {
fsl,pins = <
MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0x1b0b0
>;
};
…
&ssi1 {
pinctrl-names = "default", "ac97-running", "ac97-reset",
"ac97-warm-reset";
pinctrl-0 = <&pinctrl_audmux>;
pinctrl-1 = <&pinctrl_audmux>;
pinctrl-2 = <&ac97link_reset>;
pinctrl-3 = <&ac97link_warm_reset>;
/* sync, sdata, reset */
ac97-gpios = <
&gpio1 14 0
&gpio1 13 0
&gpio7 13 0>;
fsl,mode = "ac97-slave";
fsl,fiq-stream-filter;
fsl,ssi-asynchronous;
status = "okay";
};
----
I cherry-picked "ASoC: fsl-ssi: Support for SND_SOC_DAIFMT_CBM_CFS" and set in fsl_ssi_probe() to
ssi_private->dai_fmt = SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFS;
With this change I hear the codec powering up and down during playback and I see that the codec supplies the bitclock. However I see no action from the IMX nor do I see that the SSI-FIFO is beeing filled. Does someone know what needs to be done for SSI to start filling the FIFO?
Which kernel are you using? Do you have this one applied?
commit cd7f0295aab102acb77c19d6d77eab5f5145364c
Author: Markus Pargmann <mpa@pengutronix.de>
Date: Mon Aug 19 17:05:58 2013 +0200
ASoC: fsl-ssi: ac97-slave support
This patch adds ac97-slave support.
For ac97, the registers have to be setup earlier than for other ssi
modes because there is some communication with the external device
before streaming. So this patch introduces a fsl_ssi_setup function to
setup the registers for different ssi operation modes seperately.
This patch was tested with imx27-pca100.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org
I have never used SSI in AC97 mode, as none of the boards I have access to support this mode.
Looking at Documentation/devicetree/bindings/sound/fsl,ssi.txt it says ac97 is supported: