Patch to enable SSI Master Mode when using ASRC_P2P function based on Kernel 3.0.35 for I.MX6DL/DQ SebreSD boards

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

Patch to enable SSI Master Mode when using ASRC_P2P function based on Kernel 3.0.35 for I.MX6DL/DQ SebreSD boards

Patch to enable SSI Master Mode when using ASRC_P2P function based on Kernel 3.0.35 for I.MX6DL/DQ SebreSD boards

When using SSI Slave Mode for ASRC_P2P function (https://community.freescale.com/docs/DOC-95342), the waveform of the converted 24bit data is abnormal(have some values between 0 and 1). When using SSI Master Mode, these abnormal data disappear. This patch shows how to enable SSI Master Mode based on ASRC_P2P patches.

Because SSI Master Mode uses fixed data width for LRCLK(32bits for each L or R), and the SSI Dual FIFO Mode is not supported for ASRC_P2P, the converted 16bit data is not well supported in this patch.

Suggestions:

If you want to convert the audio data to 16bit, you can use SSI Slave Mode; if you want to convert the audio data to 24bit, you can use SSI Master Mode.

Attachments
Comments

good patch

_at

Hi Lei Ge,

I had used above patch. It is for Normal Audio Playback (ASRC added in between PLAYBACK path & uses only one OUT CLK source i.e OUTCLK_SSI2_TX while IN CLK source is INCLK_NONE) and working perfectly fine!.

Now, I want to use ASRC in between Recording Path.I had tried following setup (taking above patch for reference):

1.  Request DMA channel for P2P:

        - DMA Request-SSI RX0

        - P2P DMA request-ASRC RX1

    Configured abvoe channel as Slave DMA channel. Input src is SSI-1 RX0, output dst is ASRC RX1 & direction is DMA_DEV_TO_DEV

   

2.  Request DMA channel for P2M:

        - DMA request-ASRC TX1

    Configured abvoe channel as Slave DMA channel. Input src is ASRC TX1, output dst is MEMORY & direction is DMA_FROM_DEV

   

SSI is configured as SLAVE I2S device.

Configuratin of ASRC:

    config.input_word_width = ASRC_WIDTH_24_BIT;

    config.output_word_width = ASRC_WIDTH_24_BIT;

    config.pair = iprtd->asrc_index; [ASRC_PAIR_A]

    config.channel_num = channel;    [2]  

    config.input_sample_rate = 48000;   

    config.output_sample_rate = 44100;

    config.inclk = INCLK_SSI1_RX;       [clk coming from SSI RX & its slave device]

    config.outclk = OUTCLK_SSI2_TX;     [clk coming from playback codec, SSI is master I2S (same as above patch)]

I had verified that both clock coming to ASRC.

My Result:

I received 'blank' data from MEMORY

Can you help me out, why i received 'blank' data. Or something is missing in above setup.

-Ankit.   

_at

Hello All,

Found the solution: Configure SSI-1  & AUDMUX's ports to ASYNC MODE. Otherwise, SSI-1 never get clock on SRCK.

-Ankit.

Can you attach or share the patch in community?

_at

Hi Lei Ge,

I am attaching patch at following locatin Audio LOST after ~10 hrs on i.MX 6Q for your reference. Please review it & give comments upon it.

Now, We got Audio lost after ~10 hrs after this attached patch. Issue explained in above link.

Note:

- We able to play smoothly till 10 hrs.

_at

Hi Lei Ge,

Can you please give a comments over last attached patch here-Audio LOST after ~10 hrs on i.MX 6Q?

-Ankit.

No ratings
Version history
Last update:
‎08-06-2013 10:56 PM
Updated by: