This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TAS2563: Device tree configuration and Linux driver

Part Number: TAS2563

Hello,


We are working with a custom board based in a imx8m Nano which uses a TAS2563 connected to SAI3.

The kernel version used is 5.10.9 built using Yocto. This kernel version has a driver for TAS2563 but the board doesn't play any sound. The device tree configuration used is the following based in the configuration shown in e2e.ti.com/.../tas2110-tas2110-tas2562-device-tree-for-imx8m-mini

sound {
compatible = "simple-audio-card";
simple-audio-card,name = "mx8-tas2563";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-inversion;
simple-audio-card,bitclock-master = <&tas2563cpu>;
simple-audio-card,frame-master = <&tas2563cpu>;

tas2563cpu: simple-audio-card,cpu {
sound-dai = <&sai3>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
};

simple-audio-card,codec {
sound-dai = <&tas2563>;
};
};

&i2c3 {
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";

tas2563: codec@4c {
compatible = "ti,tas2563";
reg = <0x4c>;
#sound-dai-cells = <0>;
interrupt-parent = <&gpio2>;
interrupts = <20>;
shutdown-gpios = <&gpio5 3 GPIO_ACTIVE_HIGH>;
ti,imon-slot-no = <0>;
};
};

pinctrl_sai3: sai3grp {
fsl,pins = <
MX8MN_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6
MX8MN_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6
MX8MN_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6
MX8MN_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6
MX8MN_IOMUXC_SAI3_RXD_SAI3_RX_DATA0 0xd6
>;
};


&sai3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX8MN_CLK_SAI3>;
assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
assigned-clock-rates = <24576000>;
status = "okay";
};


Our board has the following connections:

imx8mn pin                            |  TAS2563 pin
--------------------------------------|--------------------
MX8MN_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC   |    FSYNC
MX8MN_IOMUXC_SAI3_TXC_SAI3_TX_BCLK    |    SBCLK1
MX8MN_IOMUXC_SAI3_MCLK_SAI3_MCLK      |    GPIO
MX8MN_IOMUXC_SAI3_TXD_SAI3_TX_DATA0   |    SDIN1
MX8MN_IOMUXC_SAI3_RXD_SAI3_RX_DATA0   |    SDOUT1

Are these connections correct?

We don't know if the configuration for sai3 and sound card is correct. Could you tell us if this configuration is correct?. How TAS2563 configuration and speaker tuning is loaded when we use this driver?


After that we have tried to use the Android driver (git.ti.com/.../) adapted to our Linux. The device tree configuration is the following:

sound {
compatible = "simple-audio-card";
simple-audio-card,name = "mx8-tas2563";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-inversion;
simple-audio-card,bitclock-master = <&tas2563cpu>;
simple-audio-card,frame-master = <&tas2563cpu>;
status = "okay";

simple-audio-card,widgets =
"Speaker", "Speaker";
simple-audio-card,routing =
"Speaker", "OUT";

tas2563cpu: simple-audio-card,cpu {
sound-dai = <&sai3>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
};

simple-audio-card,codec {
sound-dai = <&tas2563>;
clocks = <&clk IMX8MN_CLK_SAI3>;
};
};


&i2c3 {
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";

tas2563: tas2563@4c {
#sound-dai-cells = <0>;
compatible = "ti,tas2563";
reg = <0x4c>;
ti,left-channel = <0x4c>;
ti,channels = <1>; /* channel number */
ti,reset-gpio = <&gpio5 3 GPIO_ACTIVE_HIGH>;
ti,irq-gpio = <&gpio2 20 GPIO_ACTIVE_HIGH>;
ti,asi-format = <0>; /* 0, i2S; 1, DSP; */
ti,left-slot = <0>; /* <left slot number> */
ti,right-slot = <1>; /* <right slot number> */
ti,imon-slot-no = <0>; /* <current sense slot number> */
ti,vmon-slot-no = <2>; /* <current voltage slot number> */
ti,echo-ref = <2>;
ti,bypass-tmax = <1>; /* 0, not bypass; 1, bypass */
ti,i2s-bits = <32>;
status = "ok";
};
};


&sai3 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX8MN_CLK_SAI3>;
assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
assigned-clock-rates = <24576000>;
clocks = <&clk IMX8MN_CLK_SAI3_IPG>, <&clk IMX8MN_CLK_DUMMY>,
<&clk IMX8MN_CLK_SAI3_ROOT>, <&clk IMX8MN_CLK_DUMMY>,
<&clk IMX8MN_CLK_DUMMY>,
<&clk IMX8MN_AUDIO_PLL1_OUT>,
<&clk IMX8MN_AUDIO_PLL2_OUT>;
clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
status = "okay";
};

pinctrl_sai3: sai3grp {
fsl,pins = <
MX8MN_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6
MX8MN_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6
MX8MN_IOMUXC_SAI3_RXD_SAI3_RX_DATA0 0xd6
MX8MN_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6
MX8MN_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6
>;
};

When we load the Android driver we get the logs shown in the attached file (driver_load.txt):


driver_load.txt
root@tv100:~# insmod /lib/modules/5.10.9-1.0.0+gf001713/kernel/sound/soc/codecs/tas2563-a/snd-soc-tas2563.ko
[ 56.426244] tas2563 2-004c: Driver ID: 1.0.0
[ 56.430691] tas2563 2-004c: tas2563_i2c_probe enter
[ 56.475949] tas2563 2-004c: PGID: 16
[ 56.479631] tas2563 2-004c: tas2563_register_codec, enter
[ 56.485278] tas2563 2-004c: tas2563_register_misc, leave
[ 56.490783] tas2563 2-004c: tiload_driver_init
[ 56.495374] tas2563 2-004c: allocated Major Number: 509
[ 56.500968] tas2563 2-004c: Registered TiLoad driver, Major number: 509
[ 56.509430] tas2563 2-004c: tas2563_codec_probe
root@tv100:~# [ 56.514206] tas2563 2-004c: tas2563_fw_ready:
[ 56.519779] tas2563 2-004c: firmware size: 28943
[ 56.524492] debugfs: Directory '30030000.sai' with parent 'mx8-tas2563' already present!
[ 56.532643] tas2563 2-004c: tas2563_set_dai_fmt, format=0x4301
[ 56.538506] tas2563 2-004c: FW timestamp: 1551323635
[ 56.543505] tas2563 2-004c: FW Size = 28943
[ 56.548245] tas2563 2-004c: Checksum = 0xF5AE7FEB
[ 56.553424] tas2563 2-004c: PPC Version = 0x8400
[ 56.558244] tas2563 2-004c: FW Version = 0x1010000
[ 56.563416] tas2563 2-004c: Driver Version= 0x0202
[ 56.568228] tas2563 2-004c: Timestamp = 1551323635
[ 56.573387] tas2563 2-004c: DDC Name = F7B_20190228
[ 56.578719] tas2563 2-004c: Description = TI SmartAmp
[ 56.583970] tas2563 2-004c: header size: 112, line: 1068
[ 56.589307] tas2563 2-004c: FW i2sMode: 0
[ 56.593350] tas2563 2-004c: fw_parse_data, 882
[ 56.597842] tas2563 2-004c: fw_parse_block_data, 842
[ 56.602828] tas2563 2-004c: fw_parse_block_data, 846
[ 56.607840] tas2563 2-004c: fw_parse_block_data, 871
[ 56.612835] tas2563 2-004c: program data number: 12600
[ 56.618007] tas2563 2-004c: FW i2sMode: 0
[ 56.622056] tas2563 2-004c: fw_parse_data, 882
[ 56.626526] tas2563 2-004c: fw_parse_block_data, 842
[ 56.631521] tas2563 2-004c: fw_parse_block_data, 846
[ 56.636507] tas2563 2-004c: fw_parse_block_data, 871
[ 56.641496] tas2563 2-004c: program data number: 909
[ 56.646483] tas2563 2-004c: program size: 13686, line: 1084
[ 56.652087] tas2563 2-004c: configuration, mnProgram: 0
[ 56.657330] tas2563 2-004c: configuration samplerate: 48000
[ 56.662935] tas2563 2-004c: Fs rate: 32
[ 56.666789] tas2563 2-004c: fw_parse_data, 882
[ 56.671265] tas2563 2-004c: fw_parse_block_data, 842
[ 56.676250] tas2563 2-004c: fw_parse_block_data, 846
[ 56.681260] tas2563 2-004c: fw_parse_block_data, 871
[ 56.686245] tas2563 2-004c: fw_parse_block_data, 842
[ 56.691238] tas2563 2-004c: fw_parse_block_data, 846
[ 56.696238] tas2563 2-004c: fw_parse_block_data, 871
[ 56.701235] tas2563 2-004c: configuration, mnProgram: 0
[ 56.706480] tas2563 2-004c: configuration samplerate: 48000
[ 56.712078] tas2563 2-004c: Fs rate: 32
[ 56.715935] tas2563 2-004c: fw_parse_data, 882
[ 56.720437] tas2563 2-004c: fw_parse_block_data, 842
[ 56.725432] tas2563 2-004c: fw_parse_block_data, 846
[ 56.730427] tas2563 2-004c: fw_parse_block_data, 871
[ 56.735412] tas2563 2-004c: fw_parse_block_data, 842
[ 56.740403] tas2563 2-004c: fw_parse_block_data, 846
[ 56.745383] tas2563 2-004c: fw_parse_block_data, 871
[ 56.750374] tas2563 2-004c: configuration, mnProgram: 0
[ 56.755619] tas2563 2-004c: configuration samplerate: 48000
[ 56.761220] tas2563 2-004c: Fs rate: 32
[ 56.765075] tas2563 2-004c: fw_parse_data, 882
[ 56.769544] tas2563 2-004c: fw_parse_block_data, 842
[ 56.774529] tas2563 2-004c: fw_parse_block_data, 846
[ 56.779528] tas2563 2-004c: fw_parse_block_data, 871
[ 56.784514] tas2563 2-004c: fw_parse_block_data, 842
[ 56.789505] tas2563 2-004c: fw_parse_block_data, 846
[ 56.794488] tas2563 2-004c: fw_parse_block_data, 871
[ 56.799479] tas2563 2-004c: configuration, mnProgram: 0
[ 56.804759] tas2563 2-004c: configuration samplerate: 48000
[ 56.810370] tas2563 2-004c: Fs rate: 32
[ 56.814229] tas2563 2-004c: fw_parse_data, 882
[ 56.818698] tas2563 2-004c: fw_parse_block_data, 842
[ 56.823698] tas2563 2-004c: fw_parse_block_data, 846
[ 56.828708] tas2563 2-004c: fw_parse_block_data, 871
[ 56.833695] tas2563 2-004c: fw_parse_block_data, 842
[ 56.838685] tas2563 2-004c: fw_parse_block_data, 846
[ 56.843684] tas2563 2-004c: fw_parse_block_data, 871
[ 56.848673] tas2563 2-004c: configuration, mnProgram: 0
[ 56.853915] tas2563 2-004c: configuration samplerate: 48000
[ 56.859519] tas2563 2-004c: Fs rate: 32
[ 56.863373] tas2563 2-004c: fw_parse_data, 882
[ 56.867849] tas2563 2-004c: fw_parse_block_data, 842
[ 56.872834] tas2563 2-004c: fw_parse_block_data, 846
[ 56.877829] tas2563 2-004c: fw_parse_block_data, 871
[ 56.882814] tas2563 2-004c: fw_parse_block_data, 842
[ 56.887805] tas2563 2-004c: fw_parse_block_data, 846
[ 56.892803] tas2563 2-004c: fw_parse_block_data, 871
[ 56.897788] tas2563 2-004c: configuration, mnProgram: 0
[ 56.903040] tas2563 2-004c: configuration samplerate: 48000
[ 56.908643] tas2563 2-004c: Fs rate: 32
[ 56.912515] tas2563 2-004c: fw_parse_data, 882
[ 56.916988] tas2563 2-004c: fw_parse_block_data, 842
[ 56.921987] tas2563 2-004c: fw_parse_block_data, 846
[ 56.926972] tas2563 2-004c: fw_parse_block_data, 871
[ 56.932004] tas2563 2-004c: fw_parse_block_data, 842
[ 56.937007] tas2563 2-004c: fw_parse_block_data, 846
[ 56.941996] tas2563 2-004c: fw_parse_block_data, 871
[ 56.946980] tas2563 2-004c: configuration, mnProgram: 1
[ 56.952233] tas2563 2-004c: configuration samplerate: 48000
[ 56.957832] tas2563 2-004c: Fs rate: 0
[ 56.961599] tas2563 2-004c: fw_parse_data, 882
[ 56.966078] tas2563 2-004c: fw_parse_block_data, 842
[ 56.971071] tas2563 2-004c: fw_parse_block_data, 846
[ 56.976060] tas2563 2-004c: fw_parse_block_data, 871
[ 56.981046] tas2563 2-004c: config size: 15145, line: 1091
[ 56.986560] tas2563 2-004c: calib size: 0, line: 1099
[ 56.991648] tas2563 2-004c: find default configuration 0
[ 57.035580] tas2563 2-004c: load program 0 (Tuning Mode)
[ 57.040926] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
[ 57.049476] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 3117
[ 57.498264] tas2563 2-004c: Block PChkSum: FW = 0x49, Reg = 0x49
[ 57.504304] tas2563 2-004c: Block[0x1] PChkSum match
[ 57.509308] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
[ 57.519074] tas2563 2-004c: TAS2563 load data: music, Blocks = 2, Block Type = 4
[ 57.526500] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 8
[ 57.538677] tas2563 2-004c: Block PChkSum: FW = 0xc9, Reg = 0xc9
[ 57.544720] tas2563 2-004c: Block[0x4] PChkSum match
[ 57.549723] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
[ 57.559507] tas2563 2-004c: TAS2563 load data: music, Blocks = 2, Block Type = 3
[ 57.566945] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 558
[ 57.653923] tas2563 2-004c: Block PChkSum: FW = 0x70, Reg = 0x70
[ 57.659972] tas2563 2-004c: Block[0x3] PChkSum match
[ 57.664972] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
[ 57.670928] tas2563 2-004c: tas2563_set_slot, slot_width:0
[ 57.676437] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
[ 57.682786] tas2563 2-004c: INV format: IBNF
[ 57.687996] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
[ 57.693958] tas2563 2-004c: tas2563_set_bitwidth 1379
[ 57.699034] tas2563 2-004c: Not supported params format
[ 57.704291] tas2563 2-004c: tas2563_set_slot, slot_width:0
[ 57.709800] tas2563 2-004c: mnCh_size: 0
[ 57.713760] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
[ 57.719703] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
[ 57.729394] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
[ 57.735981] tas2563 2-004c: INV format: IBNF
[ 57.740977] asoc-simple-card sound: ASoC: no DMI vendor name!
[ 57.801320] tas2563 2-004c: tas2563_codec_read, reg: 0x3, value: 0x20
[ 57.847580] tas2563 2-004c: load program 0 (Tuning Mode)
[ 57.852923] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
[ 57.861549] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 3117
[ 58.305235] tas2563 2-004c: Block PChkSum: FW = 0x49, Reg = 0x49
[ 58.311295] tas2563 2-004c: Block[0x1] PChkSum match
[ 58.316366] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
[ 58.326167] tas2563 2-004c: TAS2563 load data: music, Blocks = 2, Block Type = 4
[ 58.333605] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 8
[ 58.343929] tas2563 2-004c: Block PChkSum: FW = 0xc9, Reg = 0xc9
[ 58.349973] tas2563 2-004c: Block[0x4] PChkSum match
[ 58.354972] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
[ 58.364735] tas2563 2-004c: TAS2563 load data: music, Blocks = 2, Block Type = 3
[ 58.372155] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 558
[ 58.457490] tas2563 2-004c: Block PChkSum: FW = 0x70, Reg = 0x70
[ 58.463528] tas2563 2-004c: Block[0x3] PChkSum match
[ 58.468523] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
[ 58.474473] tas2563 2-004c: tas2563_set_slot, slot_width:0
[ 58.479985] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
[ 58.486226] tas2563 2-004c: INV format: IBNF
[ 58.491455] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
[ 58.497397] tas2563 2-004c: tas2563_set_bitwidth 1379
[ 58.502497] tas2563 2-004c: Not supported params format
[ 58.507776] tas2563 2-004c: tas2563_set_slot, slot_width:0
[ 58.513303] tas2563 2-004c: mnCh_size: 0
[ 58.517246] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
[ 58.523194] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
[ 58.532784] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
[ 58.539404] tas2563 2-004c: tas2563_configuration_put = 0
[ 58.544835] tas2563 2-004c: tas2563_load_configuration: 0
[ 58.550270] tas2563 2-004c: Configuration 0 is already loaded
[ 58.556091] tas2563 2-004c: Calibration 0 doesn't exist
[ 58.619991] tas2563 2-004c: tas2563_codec_read, reg: 0x3, value: 0x20
[ 58.663580] tas2563 2-004c: load program 0 (Tuning Mode)
[ 58.668923] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
[ 58.677589] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 3117
[ 59.129435] tas2563 2-004c: Block PChkSum: FW = 0x49, Reg = 0x49
[ 59.135470] tas2563 2-004c: Block[0x1] PChkSum match
[ 59.140480] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
[ 59.150264] tas2563 2-004c: TAS2563 load data: music, Blocks = 2, Block Type = 4
[ 59.157711] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 8
[ 59.167896] tas2563 2-004c: Block PChkSum: FW = 0xc9, Reg = 0xc9
[ 59.173946] tas2563 2-004c: Block[0x4] PChkSum match
[ 59.178941] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
[ 59.188701] tas2563 2-004c: TAS2563 load data: music, Blocks = 2, Block Type = 3
[ 59.196118] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 558
[ 59.285247] tas2563 2-004c: Block PChkSum: FW = 0x70, Reg = 0x70
[ 59.291322] tas2563 2-004c: Block[0x3] PChkSum match
[ 59.296333] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
[ 59.302307] tas2563 2-004c: tas2563_set_slot, slot_width:0
[ 59.307844] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
[ 59.314111] tas2563 2-004c: INV format: IBNF
[ 59.319349] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
[ 59.325321] tas2563 2-004c: tas2563_set_bitwidth 1379
[ 59.330426] tas2563 2-004c: Not supported params format
[ 59.335677] tas2563 2-004c: tas2563_set_slot, slot_width:0
[ 59.341199] tas2563 2-004c: mnCh_size: 0
[ 59.345146] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
[ 59.351097] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
[ 59.360731] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
[ 59.367354] tas2563 2-004c: tas2563_configuration_put = 0
[ 59.372813] tas2563 2-004c: tas2563_load_configuration: 0
[ 59.378244] tas2563 2-004c: Configuration 0 is already loaded
[ 59.384092] tas2563 2-004c: Calibration 0 doesn't exist

