Skip to contentSkip to conversation

About iMX6SL AUDMUX (port 7) and SSI3

DISCUSSION Xuebing Wang 2 participants 6 messages Feb 19, 2015 – Feb 26, 2015

lore
Share & tools
lore
#0 lore raw

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.

Signature · 1 line
Xuebing
#1 lore raw
Quoted 8 lines · Xuebing Wang

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.

Quoted 4 lines

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

#2 lore raw

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.

Quoted 22 lines · Nicolin Chen
Quoted 8 lines · Xuebing Wang

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.

Quoted 4 lines

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

Signature · 1 line
Xuebing
#3 lore raw
Quoted 2 lines · Xuebing Wang

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

Quoted 3 lines

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

#4 lore raw
Quoted 4 lines · Nicolin Chen
Quoted 2 lines · Xuebing Wang

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.

Quoted 11 lines
Quoted 3 lines

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

Signature · 1 line
Xuebing
#5 lore raw
Quoted 2 lines · Xuebing Wang

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.

Quoted 2 lines

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