imx6 - tlv320aic32x4 codec no data on I2S port

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

imx6 - tlv320aic32x4 codec no data on I2S port

Jump to solution
6,987 Views
benoitmoffet
Contributor III

Hi,

I am working on a custom board with an imx6d processor and a tlv320aic3204 codec.

The codec is connected on the AUD4 port and the mclk comes from GPIO0 at 24MHz.

The codec is detected and the ssi maping seems fine.

imx-aic32x4 sound.18:  tlv320aic32x4-hifi <-> 202c000.ssi mapping ok

ALSA device list:

  #0: tlv320aic32x4

Here is my device tree entry for the sound card:

    sound {

  compatible = "fsl,imx-audio-aic32x4";

  model = "tlv320aic32x4";

  audio-codec = <&codec>;

        ssi-controller = <&ssi1>;

  audio-routing =

  "Line Out Jack", "LOL",

            "Line Out Jack, "LOR",

            "Headphone Jack, "HPL",

            "Headphone Jack, "HPR";

        mux-ext-port = <4>;

  mux-int-port = <1>;

  };

&ssi1 {

  status = "okay";

};

... --- ...

    codec: tlv320aic32x4@18 {

        compatible = "ti,tlv320aic32x4";

        reg = <0x18>;

        clocks = <&clks 201>;

        clock-names = "mclk";

        gpio-reset = <&gpio5 12 0>;

        status = "okay";

    };

When I play with alsamixer, I can see I2C data on the port with the scope.

I don't see data on the AUD4 pins, only the Mclk is always present.

If I use aplay, I get this message after 13s waiting:

aplay: pcm_write:1947: write error: Input/output error

I wrote a machine driver for the tlv320aic32x4 based on the sgtl5000 one...

I use the 3.10.17 kernel on poky-dizzy and the meta-fsl-arm layer in dizzy too.

Regards,

Labels (1)
0 Kudos
Reply
1 Solution
3,901 Views
benoitmoffet
Contributor III

I finally managed to fix the issue. Since the driver now supports device tree, a parameter was kept uninitialized... pwr_config.

Just setting pwr_config with a good value solved the issue.

View solution in original post

0 Kudos
Reply
7 Replies
3,902 Views
benoitmoffet
Contributor III

I finally managed to fix the issue. Since the driver now supports device tree, a parameter was kept uninitialized... pwr_config.

Just setting pwr_config with a good value solved the issue.

0 Kudos
Reply
3,901 Views
kesaco
Contributor II

Hi Benoit,

I face a similar issue with another SoM, but I did not found any "pwr_config" parameter in any driver.

Where does this property come from ?

What does it represent and what value do you use ?

Thank you,

Miquel

0 Kudos
Reply
3,901 Views
benoitmoffet
Contributor III

Hi Miquel,

It comes from the tlv320aic32x4.c driver. Under the parse_dt function. I

have a patched version of the driver that use device tree, so it is maybe

why you did not see that parameter.

aic32x4->power_cfg

In fact you just have to be sure that your driver enables the internal LDO

of the codec.

snd_soc_write(codec, AIC32X4_LDOCTL, AIC32X4_LDOCTLEN);

Best regards,

Benoit

2016-02-29 8:11 GMT-05:00 kesaco <admin@community.freescale.com>:

NXP Community

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>

imx6 - tlv320aic32x4 codec no data on I2S port

reply from Miquèl Raynal

<https://community.freescale.com/people/kesaco?et=watches.email.thread>

in i.MX Community - View the full discussion

<https://community.freescale.com/message/619562?et=watches.email.thread#619562>

0 Kudos
Reply
3,901 Views
linzhang
Contributor I

Hi, Benoit

    can you give me a copy of this driver(for tlv320aic32x4)?

0 Kudos
Reply
3,902 Views
benoitmoffet
Contributor III

Hi,

To add details to the problem, I put traces in the fsl_ssi driver. I can see that each time I call an aplay or a speaker test the stream is created and the transfer is started. But there is no activity of sdma and ssi in /proc/interrupt...

I am very close... but there is something important missing.

Regards,

0 Kudos
Reply
3,902 Views
igorpadykov
NXP Employee
NXP Employee

Hi Benoit

one can look at linux-imx_3.10.17_1.0.2_ga-imx-tlv320aic23.patch

How to enable TLV320 on IMX6Q?

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
3,902 Views
benoitmoffet
Contributor III

Hi Igor,

Thank you very much for your answer

I already have looked at it and it's seems that what I have done so far matches those information.

There is something missing, probably something obvious...

All drivers are loaded, the codec one, the platform one (fsl_ssi) and the machine one (imx-aic32x4) but no data on the I2S port.

Regards,

0 Kudos
Reply