[alsa-devel] About iMX6SL AUDMUX (port 7) and SSI3
Hi community:
I am working on ASoC based sound driver for our iMX6SL based board. There are 3 I2S peripherals on the board: - iMX6SL pads AUD3 (as in AUD3_TXC), connect to peripheral Codec3 - iMX6SL pads AUD5 connect to Codec5 - iMX6SL pads Aud6, connect to Codec6
Q1) Is internal SSI3 controller (ssi@02030000) actually *hard-wired* to AUDMUX port 7?
Q2) Can I configure audmux as below? - External AUD3 -> internal SSI3 (which is actually audmux port 7?) - External AUD5 -> internal SSI2 (ssi@0202c000) - External AUD6 -> internal SSI1 (ssi@02028000)
Thanks.
On Thu, Feb 19, 2015 at 06:57:39PM +0800, Xuebing Wang wrote:
I am working on ASoC based sound driver for our iMX6SL based board. There are 3 I2S peripherals on the board:
- iMX6SL pads AUD3 (as in AUD3_TXC), connect to peripheral Codec3
- iMX6SL pads AUD5 connect to Codec5
- iMX6SL pads Aud6, connect to Codec6
Q1) Is internal SSI3 controller (ssi@02030000) actually *hard-wired* to AUDMUX port 7?
Yes. The first version of AUDMUX was only designed for two SSIs. Later version of i.MX SoC added an extra SSI so it had to connect to AUD7 which looks a bit weird.
Q2) Can I configure audmux as below?
- External AUD3 -> internal SSI3 (which is actually audmux port 7?)
- External AUD5 -> internal SSI2 (ssi@0202c000)
- External AUD6 -> internal SSI1 (ssi@02028000)
I think you can.
Nicolin
Nicolin,
Thanks. As the mainline kernel supports I2S master mode, would you please tell me which ASoC machine driver actually uses I2S master mode?
The reason I am asking is that I am using I2S master mode, I'd like to reference that machine driver to configure audmux by function imx_audmux_v2_configure_port().
Thanks.
On 02/20/2015 01:01 PM, Nicolin Chen wrote:
On Thu, Feb 19, 2015 at 06:57:39PM +0800, Xuebing Wang wrote:
I am working on ASoC based sound driver for our iMX6SL based board. There are 3 I2S peripherals on the board:
- iMX6SL pads AUD3 (as in AUD3_TXC), connect to peripheral Codec3
- iMX6SL pads AUD5 connect to Codec5
- iMX6SL pads Aud6, connect to Codec6
Q1) Is internal SSI3 controller (ssi@02030000) actually *hard-wired* to AUDMUX port 7?
Yes. The first version of AUDMUX was only designed for two SSIs. Later version of i.MX SoC added an extra SSI so it had to connect to AUD7 which looks a bit weird.
Q2) Can I configure audmux as below?
- External AUD3 -> internal SSI3 (which is actually audmux port 7?)
- External AUD5 -> internal SSI2 (ssi@0202c000)
- External AUD6 -> internal SSI1 (ssi@02028000)
I think you can.
Nicolin
On Wed, Feb 25, 2015 at 04:28:52PM +0800, Xuebing Wang wrote:
Thanks. As the mainline kernel supports I2S master mode, would you please tell me which ASoC machine driver actually uses I2S master mode?
fsl-asoc-card.c
The reason I am asking is that I am using I2S master mode, I'd like to reference that machine driver to configure audmux by function imx_audmux_v2_configure_port().
That driver is a general purpose driver for several CODECs supports. If you plan to get your machine driver upstream, you can try that one directly; Otherwise, you can extract the audmux configuration part for your own use.
Nicolin
On 02/25/2015 04:38 PM, Nicolin Chen wrote:
On Wed, Feb 25, 2015 at 04:28:52PM +0800, Xuebing Wang wrote:
Thanks. As the mainline kernel supports I2S master mode, would you please tell me which ASoC machine driver actually uses I2S master mode?
fsl-asoc-card.c
Nicolin,
Thanks. I am trying routing aud3 to internal ssi2. Thus in my case: int_port = 2, ext_port = 3, right? Of course, there are int_port-- and ext_port --.
As I am using I2S master mode (ssi2 generates both bit clock and frame sync, thus (dai_fmt & MASK) == SND_SOC_DAIFMT_CBM_CFM. According to iMX6SL reference manual, should TFSEL (bits 30..27) of int_ptcr be IMX_AUDMUX_V2_PTCR_TFSEL(int_port) (note: int_port vs ext_port), rather than the current IMX_AUDMUX_V2_PTCR_TFSEL(ext_port) in file fsl-asoc-card.c?
Thanks again.
The reason I am asking is that I am using I2S master mode, I'd like to reference that machine driver to configure audmux by function imx_audmux_v2_configure_port().
That driver is a general purpose driver for several CODECs supports. If you plan to get your machine driver upstream, you can try that one directly; Otherwise, you can extract the audmux configuration part for your own use.
Nicolin
On Wed, Feb 25, 2015 at 08:15:25PM +0800, Xuebing Wang wrote:
Thanks. I am trying routing aud3 to internal ssi2. Thus in my case: int_port = 2, ext_port = 3, right? Of course, there are int_port-- and ext_port --.
As the port numbers come from Device Tree which is hardware description so it must match the index from hardware Reference Manual. You don't need to worry about unless there's a bug.
As I am using I2S master mode (ssi2 generates both bit clock and frame sync, thus (dai_fmt & MASK) == SND_SOC_DAIFMT_CBM_CFM. According to iMX6SL
CBM_CFM stands for CODEC Bit Clock Master and CODEC Frame Sync Clock Master. So what you need is the opposite -- SND_SOC_DAIFMT_CBS_CFS.
Nicolin
participants (2)
-
Nicolin Chen
-
Xuebing Wang