Endian issue with imx8m-plus and tas2563 using ALSA

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

Endian issue with imx8m-plus and tas2563 using ALSA

1,125 Views
christianroedlach
Contributor I

Hello,

I have an issue using a tas2563 amplifier on an imx8m-plus:

Audio playback is working fine, but recording the PDM microphone via the tas2563 chip results in reversed endiannes of the recordes .wav files. If I import them with big-endianess (wrong setting for .wav files), they sound well. I already talked plenty of times to the ti support without success.

My question is:

Is there a possibility to reverse the byte order from Big Endian to Little Endian within your drivers / the  simple-audio-card / device tree settings or in the ALSA subsystem? Important: only the RX channels should be reversed.

I'm currently on Yocto Kirkstone, Kernel 5.15.71.

The codec driver is from https://git.ti.com/cgit/tas2781-linux-drivers/tas2781-linux-driver

Kind Regards,

Christian

Device Tree excerpt:

/ {
sound_tas2563: sound-tas2563 {
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,name = "DPP-LMB-AR Soundcard TAS2563";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-inversion;
simple-audio-card,frame-master = <&tas2563cpu>;
simple-audio-card,bitclock-master = <&tas2563cpu>;

tas2563cpu: simple-audio-card,cpu {
sound-dai = <&sai3>;
system-clock-direction = "out";
};

simple-audio-card,codec {
sound-dai = <&tas2563>;
system-clock-direction = "in";
};
};
};

&sai3 {
fsl,sai-asynchronous;
status = "okay";
};

&i2c3 {
tas2563: tasdevice@4c {
status = "okay";
#sound-dai-cells = <0>;
compatible = "ti,tas2563";
reg = <0x4c>;
reset-gpios = <&pca9555 7 GPIO_ACTIVE_LOW>;
};
};
0 Kudos
Reply
1 Reply

1,090 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You have to change the endianess in kernel mode, please check it:

https://kernelnewbies.org/EndianIssues

Regards

0 Kudos
Reply