And the output when we try to play a sound is shown in the attached file (aplay_output.txt):

aplay_output.txt
root@tv100:~# aplay -Dplughw:0,0 /usr/share/sounds/alsa/Front_Center.wav -c1 -fS24_LE -r48000 -v
Warning: format is changed to S16[ 152.970621] tas2563 2-004c: tas2563_hw_params, format: 2
[ 152.978257] tas2563 2-004c: tas2563_set_bitwidth 1379
_LE
Playing WAVE '/usr/share/sou[ 152.984964] tas2563 2-004c: mnCh_size: 16
[ 152.990536] tas2563 2-004c: blr_clk_ratio: 32
nds/alsa/Front_Center.wav' : Sign[ 152.997438] tas2563 2-004c: tas2563_hw_params, sample rate: 48000
ed 16 bit Little Endian, Rate 480[ 153.005318] tas2563 2-004c: SND_SOC_DAPM_POST_PMU
00 Hz, Mono
[ 153.012377] tas2563 2-004c: tas2563_mute
[ 153.016871] tas2563 2-004c: unmute: tas2563_mute
[ 153.021528] tas2563 2-004c: set power state: 0
[ 153.026060] tas2563 2-004c: tas2563_set_power_state, state: 0, mbPowerup 0
[ 153.033984] tas2563 2-004c: IRQ reg is: 0, 1219
Plug PCM: Route conversion PCM (sformat=S16_LE)
Transformation table:
0 <- 0
1 <- 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 4096
period_time : 85333
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 4096
period_event : 0
start_threshold : 16384
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 4611686018427387904
Slave: Hardware PCM card 0 'mx8-tas2563' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 4096
period_time : 85333
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 4096
period_event : 0
start_threshold : 16384
[ 153.139931] tas2563 2-004c: irq_work_routine
stop_threshold : 16384
silence_threshold: 0
silence_size[ 153.149952] tas2563 2-004c: IRQ status : 0x0, 0x0
: 0
boundary : 4611686018[ 153.157794] tas2563 2-004c: IRQ reg is: irq_work_routine 0, 414
427387904
appl_ptr : 0
[ 153.166782] tas2563 2-004c: IRQ reg is: irq_work_routine, 0, 427
hw_ptr : 0
[ 153.174995] tas2563 2-004c: set ICN to -90dB
[ 153.182042] tas2563 2-004c: IRQ reg is: 2, 435
[ 153.186532] tas2563 2-004c: set ICN delay
[ 153.192194] tas2563 2-004c: IRQ reg is: 2, 441
[ 153.228232] tas2563 2-004c: IRQ reg is: irq_work_routine 2, 414
[ 153.237536] tas2563 2-004c: IRQ reg is: irq_work_routine, 2, 427
[ 153.243589] tas2563 2-004c: set ICN to -90dB
[ 153.249382] tas2563 2-004c: IRQ reg is: 2, 435
[ 153.253864] tas2563 2-004c: set ICN delay
[ 153.259407] tas2563 2-004c: IRQ reg is: 2, 441
[ 153.263892] tas2563 2-004c: irq_work_routine, Critical ERROR REG[0x2] = 0x2
[ 153.270969] tas2563 2-004c: device powered up, power down to load program 0 (Tuning Mode)
[ 153.279236] tas2563 2-004c: set power state: 2
[ 153.283776] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 1
[ 153.335590] tas2563 2-004c: load program 0 (Tuning Mode)
[ 153.340924] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
[ 153.349474] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 3117
[ 153.817415] tas2563 2-004c: Block PChkSum: FW = 0x49, Reg = 0x49
[ 153.823628] tas2563 2-004c: Block[0x1] PChkSum match
[ 153.828669] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
[ 153.838508] tas2563 2-004c: TAS2563 load data: music, Blocks = 2, Block Type = 4
[ 153.846015] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 8
[ 153.856711] tas2563 2-004c: Block PChkSum: FW = 0xc9, Reg = 0xc9
[ 153.862879] tas2563 2-004c: Block[0x4] PChkSum match
[ 153.867875] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
[ 153.877656] tas2563 2-004c: TAS2563 load data: music, Blocks = 2, Block Type = 3
[ 153.885099] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 558
[ 153.972733] tas2563 2-004c: Block PChkSum: FW = 0x70, Reg = 0x70
[ 153.978793] tas2563 2-004c: Block[0x3] PChkSum match
[ 153.983789] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
[ 153.989770] tas2563 2-004c: tas2563_set_slot, slot_width:16
[ 153.996004] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
[ 154.002273] tas2563 2-004c: INV format: IBNF
[ 154.007516] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
[ 154.013458] tas2563 2-004c: tas2563_set_bitwidth 1379
[ 154.019160] tas2563 2-004c: mnCh_size: 16
[ 154.023213] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
[ 154.032781] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
[ 154.489682] tas2563 2-004c: tas2563_mute
[ 154.493644] tas2563 2-004c: mute: tas2563_mute
[ 154.498115] tas2563 2-004c: set power state: 2
[ 154.502646] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 0
[ 154.510215] tas2563 2-004c: SND_SOC_DAPM_PRE_PMD


We can hear a very small "beep" when we start playing the sound but we can't hear the sound we are playing.


Our questions are:
- Which driver should we use?
- Is SAI3 configuration correct for TAS2563?

Thank you very much.

