All of lore.kernel.org
 help / color / mirror / Atom feed
* About iMX6SL AUDMUX (port 7) and SSI3
@ 2015-02-19 10:57 Xuebing Wang
  2015-02-20  5:01 ` Nicolin Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Xuebing Wang @ 2015-02-19 10:57 UTC (permalink / raw)
  To: alsa-devel
  Cc: nicolin Chen, niranjan Patil, timur Tabi, richard Jiang, xiubo Li

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.

-- 
Xuebing

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: About iMX6SL AUDMUX (port 7) and SSI3
  2015-02-19 10:57 About iMX6SL AUDMUX (port 7) and SSI3 Xuebing Wang
@ 2015-02-20  5:01 ` Nicolin Chen
  2015-02-25  8:28   ` Xuebing Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolin Chen @ 2015-02-20  5:01 UTC (permalink / raw)
  To: Xuebing Wang
  Cc: alsa-devel, niranjan Patil, timur Tabi, richard Jiang, xiubo Li

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: About iMX6SL AUDMUX (port 7) and SSI3
  2015-02-20  5:01 ` Nicolin Chen
@ 2015-02-25  8:28   ` Xuebing Wang
  2015-02-25  8:38     ` Nicolin Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Xuebing Wang @ 2015-02-25  8:28 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: alsa-devel, niranjan Patil, timur Tabi, richard Jiang, xiubo Li

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
>

-- 
Xuebing

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: About iMX6SL AUDMUX (port 7) and SSI3
  2015-02-25  8:28   ` Xuebing Wang
@ 2015-02-25  8:38     ` Nicolin Chen
  2015-02-25 12:15       ` Xuebing Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolin Chen @ 2015-02-25  8:38 UTC (permalink / raw)
  To: Xuebing Wang
  Cc: alsa-devel, niranjan Patil, timur Tabi, richard Jiang, xiubo Li

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: About iMX6SL AUDMUX (port 7) and SSI3
  2015-02-25  8:38     ` Nicolin Chen
@ 2015-02-25 12:15       ` Xuebing Wang
  2015-02-26  6:28         ` Nicolin Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Xuebing Wang @ 2015-02-25 12:15 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: alsa-devel, niranjan Patil, timur Tabi, richard Jiang, xiubo Li


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
>
>

-- 
Xuebing

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: About iMX6SL AUDMUX (port 7) and SSI3
  2015-02-25 12:15       ` Xuebing Wang
@ 2015-02-26  6:28         ` Nicolin Chen
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolin Chen @ 2015-02-26  6:28 UTC (permalink / raw)
  To: Xuebing Wang
  Cc: alsa-devel, niranjan Patil, timur Tabi, richard Jiang, xiubo Li

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-26  6:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-19 10:57 About iMX6SL AUDMUX (port 7) and SSI3 Xuebing Wang
2015-02-20  5:01 ` Nicolin Chen
2015-02-25  8:28   ` Xuebing Wang
2015-02-25  8:38     ` Nicolin Chen
2015-02-25 12:15       ` Xuebing Wang
2015-02-26  6:28         ` Nicolin Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.