How to add individual reset for ESAI transmitter sequence?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to add individual reset for ESAI transmitter sequence?

1,109 Views
takayuki_ishii
Contributor IV

Hello community,

I try to add an Individual reset of ESAI Transmit function by suggestion of following community thread.

ESAI_TX_FS and ESAI_TX_CLK signal level after stop audio playback 

I'm adding a reset sequence of "25.5.2.2 Initializing the ESAI Transmitter Section" 

in ReferenceManual_iMX6DQPRM_rev2 to SNDRV_PCM_TRIGGER_SUSPEND,

SNDRV_PCM_TRIGGER_STOP and SNDRV_PCM_TRIGGER_PAUSE_PUSH command response code on

the sound/soc/fsl/fsl_esai.c

After audio playback by aplay and gst-play-1.0 command, ESAI_TX_FS and ESAI_TX_CLK signal state

both High and Low level randomly.

By changing the PAD control register value of "MX6QDL_PAD_ENET_CRS_DV__ESAI_TX_CLK" and

"MX6QDL_PAD_ENET_RXD1__ESAI_TX_FS" from 0x0001b030 to 0x00013030 in "imx6qdl-sabreauto.dtsi"

Initial signal revel both ESAI_TX_FS and ESAI_TC_CLK, it will change from High to Low by Pull-down register

setteing.

But after audio playback, it will change High or low level randomly.

Attached file is a source code I modified.

Do I need some more modify or some mistake in it?

Do you mind explaining this in more detail?

Best regards,

Ishii.

Labels (3)
0 Kudos
7 Replies

909 Views
takayuki_ishii
Contributor IV

Hello Wigros,

Thank you for your response.

I will check that RESET is successful or not.

The other hand, in the bit field description for ESAI_TCR[19].TPR on reference manual,

It say that 

"The transmitter clock outputs drive zeroes while in the personal reset state."

That't mean while TPR=1, clock out pin keep low, and set TPR=0 it will change some other state.

So, to keep clock out to Low, It must keep TPR=1.

Is it correct?

 

Best regards,

Ishii.

0 Kudos

909 Views
takayuki_ishii
Contributor IV

Hello, weidong.sun‌,

I try to dump registers value with ESAI_PRRC = 0x0000, ESAI_PCRC=0x0000

Before this update, if stop audio playback, ESAI_SCKT pin keep low and

ESAI_FST is both High or Low level at random.

ESAI_SCKT seems that output level will be conform a IOMUX_SW_PAD_CTL setting.

After add to write ESAI_PRRC = 0x0000, ESAI_PCRC=0x0000,

Both ESAI_SCKT and ESAI_FST keep to High level.

Is it normal function?

If so, to output low level which setting I need?

Please feel free to ask me any questions.

Best regards,

Ishii.

0 Kudos

909 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Takayuki Ishii,

   See the description in reference manual, please!

25.5.2.1 Initializing the ESAI using Personal Reset

...
The ESAI should be in its personal reset state (ESAI_PCRC = 0x000 and ESAI_PRRC = 0x000).
In the personal reset state, both the transmitter and receiver sections of the ESAI are simultaneously reset.
The TPR bit in the ESAI_TCR register may be used to reset just the transmitter section.
The RPR bit in the ESAI_RCR register may be used to reset just the receiver section.
...

so

(1) Transmitter and Receiver can both be RESET simultaneously 

(2) Transmitter and Receiver can also be RESET respectively.

After changing your source code, you can add print lines to dump above register's value to check if RESET is successful.

Have a nice day!

NXP TIC weidong sun

0 Kudos

909 Views
takayuki_ishii
Contributor IV

Hello community, 

Does anyone have a comment?

I am looking forward to hearing from you.

Best regards,

Ishii.

0 Kudos

909 Views
takayuki_ishii
Contributor IV

Hello art

I try to modify to add reset sequence after stop playback of ESAI based on your answered.

But I can't get any result I hope.

Don't you teach me more suggestion about reset work of ESAI?

Best regards,

Ishii.

0 Kudos

909 Views
art
NXP Employee
NXP Employee

You have to first fully reset the ESAI hardware by switching the ESAI_ECR[ERST] bit, then reset its FIFOs using the ESAI_TFCR[TFR] and ESAI_RFCR[RFR] bits, and then fully re-initialize ESAI as done in the driver code.

0 Kudos

909 Views
takayuki_ishii
Contributor IV

Hello, art

Thank you for your answered.

And sorry my late reply.

Our customer hope to continue a rx transfer while tx reset.

But you say that it is need to switching the ESAI_ECR[ERST] bit to fully reset of ESAI module.

It meen that both ESAI_TX_FS and ESAI_TX_CLK output Low level after playback,

It must stop both TX and RX transfer?

I look forward to hearing from you.

Best regards,

Ishii.

0 Kudos