Regards.

  • Hi Gustavo,

    Connections seem OK, although MCLK is not required as long as you have SBCLK.
    Please make sure you have clocks enabled before sending initialization and play commands to the device, or at least before play command. If the device tries to play without clocks it will trigger clock error detection.

    Perhaps one thing you can try is reading back IRQ flags from the device, this may give an idea if an error flag has been triggered.
    Can you check with a scope if the clocks look OK at the input of TAS2563?

    You should be using the drivers available from product folder: https://git.ti.com/cgit/?q=tas2563

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Hi 

    I have following questions want you to answser:
    1) what is the register dump for book0 page0? pls use following commands to dump.
    i2cset -y -f 0 4c 0 0
    i2cset -y -f 0 4c 7f 0
    i2cset -y -f 0 4c 0 0
    i2cdump -y -f 0 4c
    2) what the spec of Front_Center.wav
        Little edian or big edian?
        sample rate, and channel no?
    3) aplay -Dplughw:0,0 /usr/share/sounds/alsa/Front_Center.wav -c1 -fS24_LE -r48000 -v
    In this command, you set the format as signed 24-bit, but the log tell me the chip only run in 16-bit
    3) Have you measure the i2s clk(including bit clk and fsync clk) with scope, pls upload them too.
    Looking forward to your reply. Thanks
  • Dear all,

    I am Gustavo team mate. I will try to follow up this topic.

    We have changed the drivers to Mr. Salazar recommendation with the same result. We are currently waiting for the Evaluation Board, arriving this week to make full speaker calibration and try to use proper calibration files.

    Answering Mr. Ding:

    1)

    root@tv100:~# i2cset -f -y 2 0x4c 0x00 0
    root@tv100:~# i2cset -f -y 2 0x4c 0x7f 0
    root@tv100:~# i2cset -f -y 2 0x4c 0x00 0
    root@tv100:~# i2cdump -f -y 2 0x4c
    No size specified (using byte-data access)
    0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
    00: 00 00 0e 38 c6 22 09 03 4a 10 13 02 00 04 05 06 ..?8?"??J???.???
    10: 07 7f 12 76 01 2e 60 0e 0c 00 fc a6 df ff ff 00 ???v?.`??.???...
    20: 00 00 80 00 04 00 00 80 00 80 00 00 00 8c 80 a1 ..?.?..?.?...???
    30: 19 40 81 34 4b 74 00 00 0d 0c be 58 68 08 10 00 ?@?4Kt..???Xh??.
    40: 76 41 00 c0 10 21 00 b4 ac 00 00 00 00 00 00 00 vA.??!.??.......
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    70: 00 00 00 f0 00 0f 00 00 80 00 00 00 00 10 6a 00 ...?.?..?....?j.
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

    2)

    Please find attached the file, it is one of the examples provided by alsamixer for testing.

    3)

    I will provide the scopes as soon as possible. Current situation working from home makes it more difficult to get access to the tools. Hopefullly I'll have it by the end of the week.

    Thanks and kind regards.

  • Hi 

    The register dump told me that the chip is shutdown, because B0P0R2=0x0e. Are you sure that the register dump has been captured during playback? If so, the clk is probably wrong. 

  • Sorry, this is proper dump while playing:

     0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
    00: 00 00 0c 38 c6 22 05 03 42 10 13 02 00 04 05 06 ..?8?"??B???.???
    10: 07 14 12 76 01 2e 60 0e 0c 00 fc a6 df ff ff 00 ???v?.`??.???...
    20: 00 00 80 00 06 00 11 c0 00 d0 3b 80 80 8c 40 a7 ..?.?.??.?;???@?
    30: 19 40 80 34 4b 74 04 00 0d 0c be 58 68 08 10 00 ?@?4Kt?.???Xh??.
    40: 76 41 00 c0 10 21 00 2d ac 3b 70 00 00 00 00 00 vA.??!.-?;p.....
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    70: 00 00 00 f0 00 0f 00 00 80 00 00 00 00 10 97 00 ...?.?..?....??.
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

    As you can see, it is now in Active Mode B0P0R2=0x0c

    Kind regards.

  • According to your latest reg dump, I get following information:

    • B0P0R8 = 0x42, this means the channel bit-width is 32bit, but the sample bit-width is16bit
    • B0P0R0x11=0x14, the SBCLK:FSYNC=32, and samplerate is about 48kHz. This value is very strange, kindly check the I2S bit clk and fsync clk with scope. According to my project experience. According to the setting for B0P0R8, B0P0R0x11 must be 0x24
    • B0P0R0x24=0x6 tells me that TDM clk error and over-current on spk coil. Is spk short circuit? and audio clk(i2s clk) abnormal?

    Kindly the upload the clk plots.

    Following the the property of the wav files

    C:\Users\DELL\Desktop\Front_Center.wav
    General
    Complete name : C:\Users\DELL\Desktop\Front_Center.wav
    Format : Wave
    File size : 134 KiB
    Duration : 1 s 428 ms
    Overall bit rate mode : Constant
    Overall bit rate : 768 kb/s
    Audio
    Format : PCM
    Format settings : Little / Signed
    Codec ID : 1
    Duration : 1 s 428 ms
    Bit rate mode : Constant
    Bit rate : 768 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Bit depth : 16 bits
    Stream size : 134 KiB (100%)

  • Dear Mr Ding and Mr. Salazar, I will try to sum up the current status on our development.

    Right now, we have the Development Board for TAS2563 and the base board so we can currently using PurePath.

    Good news is that testing our speaker with the development board, it sounds pretty well, so we can confirm that there should be no issue with the chosen endpoint.

    Linux Driver

    We have moved the driver to the Android version as proposed by Mr. Salazar, the drivers available at TI website.

    We are launching them by hand and this is the result:

    root@tv100:~# insmod /lib/modules/5.10.9-1.0.0+gf001713/kernel/sound/soc/codecs/tas2563-a/snd-soc-tas2563.ko
    [   64.729437] tas2563 2-004c: Driver ID: 1.0.0
    [   64.733790] tas2563 2-004c: tas2563_i2c_probe enter
    [   64.776032] tas2563 2-004c: PGID: 16
    [   64.779761] tas2563 2-004c: tas2563_register_codec, enter
    [   64.785383] tas2563 2-004c: tas2563_register_misc, leave
    [   64.790811] tas2563 2-004c: tiload_driver_init
    [   64.795361] tas2563 2-004c: allocated Major Number: 509
    [   64.800841] tas2563 2-004c: Registered TiLoad driver, Major number: 509
    [   64.809373] tas2563 2-004c: tas2563_codec_probe
    [   64.814149] tas2563 2-004c: tas2563_fw_ready:
    [   64.819755] tas2563 2-004c: firmware size: 20389
    [   64.824409] tas2563 2-004c: FW timestamp: 1630655686
    [   64.829441] debugfs: Directory '30030000.sai' with parent 'mx8-tas2563' already present!
    [   64.837598] tas2563 2-004c: tas2563_set_dai_fmt, format=0x4301
    [   64.843473] tas2563 2-004c: FW Size       = 20389
    [   64.848201] tas2563 2-004c: Checksum      = 0x79B70DDB
    [   64.853375] tas2563 2-004c: PPC Version   = 0x2C000
    [   64.858274] tas2563 2-004c: FW  Version    = 0x1010000
    [   64.863433] tas2563 2-004c: Driver Version= 0x0202
    [   64.868242] tas2563 2-004c: Timestamp     = 1630655686
    [   64.873402] tas2563 2-004c: DDC Name      = TV100_Trial2
    [   64.878731] tas2563 2-004c: Description   = TI SmartAmp
    [   64.883976] tas2563 2-004c: header size: 112, line: 1068
    [   64.889309] tas2563 2-004c: FW i2sMode: 0
    [   64.893347] tas2563 2-004c: fw_parse_data, 882
    [   64.897828] tas2563 2-004c: fw_parse_block_data, 842
    [   64.902818] tas2563 2-004c: fw_parse_block_data, 846
    [   64.907830] tas2563 2-004c: fw_parse_block_data, 871
    [   64.912821] tas2563 2-004c: program data number: 16272
    [   64.917981] tas2563 2-004c: program size: 16363, line: 1084
    [   64.923587] tas2563 2-004c: configuration, mnProgram: 0
    [   64.928860] tas2563 2-004c: configuration samplerate: 48000
    [   64.934463] tas2563 2-004c: Fs rate: 0
    [   64.938237] tas2563 2-004c: fw_parse_data, 882
    [   64.942721] tas2563 2-004c: fw_parse_block_data, 842
    [   64.947707] tas2563 2-004c: fw_parse_block_data, 846
    [   64.952706] tas2563 2-004c: fw_parse_block_data, 871
    [   64.957689] tas2563 2-004c: fw_parse_block_data, 842
    [   64.962674] tas2563 2-004c: fw_parse_block_data, 846
    [   64.967660] tas2563 2-004c: fw_parse_block_data, 871
    [   64.972656] tas2563 2-004c: configuration, mnProgram: 0
    [   64.977904] tas2563 2-004c: configuration samplerate: 48000
    [   64.983505] tas2563 2-004c: Fs rate: 0
    [   64.987275] tas2563 2-004c: fw_parse_data, 882
    [   64.991749] tas2563 2-004c: fw_parse_block_data, 842
    [   64.996736] tas2563 2-004c: fw_parse_block_data, 846
    [   65.001733] tas2563 2-004c: fw_parse_block_data, 871
    [   65.006718] tas2563 2-004c: fw_parse_block_data, 842
    [   65.011707] tas2563 2-004c: fw_parse_block_data, 846
    [   65.016698] tas2563 2-004c: fw_parse_block_data, 871
    [   65.021702] tas2563 2-004c: config size: 3914, line: 1091
    [   65.027119] tas2563 2-004c: calib size: 0, line: 1099
    [   65.032248] tas2563 2-004c: find default configuration 0
    [   65.075718] tas2563 2-004c: load program 0 (Tuning Mode)
    [   65.081058] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [   65.091204] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [   65.705983] tas2563 2-004c: Block PChkSum: FW = 0xcc, Reg = 0xcc
    [   65.712027] tas2563 2-004c: Block[0x1] PChkSum match
    [   65.717019] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [   65.726789] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [   65.734642] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [   65.741190] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [   65.750957] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [   65.758809] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [   65.850479] tas2563 2-004c: Block PChkSum: FW = 0x46, Reg = 0x46
    [   65.856533] tas2563 2-004c: Block[0x3] PChkSum match
    [   65.861539] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
    [   65.867485] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   65.873016] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
    [   65.879362] tas2563 2-004c: INV format: IBNF
    [   65.886783] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
    [   65.892744] tas2563 2-004c: tas2563_set_bitwidth 1379
    [   65.897836] tas2563 2-004c: Not supported params format
    [   65.903088] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   65.908602] tas2563 2-004c: mnCh_size: 0
    [   65.912550] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
    [   65.918491] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
    [   65.928123] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
    [   65.934681] tas2563 2-004c: INV format: IBNF
    [   65.939715] asoc-simple-card sound: ASoC: no DMI vendor name!

    Configuration File

    To be able to launch the Linux Driver, we have prepared the configuration file based on SLAA954 recommendations.

    During file generation we have chosen 0x4c as I2C address and basically we have only set the speaker impedance and maximum temperature according to CUI -- CMS-30205-158L120-67 datasheet. 

    Please, find attached the result of generating these files with PurePath.

    TV100_Trial2.zip

    We have taken the TV100_Trial2.bin file and change the name to tas2563_uCDSP.bin and stored it at /lib/firmware.

    Calibration File

    To avoid aplay failing when trying to play the audio file, we have included the tas2563_cal.bin from this post

    We have copied the file to /mnt/vendor/persist/audio

    Based on the driver, this file seems to be mandatory [link], but we have some concerns about the file containing proper information.

    aplay Result

    After all the setup, this is the result when trying to play the audio file. We can't hear any sound on the speaker.:

    root@tv100:~# aplay -Dplughw:0,0 /usr/share/sounds/alsa/Front_Center.wav -c1 -fS16_LE -r48000 -v
    Playing WAVE '/usr/share/sou[  359.520435] tas2563 2-004c: tas2563_set_bitwidth 1379
    nds/alsa/Front_Center.wav' : Sign[  359.528689] tas2563 2-004c: mnCh_size: 16
    ed 16 bit Little Endian, Rate 480[  359.535210] tas2563 2-004c: blr_clk_ratio: 32
    00 Hz, Mono
    [  359.543078] tas2563 2-004c: tas2563_hw_params, sample rate: 48000
    [  359.550769] tas2563 2-004c: SND_SOC_DAPM_POST_PMU
    [  359.555825] tas2563 2-004c: tas2563_mute
    [  359.559774] tas2563 2-004c: unmute: tas2563_mute
    [  359.564465] tas2563 2-004c: set power state: 0
    [  359.568944] tas2563 2-004c: tas2563_set_power_state, state: 0, mbPowerup 0
    [  359.575840] tas2563 2-004c: tas2563_load_calibration:
    [  359.580935] tas2563 2-004c: TAS2563 calibration file = /mnt/vendor/persist/audio/tas2563_cal.bin
    [  359.589773] tas2563 2-004c: f is not null
    [  359.595140] tas2563 2-004c: nSize = 440
    [  359.599007] tas2563 2-004c: nSize = 440
    [  359.602873] tas2563 2-004c: TAS2563 calibration file size = 440
    [  359.608816] tas2563 2-004c: firmware size: 440
    [  359.613287] tas2563 2-004c: FW timestamp: 1552463249
    [  359.618276] tas2563 2-004c: FW Size       = 440
    [  359.622855] tas2563 2-004c: Checksum      = 0x0000
    [  359.627679] tas2563 2-004c: PPC Version   = 0x0000
    [  359.632528] tas2563 2-004c: FW  Version    = 0x0000
    [  359.637430] tas2563 2-004c: Driver Version= 0x0100
    [  359.642251] tas2563 2-004c: Timestamp     = 1552463249
    [  359.647412] tas2563 2-004c: DDC Name      = Calibration Data File
    [  359.653537] tas2563 2-004c: Description   = Calibration Data File for TAS2563 Mono
    [  359.661174] tas2563 2-004c: header size: 139, line: 1068
    [  359.666542] tas2563 2-004c: program size: 2, line: 1084
    [  359.671792] tas2563 2-004c: config size: 2, line: 1091
    [  359.677008] tas2563 2-004c: fw_parse_data, 882
    [  359.681525] tas2563 2-004c: fw_parse_block_data, 842
    [  359.686519] tas2563 2-004c: fw_parse_block_data, 846
    [  359.691527] tas2563 2-004c: fw_parse_block_data, 871
    [  359.696522] tas2563 2-004c: calib size: 297, line: 1099
    [  359.701789] tas2563 2-004c: TAS2563 calibration: 1 calibrations
    [  359.708673] tas2563 2-004c: IRQ reg is: 0, 1219
    Plug PCM: Route conversion PCM (sformat=S16_LE)
      Transformation table:
        0 <- 0
        1 <- 0
    Its setup is:
      stream       : PLAYBACK
      access       : RW_INTERLEAVED
      format       : S16_LE
      subformat    : STD
      channels     : 1
      rate         : 48000
      exact rate   : 48000 (48000/1)
      msbits       : 16
      buffer_size  : 16384
      period_size  : 4096
      period_time  : 85333
      tstamp_mode  : NONE
      tstamp_type  : MONOTONIC
      period_step  : 1
      avail_min    : 4096
      period_event : 0
      start_threshold  : 16384
      stop_threshold   : 16384
      silence_threshold: 0
      silence_size : 0
      boundary     : 4611686018427387904
    Slave: Hardware PCM card 0 'mx8-tas2563' device 0 subdevice 0
    Its setup is:
      stream       : PLAYBACK
      access       : MMAP_INTERLEAVED
      format       : S16_LE
      subformat    : STD
      channels     : 2
      rate         : 48000
      exact rate   : 48000 (48000/1)
      msbits       : 16
      buffer_size  : 16384
      period_size  : 4096
      period_time  : 85333
      tstamp_mode  : NONE
      tstamp_type  : MONOTONIC
      period_step  : 1
      avail_min    : 4096
      period_event : 0
      start_threshold  : 16384[  359.816061] tas2563 2-004c: irq_work_routine
    
     
    
      stop_threshold   : 16384
      silence_threshold: 0
      silence_[  359.824901] tas2563 2-004c: IRQ status : 0x0, 0x0
    size : 0
      boundary     : 461168[  359.831817] tas2563 2-004c: IRQ reg is: irq_work_routine 0, 414
    6018427387904
      appl_ptr     : 0[  359.840862] tas2563 2-004c: IRQ reg is: irq_work_routine, 0, 427
    
     
    
      hw_ptr       : 0
    [  359.848797] tas2563 2-004c: set ICN to -90dB
    [  359.856217] tas2563 2-004c: IRQ reg is: 2, 435
    [  359.860689] tas2563 2-004c: set ICN delay
    [  359.866053] tas2563 2-004c: IRQ reg is: 2, 441
    [  359.898159] tas2563 2-004c: IRQ reg is: irq_work_routine 2, 414
    [  359.905018] tas2563 2-004c: IRQ reg is: irq_work_routine, 2, 427
    [  359.911070] tas2563 2-004c: set ICN to -90dB
    [  359.921463] tas2563 2-004c: IRQ reg is: 2, 435
    [  359.925944] tas2563 2-004c: set ICN delay
    [  359.934825] tas2563 2-004c: IRQ reg is: 2, 441
    [  359.939300] tas2563 2-004c: irq_work_routine, Critical ERROR REG[0x2] = 0x2
    [  359.946320] tas2563 2-004c: device powered up, power down to load program 0 (Tuning Mode)
    [  359.954533] tas2563 2-004c: set power state: 2
    [  359.959003] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 1
    [  360.007709] tas2563 2-004c: load program 0 (Tuning Mode)
    [  360.013047] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [  360.021599] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [  360.622907] tas2563 2-004c: Block PChkSum: FW = 0xcc, Reg = 0xcc
    [  360.628957] tas2563 2-004c: Block[0x1] PChkSum match
    [  360.633954] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [  360.643719] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [  360.651579] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [  360.658134] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [  360.667898] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [  360.675782] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [  360.744423] tas2563 2-004c: Block PChkSum: FW = 0x46, Reg = 0x46
    [  360.750491] tas2563 2-004c: Block[0x3] PChkSum match
    [  360.755497] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
    [  360.761444] tas2563 2-004c: tas2563_set_slot, slot_width:16
    [  360.767644] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
    [  360.773912] tas2563 2-004c: INV format: IBNF
    [  360.779234] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
    [  360.785196] tas2563 2-004c: tas2563_set_bitwidth 1379
    [  360.790875] tas2563 2-004c: mnCh_size: 16
    [  360.794908] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
    [  360.803759] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
    [  361.164884] tas2563 2-004c: tas2563_mute
    [  361.168849] tas2563 2-004c: mute: tas2563_mute
    [  361.173349] tas2563 2-004c: set power state: 2
    [  361.177902] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 0
    [  361.185548] tas2563 2-004c: SND_SOC_DAPM_PRE_PMD

    And this is the signals while trying to play the sound:

    BCLK -- Just to measure that Frequency is 1.53MHz

    FSYNC to BCLK

    DIN to BCLK, to check that SmartPA is receiving data:

    All the image files are here so anyone can check them at full size:

    3250.Scopes.zip

    I have tried to get the I2C dump while trying to play the audio, but now the result is different every time I make the dump, as if the driver is accesing the device.

    Thanks and kind regards.

  • The preivous message has several links but they are difficult to see unless you try to press it.

    Sorry for the inconvenience.

  • Pls set B0P0R0x30=0x99, then tinyplay the tas2563

  • By the way, can you find a a bit longer wav file, at least 1mins duration. According to the log, from unmute to mute the time consumption on 1 seconds( 361.168849 - 359.559774).

  • Hi Mr. Ding.

    I have changed the audio to this attached wav clip.

    I have performed the following sequence after booting, check that the results for insmod are different from previous with no change made in the calibration/configuration files.

    Launch Driver:

    root@tv100:~# insmod /lib/modules/5.10.9-1.0.0+gf001713/kernel/sound/soc/codecs/tas2563-a/snd-soc-tas2563.ko
    [  116.367396] tas2563 2-004c: Driver ID: 1.0.0
    [  116.371748] tas2563 2-004c: tas2563_i2c_probe enter
    [  116.416035] tas2563 2-004c: PGID: 16
    [  116.419717] tas2563 2-004c: tas2563_register_codec, enter
    [  116.425371] tas2563 2-004c: tas2563_register_misc, leave
    [  116.430771] tas2563 2-004c: tiload_driver_init
    [  116.435305] tas2563 2-004c: allocated Major Number: 509
    [  116.440735] tas2563 2-004c: Registered TiLoad driver, Major number: 509
    [  116.449310] tas2563 2-004c: tas2563_codec_probe
    [  116.453957] debugfs: Directory '30030000.sai' with parent 'mx8-tas2563' already present!
    [  116.462213] tas2563 2-004c: tas2563_fw_ready:
    [  116.467690] tas2563 2-004c: firmware size: 20389
    [  116.472345] tas2563 2-004c: FW timestamp: 1630655686
    [  116.477375] tas2563 2-004c: tas2563_set_dai_fmt, format=0x4301
    [  116.483246] tas2563 2-004c: FW Size       = 20389
    [  116.488007] tas2563 2-004c: Checksum      = 0x79B70DDB
    [  116.493179] tas2563 2-004c: PPC Version   = 0x2C000
    [  116.498076] tas2563 2-004c: FW  Version    = 0x1010000
    [  116.503235] tas2563 2-004c: Driver Version= 0x0202
    [  116.508044] tas2563 2-004c: Timestamp     = 1630655686
    [  116.513228] tas2563 2-004c: DDC Name      = TV100_Trial2
    [  116.518570] tas2563 2-004c: Description   = TI SmartAmp
    [  116.523821] tas2563 2-004c: header size: 112, line: 1068
    [  116.529160] tas2563 2-004c: FW i2sMode: 0
    [  116.533188] tas2563 2-004c: fw_parse_data, 882
    [  116.537661] tas2563 2-004c: fw_parse_block_data, 842
    [  116.542659] tas2563 2-004c: fw_parse_block_data, 846
    [  116.547676] tas2563 2-004c: fw_parse_block_data, 871
    [  116.552662] tas2563 2-004c: program data number: 16272
    [  116.557823] tas2563 2-004c: program size: 16363, line: 1084
    [  116.563422] tas2563 2-004c: configuration, mnProgram: 0
    [  116.568679] tas2563 2-004c: configuration samplerate: 48000
    [  116.574270] tas2563 2-004c: Fs rate: 0
    [  116.578042] tas2563 2-004c: fw_parse_data, 882
    [  116.582502] tas2563 2-004c: fw_parse_block_data, 842
    [  116.587489] tas2563 2-004c: fw_parse_block_data, 846
    [  116.592491] tas2563 2-004c: fw_parse_block_data, 871
    [  116.597487] tas2563 2-004c: fw_parse_block_data, 842
    [  116.602472] tas2563 2-004c: fw_parse_block_data, 846
    [  116.607461] tas2563 2-004c: fw_parse_block_data, 871
    [  116.612446] tas2563 2-004c: configuration, mnProgram: 0
    [  116.617721] tas2563 2-004c: configuration samplerate: 48000
    [  116.623329] tas2563 2-004c: Fs rate: 0
    [  116.627101] tas2563 2-004c: fw_parse_data, 882
    [  116.631573] tas2563 2-004c: fw_parse_block_data, 842
    [  116.636563] tas2563 2-004c: fw_parse_block_data, 846
    [  116.641556] tas2563 2-004c: fw_parse_block_data, 871
    [  116.646541] tas2563 2-004c: fw_parse_block_data, 842
    [  116.651539] tas2563 2-004c: fw_parse_block_data, 846
    [  116.656520] tas2563 2-004c: fw_parse_block_data, 871
    [  116.661512] tas2563 2-004c: config size: 3914, line: 1091
    [  116.666938] tas2563 2-004c: calib size: 0, line: 1099
    [  116.672049] tas2563 2-004c: find default configuration 0
    [  116.715647] tas2563 2-004c: load program 0 (Tuning Mode)
    [  116.721008] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [  116.729556] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [  117.333279] tas2563 2-004c: Block PChkSum: FW = 0xcc, Reg = 0xcc
    [  117.339514] tas2563 2-004c: Block[0x1] PChkSum match
    [  117.344514] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [  117.354288] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [  117.362169] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [  117.368726] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [  117.378493] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [  117.386350] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [  117.456819] tas2563 2-004c: Block PChkSum: FW = 0x46, Reg = 0x46
    [  117.462871] tas2563 2-004c: Block[0x3] PChkSum match
    [  117.467881] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
    [  117.473832] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [  117.479344] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
    [  117.485676] tas2563 2-004c: INV format: IBNF
    [  117.490954] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
    [  117.496905] tas2563 2-004c: tas2563_set_bitwidth 1379
    [  117.501979] tas2563 2-004c: Not supported params format
    [  117.507238] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [  117.512746] tas2563 2-004c: mnCh_size: 0
    [  117.516704] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
    [  117.522649] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
    [  117.532246] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
    [  117.538822] tas2563 2-004c: INV format: IBNF
    [  117.543860] asoc-simple-card sound: ASoC: no DMI vendor name!
    [  117.594804] tas2563 2-004c: tas2563_codec_read, reg: 0x3, value: 0x20
    [  117.639642] tas2563 2-004c: load program 0 (Tuning Mode)
    [  117.645004] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [  117.654058] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [  118.275332] tas2563 2-004c: Block PChkSum: FW = 0xcc, Reg = 0xcc
    [  118.281409] tas2563 2-004c: Block[0x1] PChkSum match
    [  118.286417] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [  118.296190] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [  118.304042] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [  118.310595] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [  118.320361] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [  118.328215] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [  118.402008] tas2563 2-004c: Block PChkSum: FW = 0x46, Reg = 0x46
    [  118.408047] tas2563 2-004c: Block[0x3] PChkSum match
    [  118.413037] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
    [  118.418985] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [  118.424524] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
    [  118.430783] tas2563 2-004c: INV format: IBNF
    [  118.436058] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
    [  118.442012] tas2563 2-004c: tas2563_set_bitwidth 1379
    [  118.447120] tas2563 2-004c: Not supported params format
    [  118.452394] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [  118.457919] tas2563 2-004c: mnCh_size: 0
    [  118.461869] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
    [  118.467811] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
    [  118.477429] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
    [  118.484072] tas2563 2-004c: tas2563_configuration_put = 0
    [  118.489551] tas2563 2-004c: tas2563_load_configuration: 0
    [  118.494991] tas2563 2-004c: Configuration 0 is already loaded
    [  118.500820] tas2563 2-004c: Calibration 0 doesn't exist
    [  118.565247] tas2563 2-004c: tas2563_codec_read, reg: 0x3, value: 0x20
    [  118.611640] tas2563 2-004c: load program 0 (Tuning Mode)
    [  118.616984] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [  118.625531] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [  119.226891] tas2563 2-004c: Block PChkSum: FW = 0xcc, Reg = 0xcc
    [  119.232946] tas2563 2-004c: Block[0x1] PChkSum match
    [  119.237980] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [  119.247757] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [  119.255640] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [  119.262229] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [  119.272010] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [  119.279882] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [  119.350922] tas2563 2-004c: Block PChkSum: FW = 0x46, Reg = 0x46
    [  119.356975] tas2563 2-004c: Block[0x3] PChkSum match
    [  119.361982] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
    [  119.367926] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [  119.373449] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
    [  119.379767] tas2563 2-004c: INV format: IBNF
    [  119.385007] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
    [  119.391045] tas2563 2-004c: tas2563_set_bitwidth 1379
    [  119.396130] tas2563 2-004c: Not supported params format
    [  119.401432] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [  119.406943] tas2563 2-004c: mnCh_size: 0
    [  119.410936] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
    [  119.416888] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
    [  119.426487] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
    [  119.433114] tas2563 2-004c: tas2563_configuration_put = 0
    [  119.438604] tas2563 2-004c: tas2563_load_configuration: 0
    [  119.444087] tas2563 2-004c: Configuration 0 is already loaded
    [  119.449964] tas2563 2-004c: Calibration 0 doesn't exist
    
    root@tv100:~# ls /mnt/vendor/persist/audio/
    tas2563_cal.bin
    

    Set 0x30 to 0x99

    I can't understand this setting as many of the bits in that register are "Reserved"

    root@tv100:~# i2cset -f -y 2 0x4c 0x00 0
    root@tv100:~# i2cset -f -y 2 0x4c 0x7f 0
    root@tv100:~# i2cset -f -y 2 0x4c 0x00 0
    root@tv100:~# i2cset -f -y 2 0x4c 0x30 0x99
    root@tv100:~# i2cget -f -y 2 0x4c 0x30
    0x99
    

    Play Wav File

    root@tv100:~# aplay -Dplughw:0,0 /home/file_example_WAV_1MG.wav
    Playing WAVE '/home/file_example_[  319.018279] tas2563 2-004c: tas2563_hw_params, format: 2
    WAV_1MG.wav' : Signed 16 bit Litt[  319.025438] tas2563 2-004c: tas2563_set_bitwidth 1379
    le Endian, Rate 8000 Hz, Stereo
    [  319.033975] tas2563 2-004c: tas2563_set_slot, slot_width:16
    [  319.042387] tas2563 2-004c: mnCh_size: 16
    [  319.046471] tas2563 2-004c: blr_clk_ratio: 32
    [  319.052096] tas2563 2-004c: tas2563_hw_params, sample rate: 8000
    [  319.058142] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 8000
    [  319.067297] tas2563 2-004c: SND_SOC_DAPM_POST_PMU
    [  319.072150] tas2563 2-004c: tas2563_mute
    [  319.076109] tas2563 2-004c: unmute: tas2563_mute
    [  319.080801] tas2563 2-004c: set power state: 0
    [  319.085272] tas2563 2-004c: tas2563_set_power_state, state: 0, mbPowerup 0
    [  319.092215] tas2563 2-004c: tas2563_load_calibration:
    [  319.097320] tas2563 2-004c: TAS2563 calibration file = /mnt/vendor/persist/audio/tas2563_cal.bin
    [  319.106181] tas2563 2-004c: f is not null
    [  319.111451] tas2563 2-004c: nSize = 440
    [  319.115318] tas2563 2-004c: nSize = 440
    [  319.119222] tas2563 2-004c: TAS2563 calibration file size = 440
    [  319.125219] tas2563 2-004c: firmware size: 440
    [  319.129730] tas2563 2-004c: FW timestamp: 1552463249
    [  319.134766] tas2563 2-004c: FW Size       = 440
    [  319.139326] tas2563 2-004c: Checksum      = 0x0000
    [  319.144200] tas2563 2-004c: PPC Version   = 0x0000
    [  319.149017] tas2563 2-004c: FW  Version    = 0x0000
    [  319.154019] tas2563 2-004c: Driver Version= 0x0100
    [  319.158846] tas2563 2-004c: Timestamp     = 1552463249
    [  319.164023] tas2563 2-004c: DDC Name      = Calibration Data File
    [  319.170158] tas2563 2-004c: Description   = Calibration Data File for TAS2563 Mono
    [  319.177855] tas2563 2-004c: header size: 139, line: 1068
    [  319.183200] tas2563 2-004c: program size: 2, line: 1084
    [  319.188446] tas2563 2-004c: config size: 2, line: 1091
    [  319.193613] tas2563 2-004c: fw_parse_data, 882
    [  319.198107] tas2563 2-004c: fw_parse_block_data, 842
    [  319.203097] tas2563 2-004c: fw_parse_block_data, 846
    [  319.208114] tas2563 2-004c: fw_parse_block_data, 871
    [  319.213111] tas2563 2-004c: calib size: 297, line: 1099
    [  319.218473] tas2563 2-004c: TAS2563 calibration: 1 calibrations
    [  319.225411] tas2563 2-004c: IRQ reg is: 0, 1219
    [  319.331962] tas2563 2-004c: irq_work_routine
    [  319.337483] tas2563 2-004c: IRQ status : 0x0, 0x0
    [  319.342921] tas2563 2-004c: IRQ reg is: irq_work_routine 0, 414
    [  319.349823] tas2563 2-004c: IRQ reg is: irq_work_routine, 0, 427
    [  319.355880] tas2563 2-004c: set ICN to -90dB
    [  319.361416] tas2563 2-004c: IRQ reg is: 0, 435
    [  319.365909] tas2563 2-004c: set ICN delay
    [  319.371568] tas2563 2-004c: IRQ reg is: 0, 441
    [  319.419642] tas2563 2-004c: irq_work_routine
    [  319.425168] tas2563 2-004c: IRQ status : 0x0, 0x0
    [  319.788023] tas2563 2-004c: irq_work_routine
    [  319.793544] tas2563 2-004c: IRQ status : 0x4, 0x0
    [  319.798280] tas2563 2-004c: device powered up, power down to load program 0 (Tuning Mode)
    [  319.806519] tas2563 2-004c: set power state: 2
    [  319.811012] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 1
    [  319.855648] tas2563 2-004c: load program 0 (Tuning Mode)
    [  319.860997] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [  319.871498] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [  320.476429] tas2563 2-004c: Block PChkSum: FW = 0xcc, Reg = 0xcc
    [  320.482506] tas2563 2-004c: Block[0x1] PChkSum match
    [  320.487545] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [  320.497437] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [  320.505374] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [  320.511959] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [  320.521745] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [  320.529621] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [  320.599691] tas2563 2-004c: Block PChkSum: FW = 0x46, Reg = 0x46
    [  320.605824] tas2563 2-004c: Block[0x3] PChkSum match
    [  320.610979] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
    [  320.617011] tas2563 2-004c: tas2563_set_slot, slot_width:16
    [  320.623371] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
    [  320.629714] tas2563 2-004c: INV format: IBNF
    [  320.635239] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
    [  320.641248] tas2563 2-004c: tas2563_set_bitwidth 1379
    [  320.647161] tas2563 2-004c: mnCh_size: 16
    [  320.651251] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
    [  320.657357] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 8000
    [  320.667291] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
    [  352.848263] tas2563 2-004c: tas2563_mute
    [  352.852220] tas2563 2-004c: mute: tas2563_mute
    [  352.856765] tas2563 2-004c: set power state: 2
    [  352.861281] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 0
    [  352.870641] tas2563 2-004c: SND_SOC_DAPM_PRE_PMD
    

    Dump I2C status

    No size specified (using byte-data access)
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 00 00 02 20 c6 22 09 03 40 10 01 02 00 04 05 06    ..? ?"??@???.???
    10: 07 7d 12 76 01 2e 60 0e 0c 00 f8 a6 df ef ff 00    ?}?v?.`??.????..
    20: 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00    .........@......
    30: 59 40 81 34 4b 84 05 00 00 0c be 38 38 08 10 00    Y@?4K??..??88??.
    40: b6 41 00 c0 10 21 00 00 2c 00 00 00 00 00 00 00    ?A.??!..,.......
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    70: 00 00 00 f0 00 0f 00 00 80 00 00 00 00 10 44 00    ...?.?..?....?D.
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    

    Thanks and kind regards.

  • I have checked that when playing audio after setting 0x30 to 0x99, then the B0P0R2=0x02 --> Software Shutdown.

    If I try a second play, with the current status of 0x30 after finishing the first play, you can see that B0P0R2=0x00 --> Active

    root@tv100:~# i2cget -f -y 2 0x4c 0x30
    0x59
    
    root@tv100:~# i2cset -f -y 2 0x4c 0x00 0
    root@tv100:~# i2cset -f -y 2 0x4c 0x7f 0
    root@tv100:~# i2cset -f -y 2 0x4c 0x00 0
    root@tv100:~# i2cdump -f -y 2 0x4c
    No size specified (using byte-data access)
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 00 00 00 20 c6 22 09 03 40 10 01 42 40 04 05 06    ... ?"??@??B@???
    10: 07 10 12 76 01 2e 60 0e 0c 00 f8 b1 df ef ff 00    ???v?.`??.????..
    20: 00 40 80 00 00 00 50 80 00 00 00 00 00 8c 80 a7    .@?...P?.....???
    30: 59 40 81 34 4b 84 00 00 00 0c be 38 38 08 10 00    Y@?4K?...??88??.
    40: b6 41 00 c0 10 21 00 2e ac 00 00 00 00 00 00 00    ?A.??!..?.......
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    70: 00 00 00 f0 00 0f 00 00 80 00 00 00 00 10 3c 00    ...?.?..?....?<.
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    

  • Dear all,

    we keep working on this and trying to find what's going on.

    This is BCLK and FSYNC while playing file_example_WAV_1MG

    Playing WAVE '/home/file_example_[ 4003.699680] tas2563 2-004c: tas2563_hw_params, format: 2
    WAV_1MG.wav' : Signed 16 bit Litt[ 4003.706977] tas2563 2-004c: tas2563_set_bitwidth 1379
    le Endian, Rate 8000 Hz, Stereo

    There we can see that both BCLK (blue) and FSYNC (red) are 8kHz.

    I have also prepared this other audio file in 16b and 48kHz just to check the scopes:

    Playing WAVE '/home/16b48k_PCM_16[ 4133.304210] tas2563 2-004c: tas2563_hw_params, format: 2
    [ 4133.311370] tas2563 2-004c: tas2563_set_bitwidth 1379
    bS_LE.wav' : Signed 16 bit Little[ 4133.317163] tas2563 2-004c: mnCh_size: 16
    Endian, Rate 48000 Hz, Stereo

    Now we can see that BCLK (blue) is 26.54kHz and FSYNC is 48kHz.

    I hope this can help understand what's going on.

    Thanks for the support!

  • BCK is abnormal. according to your setting, for 8kHz, the bit clk must be 0.256MHz; For 16kHz, 0.5MHz; for 48kHz, 1.536MHz. One more thing, our chip did not support the bitclk lower than 940.8 kHz, so 8kHz is not supported.

  • Thanks for the hint, I have checked again and (maybe we were wrong with the first scope) now it is 256kHz BCLK and 8kHz FSYNC

  • Dear Mr. MIng.

    We have change the DTS to this configuration:

    &sai3 {
    	#sound-dai-cells = <0>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&pinctrl_sai3>;
    	assigned-clocks = <&clk IMX8MN_CLK_SAI3>;
    	assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
    	assigned-clock-rates = <12288000>; //12288000 //8192000
    	clocks = <&clk IMX8MN_CLK_SAI3_IPG>, <&clk IMX8MN_CLK_DUMMY>,
    		 <&clk IMX8MN_CLK_SAI3_ROOT>, <&clk IMX8MN_CLK_DUMMY>,
    		 <&clk IMX8MN_CLK_DUMMY>, 
    		<&clk IMX8MN_AUDIO_PLL1_OUT>, 
    		<&clk IMX8MN_AUDIO_PLL2_OUT>;
    	clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
        fsl,sai-asynchronous;
    	status = "okay";
    };

    With this configuration we get the following while playing:

    root@tv100:~# aplay -Dplughw:0,0 /home/16b48k_PCM_16bS_LE.wav
    Playing WAVE '/home/16b48k_PCM_16[   92.367594] tas2563 2-004c: tas2563_hw_params, format: 2
    bS_LE.wav' : Signed 16 bit Little[   92.374785] tas2563 2-004c: tas2563_set_bitwidth 1379
     Endian, Rate 48000 Hz, Stereo
    [   92.383348] tas2563 2-004c: tas2563_set_slot, slot_width:16
    [   92.391675] tas2563 2-004c: mnCh_size: 16
    [   92.395718] tas2563 2-004c: blr_clk_ratio: 32
    [   92.401303] tas2563 2-004c: tas2563_hw_params, sample rate: 48000
    [   92.409367] tas2563 2-004c: SND_SOC_DAPM_POST_PMU
    [   92.414450] tas2563 2-004c: tas2563_mute
    [   92.418402] tas2563 2-004c: unmute: tas2563_mute
    [   92.423181] tas2563 2-004c: set power state: 0
    [   92.427673] tas2563 2-004c: tas2563_set_power_state, state: 0, mbPowerup 0
    [   92.434692] tas2563 2-004c: tas2563_load_calibration:
    [   92.440585] tas2563 2-004c: TAS2563 calibration file = /mnt/vendor/persist/audio/tas2563_cal.bin
    [   92.449459] tas2563 2-004c: f is not null
    [   92.453919] tas2563 2-004c: nSize = 440
    [   92.457888] tas2563 2-004c: nSize = 440
    [   92.461764] tas2563 2-004c: TAS2563 calibration file size = 440
    [   92.467762] tas2563 2-004c: firmware size: 440
    [   92.472280] tas2563 2-004c: FW timestamp: 1552463249
    [   92.477322] tas2563 2-004c: FW Size       = 440
    [   92.481938] tas2563 2-004c: Checksum      = 0x0000
    [   92.486806] tas2563 2-004c: PPC Version   = 0x0000
    [   92.491677] tas2563 2-004c: FW  Version    = 0x0000
    [   92.496623] tas2563 2-004c: Driver Version= 0x0100
    [   92.501487] tas2563 2-004c: Timestamp     = 1552463249
    [   92.506696] tas2563 2-004c: DDC Name      = Calibration Data File
    [   92.512856] tas2563 2-004c: Description   = Calibration Data File for TAS2563 Mono
    [   92.520509] tas2563 2-004c: header size: 139, line: 1068
    [   92.525897] tas2563 2-004c: program size: 2, line: 1084
    [   92.531195] tas2563 2-004c: config size: 2, line: 1091
    [   92.536435] tas2563 2-004c: fw_parse_data, 882
    [   92.540948] tas2563 2-004c: fw_parse_block_data, 842
    [   92.545996] tas2563 2-004c: fw_parse_block_data, 846
    [   92.551057] tas2563 2-004c: fw_parse_block_data, 871
    [   92.556103] tas2563 2-004c: calib size: 297, line: 1099
    [   92.561433] tas2563 2-004c: TAS2563 calibration: 1 calibrations
    [   92.570240] tas2563 2-004c: IRQ reg is: 0, 1219
    [   92.675570] tas2563 2-004c: irq_work_routine
    [   92.682602] tas2563 2-004c: IRQ status : 0x0, 0x0
    [   92.688188] tas2563 2-004c: IRQ reg is: irq_work_routine 0, 414
    [   92.695138] tas2563 2-004c: IRQ reg is: irq_work_routine, 0, 427
    [   92.701218] tas2563 2-004c: set ICN to -90dB
    [   92.706807] tas2563 2-004c: IRQ reg is: 2, 435
    [   92.711335] tas2563 2-004c: set ICN delay
    [   92.716786] tas2563 2-004c: IRQ reg is: 2, 441
    [   92.748242] tas2563 2-004c: IRQ reg is: irq_work_routine 2, 414
    [   92.755434] tas2563 2-004c: IRQ reg is: irq_work_routine, 2, 427
    [   92.761655] tas2563 2-004c: set ICN to -90dB
    [   92.767343] tas2563 2-004c: IRQ reg is: 2, 435
    [   92.771844] tas2563 2-004c: set ICN delay
    [   92.777202] tas2563 2-004c: IRQ reg is: 2, 441
    [   92.781706] tas2563 2-004c: irq_work_routine, Critical ERROR REG[0x2] = 0x2
    [   92.788771] tas2563 2-004c: device powered up, power down to load program 0 (Tuning Mode)
    [   92.797044] tas2563 2-004c: set power state: 2
    [   92.801643] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 1
    [   92.847580] tas2563 2-004c: load program 0 (Tuning Mode)
    [   92.852924] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [   92.863479] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [   93.553515] tas2563 2-004c: Block PChkSum: FW = 0xcc, Reg = 0xcc
    [   93.559626] tas2563 2-004c: Block[0x1] PChkSum match
    [   93.564634] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [   93.574411] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [   93.582278] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [   93.588856] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [   93.598653] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [   93.606528] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [   93.678287] tas2563 2-004c: Block PChkSum: FW = 0x46, Reg = 0x46
    [   93.684332] tas2563 2-004c: Block[0x3] PChkSum match
    [   93.689336] tas2563 2-004c: tas2563_load_default, 1500, ret = 0
    [   93.695323] tas2563 2-004c: tas2563_set_slot, slot_width:16
    [   93.701651] tas2563 2-004c: tas2563_load_default, 1505, ret = 0
    [   93.708004] tas2563 2-004c: INV format: NBNF
    [   93.713221] tas2563 2-004c: tas2563_load_default, 1521, ret = 0
    [   93.719204] tas2563 2-004c: tas2563_set_bitwidth 1379
    [   93.724989] tas2563 2-004c: mnCh_size: 16
    [   93.729058] tas2563 2-004c: tas2563_load_default, 1526, ret = 0
    [   93.738691] tas2563 2-004c: tas2563_load_default, 1547, ret = 0
    [  152.650472] tas2563 2-004c: tas2563_mute
    [  152.654457] tas2563 2-004c: mute: tas2563_mute
    [  152.659041] tas2563 2-004c: set power state: 2
    [  152.663664] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 0
    [  152.671306] tas2563 2-004c: SND_SOC_DAPM_PRE_PMD
    

    And the signals are:

    Where BCLK = 3.072MHz and FSYNC = 48kHz --> BCLK/FSYNC = 64

    I have checked the B0P0R0x11:

    root@tv100:~# i2cset -f -y 2 0x4c 0x00 0
    root@tv100:~# i2cset -f -y 2 0x4c 0x7f 0
    root@tv100:~# i2cset -f -y 2 0x4c 0x00 0
    root@tv100:~# i2cget -f -y 2 0x4c 0x11
    0x24

    Based on the Datasheet:

    0x24 --> 0010 0100

    FS_RATIO[3:0] = b6-3 = 0100 = 04h = 64

    FS_RATE[2:0] = b2-b0 = 100 = 44.1/48kHz

    So we believe that the signal is now correct.

    The only difference is that when starting to play we can now hear a soft criping noise, but we can't hear anything else.

    We have also tried to set 0x30 to 0x99 with identical result.

    Thanks!!

  • Dear Mr. Ming and Mr. Salazar,

    We keep working on the same issue with little or no progress.

    Would it be possible to get some more help on this topic?

    Kind regards.

  • Would you so kind measure the two signals at the same time? One is Fysnc pin, and the other is Din pin. Pls measure them in the same plot.

    One more thing, Let's bypass the algo when hearing a soft criping noise. I want to check whether the root cause is the algo.

    i2cset -f -y 2 0x4c 0x00 0
    i2cset -f -y 2 0x4c 0x7f 0
    i2cset -f -y 2 0x4c 0x00 1
    i2cset -f -y 2 0x4c 0x02 2

  • Dear Mr. Ding,

    I will try to give again a full view of the issue as we have been making several tests during these days and maybe something is different.

    We are currently testing with 2 different binary files that we have made with PurePath, one in Tuning Mode and another one in ROM Mode, just to see if there is any difference.

    PowerPath in Tuning Mode

    These are the files generated with PurePath, we are using the BINARY file as tas2563_uCDSP.bin and storing it at /lib/firmware.

    TV100_t1.zip

    Linux Driver

    This is the result of launching the kernel driver:

    root@tv100:~# insmod /lib/modules/5.10.9-1.0.0+gf001713/kernel/sound/soc/codecs/tas2563-a/snd-soc-tas2563.ko
    [   77.050555] snd_soc_tas2563: no symbol version for module_layout
    [   77.056625] snd_soc_tas2563: loading out-of-tree module taints kernel.
    [   77.065383] tas2563 2-004c: Driver ID: 1.0.0
    [   77.069705] tas2563 2-004c: tas2563_i2c_probe enter
    [   77.120043] tas2563 2-004c: PGID: 16
    [   77.123754] tas2563 2-004c: tas2563_register_codec, enter
    [   77.129408] tas2563 2-004c: tas2563_register_misc, leave
    [   77.134837] tas2563 2-004c: tiload_driver_init
    [   77.139418] tas2563 2-004c: allocated Major Number: 509
    [   77.144931] tas2563 2-004c: Registered TiLoad driver, Major number: 509
    [   77.153660] tas2563 2-004c: tas2563_codec_probe
    [   77.160017] tas2563 2-004c: tas2563_fw_ready:
    [   77.164420] tas2563 2-004c: firmware size: 20389
    [   77.169114] debugfs: Directory '30030000.sai' with parent 'mx8-tas2563' already present!
    [   77.177289] tas2563 2-004c: tas2563_set_dai_fmt, format=0x4301
    [   77.183201] tas2563 2-004c: FW timestamp: 1631628490
    [   77.188330] tas2563 2-004c: FW Size       = 20389
    [   77.193084] tas2563 2-004c: Checksum      = 0xFC1B33F2
    [   77.198264] tas2563 2-004c: PPC Version   = 0x2C000
    [   77.203191] tas2563 2-004c: FW  Version    = 0x1010000
    [   77.208389] tas2563 2-004c: Driver Version= 0x0202
    [   77.213232] tas2563 2-004c: Timestamp     = 1631628490
    [   77.218423] tas2563 2-004c: DDC Name      = TV100_t1
    [   77.223407] tas2563 2-004c: Description   = TI SmartAmp
    [   77.228704] tas2563 2-004c: header size: 112, line: 1068
    [   77.234078] tas2563 2-004c: FW i2sMode: 0
    [   77.238140] tas2563 2-004c: fw_parse_data, 882
    [   77.242623] tas2563 2-004c: fw_parse_block_data, 842
    [   77.247615] tas2563 2-004c: fw_parse_block_data, 846
    [   77.252640] tas2563 2-004c: fw_parse_block_data, 871
    [   77.257660] tas2563 2-004c: program data number: 16272
    [   77.262839] tas2563 2-004c: program size: 16363, line: 1084
    [   77.268461] tas2563 2-004c: configuration, mnProgram: 0
    [   77.273707] tas2563 2-004c: configuration samplerate: 48000
    [   77.279332] tas2563 2-004c: Fs rate: 0
    [   77.283118] tas2563 2-004c: fw_parse_data, 882
    [   77.287614] tas2563 2-004c: fw_parse_block_data, 842
    [   77.292687] tas2563 2-004c: fw_parse_block_data, 846
    [   77.297699] tas2563 2-004c: fw_parse_block_data, 871
    [   77.302686] tas2563 2-004c: fw_parse_block_data, 842
    [   77.307705] tas2563 2-004c: fw_parse_block_data, 846
    [   77.312715] tas2563 2-004c: fw_parse_block_data, 871
    [   77.317716] tas2563 2-004c: configuration, mnProgram: 0
    [   77.322993] tas2563 2-004c: configuration samplerate: 48000
    [   77.328628] tas2563 2-004c: Fs rate: 0
    [   77.332450] tas2563 2-004c: fw_parse_data, 882
    [   77.336945] tas2563 2-004c: fw_parse_block_data, 842
    [   77.341967] tas2563 2-004c: fw_parse_block_data, 846
    [   77.347343] tas2563 2-004c: fw_parse_block_data, 871
    [   77.352406] tas2563 2-004c: fw_parse_block_data, 842
    [   77.357451] tas2563 2-004c: fw_parse_block_data, 846
    [   77.362488] tas2563 2-004c: fw_parse_block_data, 871
    [   77.367566] tas2563 2-004c: config size: 3914, line: 1091
    [   77.373030] tas2563 2-004c: calib size: 0, line: 1099
    [   77.378141] tas2563 2-004c: find default configuration 0
    [   77.419598] tas2563 2-004c: load program 0 (Tuning Mode)
    [   77.424946] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [   77.433510] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [   78.005174] tas2563 2-004c: Block PChkSum: FW = 0x48, Reg = 0x48
    [   78.011219] tas2563 2-004c: Block[0x1] PChkSum match
    [   78.016210] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [   78.025979] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [   78.033854] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [   78.040418] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [   78.050190] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [   78.058045] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [   78.125902] tas2563 2-004c: Block PChkSum: FW = 0x3, Reg = 0x3
    [   78.131763] tas2563 2-004c: Block[0x3] PChkSum match
    [   78.136784] tas2563 2-004c: tas2563_load_default, 1506, ret = 0
    [   78.142747] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   78.148262] tas2563 2-004c: tas2563_load_default, 1511, ret = 0
    [   78.154511] tas2563 2-004c: INV format: IBNF
    [   78.159743] tas2563 2-004c: tas2563_load_default, 1527, ret = 0
    [   78.165714] tas2563 2-004c: tas2563_set_bitwidth 1383
    [   78.170793] tas2563 2-004c: Not supported params format
    [   78.176065] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   78.181581] tas2563 2-004c: mnCh_size: 0
    [   78.185545] tas2563 2-004c: tas2563_load_default, 1532, ret = 0
    [   78.191504] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
    [   78.209643] tas2563 2-004c: tas2563_load_default, 1553, ret = 0
    [   78.215923] tas2563 2-004c: INV format: IBNF
    [   78.220929] asoc-simple-card sound: ASoC: no DMI vendor name!
    [   78.283307] tas2563 2-004c: tas2563_codec_read, reg: 0x3, value: 0x20
    [   78.290086] tas2563 2-004c: tas2563_codec_write, reg: 0x3, 0x24
    [   78.335602] tas2563 2-004c: load program 0 (Tuning Mode)
    [   78.340968] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [   78.349533] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [   78.955953] tas2563 2-004c: Block PChkSum: FW = 0x48, Reg = 0x48
    [   78.962008] tas2563 2-004c: Block[0x1] PChkSum match
    [   78.967015] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [   78.976805] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [   78.984674] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [   78.991236] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [   79.001003] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [   79.008857] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [   79.080013] tas2563 2-004c: Block PChkSum: FW = 0x3, Reg = 0x3
    [   79.085946] tas2563 2-004c: Block[0x3] PChkSum match
    [   79.090947] tas2563 2-004c: tas2563_load_default, 1506, ret = 0
    [   79.096897] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   79.102407] tas2563 2-004c: tas2563_load_default, 1511, ret = 0
    [   79.108660] tas2563 2-004c: INV format: IBNF
    [   79.113884] tas2563 2-004c: tas2563_load_default, 1527, ret = 0
    [   79.119857] tas2563 2-004c: tas2563_set_bitwidth 1383
    [   79.124949] tas2563 2-004c: Not supported params format
    [   79.130231] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   79.135757] tas2563 2-004c: mnCh_size: 0
    [   79.139714] tas2563 2-004c: tas2563_load_default, 1532, ret = 0
    [   79.145660] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
    [   79.162841] tas2563 2-004c: tas2563_load_default, 1553, ret = 0
    [   79.169193] tas2563 2-004c: tas2563_configuration_put = 0
    [   79.174648] tas2563 2-004c: tas2563_load_configuration: 0
    [   79.180081] tas2563 2-004c: Configuration 0 is already loaded
    [   79.185911] tas2563 2-004c: Calibration 0 doesn't exist
    [   79.248842] tas2563 2-004c: tas2563_codec_read, reg: 0x3, value: 0x20
    [   79.255671] tas2563 2-004c: tas2563_codec_write, reg: 0x3, 0x24
    [   79.303594] tas2563 2-004c: load program 0 (Tuning Mode)
    [   79.308979] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [   79.317533] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [   79.913740] tas2563 2-004c: Block PChkSum: FW = 0x48, Reg = 0x48
    [   79.919800] tas2563 2-004c: Block[0x1] PChkSum match
    [   79.924813] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [   79.934590] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [   79.942505] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [   79.949087] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [   79.958873] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [   79.966791] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [   80.036415] tas2563 2-004c: Block PChkSum: FW = 0x3, Reg = 0x3
    [   80.042300] tas2563 2-004c: Block[0x3] PChkSum match
    [   80.047350] tas2563 2-004c: tas2563_load_default, 1506, ret = 0
    [   80.053364] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   80.058897] tas2563 2-004c: tas2563_load_default, 1511, ret = 0
    [   80.065261] tas2563 2-004c: INV format: IBNF
    [   80.070514] tas2563 2-004c: tas2563_load_default, 1527, ret = 0
    [   80.076458] tas2563 2-004c: tas2563_set_bitwidth 1383
    [   80.081558] tas2563 2-004c: Not supported params format
    [   80.086916] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   80.092443] tas2563 2-004c: mnCh_size: 0
    [   80.096457] tas2563 2-004c: tas2563_load_default, 1532, ret = 0
    [   80.102452] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
    [   80.119636] tas2563 2-004c: tas2563_load_default, 1553, ret = 0
    [   80.126007] tas2563 2-004c: tas2563_configuration_put = 0
    [   80.131547] tas2563 2-004c: tas2563_load_configuration: 0
    [   80.136988] tas2563 2-004c: Configuration 0 is already loaded
    [   80.142881] tas2563 2-004c: Calibration 0 doesn't exist

    aPlay result

    This is the result of playing the song:

    root@tv100:~# aplay -Dplughw:0,0 /home/16b48k_PCM_16bS_LE.wav
    Playing WAVE '/home/16b48k_PCM_16[  100.097046] tas2563 2-004c: tas2563_hw_params, format: 2
    [  100.104649] tas2563 2-004c: tas2563_set_bitwidth 1383
    bS_LE.wav' : Signed 16 bit Little[  100.112223] tas2563 2-004c: tas2563_set_slot, slot_width:16
     Endian, Rate 48000 Hz, Stereo
    [  100.119155] tas2563 2-004c: mnCh_size: 16
    [  100.125575] tas2563 2-004c: blr_clk_ratio: 32
    [  100.130637] tas2563 2-004c: tas2563_hw_params, sample rate: 48000
    [  100.147160] tas2563 2-004c: SND_SOC_DAPM_POST_PMU
    [  100.152066] tas2563 2-004c: tas2563_mute
    [  100.156252] tas2563 2-004c: unmute: tas2563_mute
    [  100.160908] tas2563 2-004c: set power state: 0
    [  100.165484] tas2563 2-004c: tas2563_set_power_state, state: 0, mbPowerup 0
    [  100.172400] tas2563 2-004c: tas2563_load_calibration:
    [  100.180415] tas2563 2-004c: TAS2563 calibration file = /mnt/vendor/persist/audio/tas2563_cal.bin
    [  100.189222] tas2563 2-004c: f is not null
    [  100.193669] tas2563 2-004c: nSize = 440
    [  100.197557] tas2563 2-004c: nSize = 440
    [  100.201526] tas2563 2-004c: TAS2563 calibration file size = 440
    [  100.207482] tas2563 2-004c: firmware size: 440
    [  100.212053] tas2563 2-004c: FW timestamp: 1552463249
    [  100.217057] tas2563 2-004c: FW Size       = 440
    [  100.221661] tas2563 2-004c: Checksum      = 0x0000
    [  100.226531] tas2563 2-004c: PPC Version   = 0x0000
    [  100.231393] tas2563 2-004c: FW  Version    = 0x0000
    [  100.236341] tas2563 2-004c: Driver Version= 0x0100
    [  100.241208] tas2563 2-004c: Timestamp     = 1552463249
    [  100.246420] tas2563 2-004c: DDC Name      = Calibration Data File
    [  100.252531] tas2563 2-004c: Description   = Calibration Data File for TAS2563 Mono
    [  100.260150] tas2563 2-004c: header size: 139, line: 1068
    [  100.265527] tas2563 2-004c: program size: 2, line: 1084
    [  100.270832] tas2563 2-004c: config size: 2, line: 1091
    [  100.276047] tas2563 2-004c: fw_parse_data, 882
    [  100.280523] tas2563 2-004c: fw_parse_block_data, 842
    [  100.285570] tas2563 2-004c: fw_parse_block_data, 846
    [  100.290610] tas2563 2-004c: fw_parse_block_data, 871
    [  100.295648] tas2563 2-004c: calib size: 297, line: 1099
    [  100.300945] tas2563 2-004c: TAS2563 calibration: 1 calibrations
    [  100.308918] tas2563 2-004c: IRQ reg is: 0, 1219
    [  100.331603] tas2563 2-004c: irq_work_routine
    [  100.337190] tas2563 2-004c: IRQ status : 0x2, 0x0
    [  100.348587] tas2563 2-004c: device powered up, power down to load program 0 (Tuning Mode)
    [  100.356796] tas2563 2-004c: set power state: 2
    [  100.361275] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 1
    [  100.407611] tas2563 2-004c: load program 0 (Tuning Mode)
    [  100.412960] tas2563 2-004c: TAS2563 load data: TuningMode Program, Blocks = 1, Block Type = 1
    [  100.421566] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 4035
    [  101.077491] tas2563 2-004c: Block PChkSum: FW = 0x48, Reg = 0x48
    [  101.083634] tas2563 2-004c: Block[0x1] PChkSum match
    [  101.088819] tas2563 2-004c: load configuration configuration_Tuning Mode_48 KHz_s1_0 conefficient pre block
    [  101.098652] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 4
    [  101.106616] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [  101.113401] tas2563 2-004c: load new configuration: configuration_Tuning Mode_48 KHz_s1_0, coeff block data
    [  101.123194] tas2563 2-004c: TAS2563 load data: Snapshot 1, Blocks = 2, Block Type = 3
    [  101.131064] tas2563 2-004c: TAS2563 load block: Type = 3, commands = 432
    [  101.214223] tas2563 2-004c: Block PChkSum: FW = 0x3, Reg = 0x3
    [  101.220182] tas2563 2-004c: Block[0x3] PChkSum match
    [  101.225282] tas2563 2-004c: tas2563_load_default, 1506, ret = 0
    [  101.231248] tas2563 2-004c: tas2563_set_slot, slot_width:16
    [  101.237690] tas2563 2-004c: tas2563_load_default, 1511, ret = 0
    [  101.244087] tas2563 2-004c: INV format: IBNF
    [  101.249511] tas2563 2-004c: tas2563_load_default, 1527, ret = 0
    [  101.255504] tas2563 2-004c: tas2563_set_bitwidth 1383
    [  101.261282] tas2563 2-004c: mnCh_size: 16
    [  101.265348] tas2563 2-004c: tas2563_load_default, 1532, ret = 0
    [  101.282801] tas2563 2-004c: tas2563_load_default, 1553, ret = 0
    [  160.388675] tas2563 2-004c: tas2563_mute
    [  160.392651] tas2563 2-004c: mute: tas2563_mute
    [  160.397133] tas2563 2-004c: set power state: 2
    [  160.401667] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 0
    [  160.411557] tas2563 2-004c: SND_SOC_DAPM_PRE_PMD

    It seems to be raising a "Speaker over current" interrupt.

    Plots

    Here you can find the plots with the three signals, one is a detail of the edges for FSYNC and DIN.

    You can check that:

    SBCLK = 3.072 MHz

    FSYNC = 48kHz

    Bypass the algo

    We have tried the commands you propose with no result.

    We have tried to set the commands before aplay and during aplay.

    PowerPath in ROM Mode

    These are the files generated with PurePath, we are using the BINARY file as tas2563_uCDSP.bin and storing it at /lib/firmware.

    TV100_t2ROM.zip

    Linux Driver

    This is the result of launching the kernel driver:

    root@tv100:~# insmod /lib/modules/5.10.9-1.0.0+gf001713/kernel/sound/soc/codecs/tas2563-a/snd-soc-tas2563.ko
    [   33.566028] snd_soc_tas2563: no symbol version for module_layout
    [   33.572121] snd_soc_tas2563: loading out-of-tree module taints kernel.
    [   33.580417] tas2563 2-004c: Driver ID: 1.0.0
    [   33.584727] tas2563 2-004c: tas2563_i2c_probe enter
    [   33.637236] tas2563 2-004c: PGID: 16
    [   33.640923] tas2563 2-004c: tas2563_register_codec, enter
    [   33.646666] tas2563 2-004c: tas2563_register_misc, leave
    [   33.652056] tas2563 2-004c: tiload_driver_init
    [   33.656642] tas2563 2-004c: allocated Major Number: 509
    [   33.662319] tas2563 2-004c: Registered TiLoad driver, Major number: 509
    [   33.670735] tas2563 2-004c: tas2563_codec_probe
    [   33.675438] debugfs: Directory '30030000.sai' with parent 'mx8-tas2563' already present!
    root@tv100:~# [   33.683685] tas2563 2-004c: tas2563_fw_ready:
    [   33.689178] tas2563 2-004c: firmware size: 1266
    [   33.693740] tas2563 2-004c: FW timestamp: 1631633181
    [   33.698738] tas2563 2-004c: FW Size       = 1266
    [   33.703407] tas2563 2-004c: tas2563_set_dai_fmt, format=0x4301
    [   33.709286] tas2563 2-004c: Checksum      = 0xC3EFF920
    [   33.714456] tas2563 2-004c: PPC Version   = 0x2C000
    [   33.719372] tas2563 2-004c: FW  Version    = 0x1010000
    [   33.724545] tas2563 2-004c: Driver Version= 0x0202
    [   33.729369] tas2563 2-004c: Timestamp     = 1631633181
    [   33.734531] tas2563 2-004c: DDC Name      = TV100_t2ROM
    [   33.739790] tas2563 2-004c: Description   = TI SmartAmp
    [   33.745053] tas2563 2-004c: header size: 112, line: 1068
    [   33.750397] tas2563 2-004c: FW i2sMode: 0
    [   33.754440] tas2563 2-004c: fw_parse_data, 882
    [   33.758905] tas2563 2-004c: fw_parse_block_data, 842
    [   33.763918] tas2563 2-004c: fw_parse_block_data, 846
    [   33.768909] tas2563 2-004c: fw_parse_block_data, 871
    [   33.773903] tas2563 2-004c: program data number: 861
    [   33.778889] tas2563 2-004c: program size: 949, line: 1084
    [   33.784323] tas2563 2-004c: configuration, mnProgram: 0
    [   33.789567] tas2563 2-004c: configuration samplerate: 48000
    [   33.795167] tas2563 2-004c: Fs rate: 0
    [   33.798947] tas2563 2-004c: fw_parse_data, 882
    [   33.803431] tas2563 2-004c: fw_parse_block_data, 842
    [   33.808421] tas2563 2-004c: fw_parse_block_data, 846
    [   33.813416] tas2563 2-004c: fw_parse_block_data, 871
    [   33.818402] tas2563 2-004c: config size: 205, line: 1091
    [   33.823745] tas2563 2-004c: calib size: 0, line: 1099
    [   33.828847] tas2563 2-004c: find default configuration 0
    [   33.871667] tas2563 2-004c: load program 0 (ROM Mode)
    [   33.876743] tas2563 2-004c: TAS2563 load data: ROMMode Program, Blocks = 1, Block Type = 1
    [   33.885031] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 183
    [   33.924904] tas2563 2-004c: Block PChkSum: FW = 0x7a, Reg = 0x7a
    [   33.930951] tas2563 2-004c: Block[0x1] PChkSum match
    [   33.935967] tas2563 2-004c: load configuration configuration_ROM Mode_48 KHz_s0_0 conefficient pre block
    [   33.945487] tas2563 2-004c: TAS2563 load data: base_snapshot, Blocks = 1, Block Type = 4
    [   33.953626] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [   33.960189] tas2563 2-004c: load new configuration: configuration_ROM Mode_48 KHz_s0_0, coeff block data
    [   33.969698] tas2563 2-004c: TAS2563 load data: base_snapshot, Blocks = 1, Block Type = 3
    [   33.977816] tas2563 2-004c: tas2563_load_default, 1506, ret = 0
    [   33.983768] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   33.989282] tas2563 2-004c: tas2563_load_default, 1511, ret = 0
    [   33.996136] tas2563 2-004c: INV format: IBNF
    [   34.001718] tas2563 2-004c: tas2563_load_default, 1527, ret = 0
    [   34.007680] tas2563 2-004c: tas2563_set_bitwidth 1383
    [   34.012772] tas2563 2-004c: Not supported params format
    [   34.018020] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   34.023533] tas2563 2-004c: mnCh_size: 0
    [   34.027474] tas2563 2-004c: tas2563_load_default, 1532, ret = 0
    [   34.033415] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
    [   34.054346] tas2563 2-004c: tas2563_load_default, 1553, ret = 0
    [   34.060654] tas2563 2-004c: INV format: IBNF
    [   34.065677] asoc-simple-card sound: ASoC: no DMI vendor name!
    [   34.131132] tas2563 2-004c: tas2563_codec_read, reg: 0x3, value: 0x20
    [   34.179639] tas2563 2-004c: load program 0 (ROM Mode)
    [   34.184721] tas2563 2-004c: TAS2563 load data: ROMMode Program, Blocks = 1, Block Type = 1
    [   34.193092] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 183
    [   34.233928] tas2563 2-004c: Block PChkSum: FW = 0x7a, Reg = 0x7a
    [   34.239986] tas2563 2-004c: Block[0x1] PChkSum match
    [   34.244992] tas2563 2-004c: load configuration configuration_ROM Mode_48 KHz_s0_0 conefficient pre block
    [   34.254511] tas2563 2-004c: TAS2563 load data: base_snapshot, Blocks = 1, Block Type = 4
    [   34.262640] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [   34.269205] tas2563 2-004c: load new configuration: configuration_ROM Mode_48 KHz_s0_0, coeff block data
    [   34.278721] tas2563 2-004c: TAS2563 load data: base_snapshot, Blocks = 1, Block Type = 3
    [   34.286847] tas2563 2-004c: tas2563_load_default, 1506, ret = 0
    [   34.292794] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   34.298338] tas2563 2-004c: tas2563_load_default, 1511, ret = 0
    [   34.304608] tas2563 2-004c: INV format: IBNF
    [   34.309872] tas2563 2-004c: tas2563_load_default, 1527, ret = 0
    [   34.315839] tas2563 2-004c: tas2563_set_bitwidth 1383
    [   34.320923] tas2563 2-004c: Not supported params format
    [   34.326173] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   34.331722] tas2563 2-004c: mnCh_size: 0
    [   34.335678] tas2563 2-004c: tas2563_load_default, 1532, ret = 0
    [   34.341640] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
    [   34.358679] tas2563 2-004c: tas2563_load_default, 1553, ret = 0
    [   34.365009] tas2563 2-004c: tas2563_configuration_put = 0
    [   34.370474] tas2563 2-004c: tas2563_load_configuration: 0
    [   34.375937] tas2563 2-004c: Configuration 0 is already loaded
    [   34.381768] tas2563 2-004c: Calibration 0 doesn't exist
    [   34.445323] tas2563 2-004c: tas2563_codec_read, reg: 0x3, value: 0x20
    [   34.495661] tas2563 2-004c: load program 0 (ROM Mode)
    [   34.500740] tas2563 2-004c: TAS2563 load data: ROMMode Program, Blocks = 1, Block Type = 1
    [   34.509071] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 183
    [   34.549163] tas2563 2-004c: Block PChkSum: FW = 0x7a, Reg = 0x7a
    [   34.555223] tas2563 2-004c: Block[0x1] PChkSum match
    [   34.560246] tas2563 2-004c: load configuration configuration_ROM Mode_48 KHz_s0_0 conefficient pre block
    [   34.569817] tas2563 2-004c: TAS2563 load data: base_snapshot, Blocks = 1, Block Type = 4
    [   34.577984] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [   34.584599] tas2563 2-004c: load new configuration: configuration_ROM Mode_48 KHz_s0_0, coeff block data
    [   34.594166] tas2563 2-004c: TAS2563 load data: base_snapshot, Blocks = 1, Block Type = 3
    [   34.602372] tas2563 2-004c: tas2563_load_default, 1506, ret = 0
    [   34.608368] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   34.613928] tas2563 2-004c: tas2563_load_default, 1511, ret = 0
    [   34.620229] tas2563 2-004c: INV format: IBNF
    [   34.625444] tas2563 2-004c: tas2563_load_default, 1527, ret = 0
    [   34.631478] tas2563 2-004c: tas2563_set_bitwidth 1383
    [   34.636605] tas2563 2-004c: Not supported params format
    [   34.641926] tas2563 2-004c: tas2563_set_slot, slot_width:0
    [   34.647464] tas2563 2-004c: mnCh_size: 0
    [   34.651424] tas2563 2-004c: tas2563_load_default, 1532, ret = 0
    [   34.657393] tas2563 2-004c: tas2563_set_samplerate, unsupported sample rate, 0
    [   34.674515] tas2563 2-004c: tas2563_load_default, 1553, ret = 0
    [   34.680913] tas2563 2-004c: tas2563_configuration_put = 0
    [   34.686437] tas2563 2-004c: tas2563_load_configuration: 0
    [   34.691899] tas2563 2-004c: Configuration 0 is already loaded
    [   34.697764] tas2563 2-004c: Calibration 0 doesn't exist
    

    aPlay result

    This is the result of playing the song:

    root@tv100:~# aplay -Dplughw:0,0 /home/16b48k_PCM_16bS_LE.wav &
    [1] 1051
    root@tv100:~# Playing WAVE '/home/16b48k_PCM_16[   39.594514] tas2563 2-004c: tas2563_hw_params, format: 2
    bS_LE.wav' : Signed 16 bit Little[   39.601760] tas2563 2-004c: tas2563_set_bitwidth 1383
     Endian, Rate 48000 Hz, Stereo
    [   39.610361] tas2563 2-004c: tas2563_set_slot, slot_width:16
    [   39.618866] tas2563 2-004c: mnCh_size: 16
    [   39.622930] tas2563 2-004c: blr_clk_ratio: 32
    [   39.628020] tas2563 2-004c: tas2563_hw_params, sample rate: 48000
    [   39.644833] tas2563 2-004c: SND_SOC_DAPM_POST_PMU
    [   39.649634] tas2563 2-004c: tas2563_mute
    [   39.653597] tas2563 2-004c: unmute: tas2563_mute
    [   39.658253] tas2563 2-004c: set power state: 0
    [   39.662722] tas2563 2-004c: tas2563_set_power_state, state: 0, mbPowerup 0
    [   39.669628] tas2563 2-004c: tas2563_load_calibration:
    [   39.676538] tas2563 2-004c: TAS2563 calibration file = /mnt/vendor/persist/audio/tas2563_cal.bin
    [   39.685374] tas2563 2-004c: f is not null
    [   39.689744] tas2563 2-004c: nSize = 440
    [   39.693629] tas2563 2-004c: nSize = 440
    [   39.697498] tas2563 2-004c: TAS2563 calibration file size = 440
    [   39.703446] tas2563 2-004c: firmware size: 440
    [   39.707914] tas2563 2-004c: FW timestamp: 1552463249
    [   39.712915] tas2563 2-004c: FW Size       = 440
    [   39.717468] tas2563 2-004c: Checksum      = 0x0000
    [   39.722282] tas2563 2-004c: PPC Version   = 0x0000
    [   39.727093] tas2563 2-004c: FW  Version    = 0x0000
    [   39.731999] tas2563 2-004c: Driver Version= 0x0100
    [   39.736812] tas2563 2-004c: Timestamp     = 1552463249
    [   39.742003] tas2563 2-004c: DDC Name      = Calibration Data File
    [   39.748129] tas2563 2-004c: Description   = Calibration Data File for TAS2563 Mono
    [   39.755773] tas2563 2-004c: header size: 139, line: 1068
    [   39.761111] tas2563 2-004c: program size: 2, line: 1084
    [   39.766388] tas2563 2-004c: config size: 2, line: 1091
    [   39.771553] tas2563 2-004c: fw_parse_data, 882
    [   39.776031] tas2563 2-004c: fw_parse_block_data, 842
    [   39.781014] tas2563 2-004c: fw_parse_block_data, 846
    [   39.786003] tas2563 2-004c: fw_parse_block_data, 871
    [   39.791013] tas2563 2-004c: calib size: 297, line: 1099
    [   39.796291] tas2563 2-004c: TAS2563 calibration: 1 calibrations
    [   39.803803] tas2563 2-004c: IRQ reg is: 0, 1219
    [   39.823649] tas2563 2-004c: irq_work_routine
    [   39.829144] tas2563 2-004c: IRQ status : 0x2, 0x0
    [   39.848240] tas2563 2-004c: device powered up, power down to load program 0 (ROM Mode)
    [   39.856979] tas2563 2-004c: set power state: 2
    [   39.862252] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 1
    [   39.907689] tas2563 2-004c: load program 0 (ROM Mode)
    [   39.912774] tas2563 2-004c: TAS2563 load data: ROMMode Program, Blocks = 1, Block Type = 1
    [   39.921063] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 183
    [   39.961446] tas2563 2-004c: Block PChkSum: FW = 0x7a, Reg = 0x7a
    [   39.967497] tas2563 2-004c: Block[0x1] PChkSum match
    [   39.972486] tas2563 2-004c: load configuration configuration_ROM Mode_48 KHz_s0_0 conefficient pre block
    [   39.981996] tas2563 2-004c: TAS2563 load data: base_snapshot, Blocks = 1, Block Type = 4
    [   39.990109] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [   39.996666] tas2563 2-004c: load new configuration: configuration_ROM Mode_48 KHz_s0_0, coeff block data
    [   40.006209] tas2563 2-004c: TAS2563 load data: base_snapshot, Blocks = 1, Block Type = 3
    [   40.014341] tas2563 2-004c: tas2563_load_default, 1506, ret = 0
    [   40.020288] tas2563 2-004c: tas2563_set_slot, slot_width:16
    [   40.026496] tas2563 2-004c: tas2563_load_default, 1511, ret = 0
    [   40.032765] tas2563 2-004c: INV format: IBNF
    [   40.037998] tas2563 2-004c: tas2563_load_default, 1527, ret = 0
    [   40.043962] tas2563 2-004c: tas2563_set_bitwidth 1383
    [   40.049644] tas2563 2-004c: mnCh_size: 16
    [   40.053685] tas2563 2-004c: tas2563_load_default, 1532, ret = 0
    [   40.070466] tas2563 2-004c: tas2563_load_default, 1553, ret = 0
    [   99.883907] tas2563 2-004c: tas2563_mute
    [   99.887896] tas2563 2-004c: mute: tas2563_mute
    [   99.892395] tas2563 2-004c: set power state: 2
    [   99.896935] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 0
    [   99.904982] tas2563 2-004c: SND_SOC_DAPM_PRE_PMD
    
    [1]+  Done                    aplay -Dplughw:0,0 /home/16b48k_PCM_16bS_LE.wav
    

    It seems to be raising a "Speaker over current" interrupt, again.

    Plots

    There is no difference with the plots provided for Tuning Mode.

    Bypass the algo

    We have tried the commands you propose with no result.

    We have tried to set the commands before aplay and during aplay.

    Schematics

    As it seems that the driver is arising a Speaker Overcurrent protection interrupt, we have checked again the Schematics and measured the impedance in the speaker path.

    We have measured the impedance between AUDIO_AMP_OUT_P and _N while the board is powered off and no speaker is connected. We get around 175kOhm like in the tas2563 evaluation board.

    We have also measured the impedance when the speaker is connected in the TAS2563 pins and we can measure around 8Ohm, the speaker impedance.

    Thanks and kind regards.

  • Thanks for your detailed information and log.

    According to the waveform In the pltos, the fsync signal is abnormal, you can see its duty cycle is not 50%. Pls correct it. In I2S standard, duty cycle of the fsync clock must be 50%.

    I still found bit clk is 3.033 MHz. The perfect value should be 3.072 MHz. After the correction, don't forget dump the registers on Book0Page0.

    Then, I wonder whether the audio clip is mono, according to the plots?

  • Dear Mr. Ding.

    Dear Mr. Ding.

    We have made the FSYNC 50% duty cycle, but still we can't hear anything.

    FSYNC in 50% duty cycle

    In regards of the frequency of SBCLK, you see weird frequencies in the plot where we have room enough to see FSYNC, if we take a closer look to SBCLK to measure it you can check that it is exactly 3.072MHz:
    SBCLK in 3.072MHz

    Related to the audio file, it is a stereo song. I upload it here again:

    Download this file --> 

    Just in case, I have made the wav file mono, with identical result.

    Download this file --> 

    In the PowerPath, we have chosen the option to downmix both channels.

    --> Solt Select Config = Stereo downmix (L+R)/2

    I have measured also the plot on the Evaluation Board while playing the same song.

    You can check that the FSYNC is absolutely not 50% duty cycle and it is working. That is why we were not worried about the previous signal.

    Evaluation Board Plot

    Something you may have missed while running aPlay is the following:

    [ 8968.313937] tas2563 2-004c: SPK over current!

    root@tv100:~# aplay -Dplughw:0,0 /home/audio_files/16b_48kH_PCM16bS_LE.wav
    Playing WAVE '/home/audio_files/1[ 8968.215668] tas2563 2-004c: tas2563_hw_params, format: 2
    6b_48kH_PCM16bS_LE.wav' : Signed [ 8968.222919] tas2563 2-004c: tas2563_set_bitwidth 1383
    16 bit Little Endian, Rate 48000 [ 8968.231313] tas2563 2-004c: mnCh_size: 16
    Hz, Stereo
    [ 8968.237757] tas2563 2-004c: blr_clk_ratio: 32
    [ 8968.243873] tas2563 2-004c: tas2563_hw_params, sample rate: 48000
    [ 8968.250814] tas2563 2-004c: tas2563_set_samplerate, Ramp sample: 48000
    [ 8968.259606] tas2563 2-004c: SND_SOC_DAPM_POST_PMU
    [ 8968.264639] tas2563 2-004c: tas2563_mute
    [ 8968.268620] tas2563 2-004c: unmute: tas2563_mute
    [ 8968.273377] tas2563 2-004c: set power state: 0
    [ 8968.277975] tas2563 2-004c: tas2563_set_power_state, state: 0, mbPowerup 0
    [ 8968.286751] tas2563 2-004c: IRQ reg is: 0, 1219
    [ 8968.303566] tas2563 2-004c: irq_work_routine
    [ 8968.309076] tas2563 2-004c: IRQ status : 0x2, 0x0
    [ 8968.313937] tas2563 2-004c: SPK over current!
    [ 8968.320625] tas2563 2-004c: device powered up, power down to load program 0 (ROM Mode)
    [ 8968.328587] tas2563 2-004c: set power state: 2
    [ 8968.333187] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 1
    [ 8968.379589] tas2563 2-004c: load program 0 (ROM Mode)
    [ 8968.384669] tas2563 2-004c: TAS2563 load data: ROMMode Program, Blocks = 1, Block Type = 1
    [ 8968.393199] tas2563 2-004c: TAS2563 load block: Type = 1, commands = 183
    [ 8968.446860] tas2563 2-004c: Block PChkSum: FW = 0x7a, Reg = 0x7a
    [ 8968.452924] tas2563 2-004c: Block[0x1] PChkSum match
    [ 8968.457950] tas2563 2-004c: load configuration configuration_ROM Mode_48 KHz_s0_0 conefficient pre block
    [ 8968.467561] tas2563 2-004c: TAS2563 load data: base_snapshot, Blocks = 1, Block Type = 4
    [ 8968.475686] tas2563 2-004c: TAS2563 load block: Type = 4, commands = 0
    [ 8968.482266] tas2563 2-004c: load new configuration: configuration_ROM Mode_48 KHz_s0_0, coeff block data
    [ 8968.491945] tas2563 2-004c: TAS2563 load data: base_snapshot, Blocks = 1, Block Type = 3
    [ 8968.500078] tas2563 2-004c: tas2563_load_default, 1506, ret = 0
    [ 8968.506055] tas2563 2-004c: tas2563_set_slot, slot_width:16
    [ 8968.512573] tas2563 2-004c: tas2563_load_default, 1511, ret = 0
    [ 8968.518944] tas2563 2-004c: INV format: IBNF
    [ 8968.524286] tas2563 2-004c: tas2563_load_default, 1527, ret = 0
    [ 8968.530384] tas2563 2-004c: tas2563_set_bitwidth 1383
    [ 8968.536214] tas2563 2-004c: mnCh_size: 16
    [ 8968.540250] tas2563 2-004c: tas2563_load_default, 1532, ret = 0
    [ 8968.546986] tas2563 2-004c: tas2563_set_samplerate, Ramp sample: 48000
    [ 8968.558295] tas2563 2-004c: tas2563_load_default, 1553, ret = 0
    [ 9028.365610] tas2563 2-004c: tas2563_mute
    [ 9028.369566] tas2563 2-004c: mute: tas2563_mute
    [ 9028.374044] tas2563 2-004c: set power state: 2
    [ 9028.378584] tas2563 2-004c: tas2563_set_power_state, state: 2, mbPowerup 0
    [ 9028.386988] tas2563 2-004c: SND_SOC_DAPM_PRE_PMD
    

    Thanks for your support Shenghao Ding!

  • Sorry, I forgot to include I2C dump:

    No size specified (using byte-data access)
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 00 00 0e 20 f6 22 09 03 40 10 13 02 00 04 05 06    ..? ?"??@???.???
    10: 07 24 12 76 00 2e 60 0e 0c 00 f8 a6 df ff ff 00    ?$?v..`??.???...
    20: 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00    .........@......
    30: 59 40 81 34 49 84 08 00 00 0c be 38 38 08 10 00    Y@?4I??..??88??.
    40: ae 41 00 c0 10 21 00 00 2c 00 00 00 00 00 00 00    ?A.??!..,.......
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    70: 00 00 00 f0 00 0f 00 00 80 00 00 00 00 10 8c 00    ...?.?..?....??.
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    

  • The register dump show that the chip is power off, see B0P0R2=0x0e

  • Kindly dump the register during playback

  • Check whether speaker connection is short circuit. You can use a  8 ohm resistor instead of speaker to check this issue still occurred.

  • Dear Mr. Ming and Mr. Salazar,
    we have removed capacitors C83, C317 and C84 from the board (see schematics above) and after that the driver doesn't report "SPK over current!".

    We have tried to play a sound using the driver from Linux mainline (https://github.com/torvalds/linux/blob/master/sound/soc/codecs/tas2562.c) and using the Android one having the same behaviour: we can play sounds using the ROM binary but we are experiencing some troubles using the "Tuning Mode" binary.
    We are working on it and will open a new post if we continue with this new problem, but we think this post can now be marked as solved.

    Thanks for the help.

    Best regards.
    Gustavo