is not works for kernel 4.19.
Audio drivers is changed to the path vendor/" "/opensource/audio-kernel as a module
Please share the platform drivers to support for above path for "TAS2563YBGR"
Thank
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.
is not works for kernel 4.19.
Audio drivers is changed to the path vendor/" "/opensource/audio-kernel as a module
Please share the platform drivers to support for above path for "TAS2563YBGR"
Thank
Hi, Raghu,
Our team will take a look at this and provide some information in case we have an available driver for this device.
Best regards,
Luis Fernando Rodríguez S.
Hi Luis,
Thanks for the response.
Please note some of the API's are also changed related to codec registration.
also we need to register as platform driver. shared drivers are registering as i2c drivers.
Thanks.
Hi Raghu,
Let me get in contact with our SW team to address this question.
Best regards,
-Ivan Salazar
Applications Engineer - Low Power Audio & Actuators
Hi
Would you be so kind and tell me which platform you have used?
As to support 4.19
you can use following to code
#if KERNEL_VERSION(4, 19, 0) <= LINUX_VERSION_CODE
struct snd_soc_component *codec = snd_soc_dapm_to_component(w->dapm);
struct tas256x_priv *p_tas256x = snd_soc_component_get_drvdata(codec);
#else
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
struct tas256x_priv *p_tas256x = snd_soc_codec_get_drvdata(codec);
#endif
#if KERNEL_VERSION(4, 19, 0) <= LINUX_VERSION_CODE
static struct snd_soc_component_driver soc_codec_driver_tas256x = {
.probe = tas256x_codec_probe,
.remove = tas256x_codec_remove,
.read = tas256x_codec_read,
.write = tas256x_codec_write,
#if IS_ENABLED(CODEC_PM)
.suspend = tas256x_codec_suspend,
.resume = tas256x_codec_resume,
#endif
.controls = tas256x_snd_controls_mono,
.num_controls = ARRAY_SIZE(tas256x_snd_controls_mono),
.dapm_widgets = tas256x_dapm_widgets_mono,
.num_dapm_widgets = ARRAY_SIZE(tas256x_dapm_widgets_mono),
.dapm_routes = tas256x_audio_map_mono,
.num_dapm_routes = ARRAY_SIZE(tas256x_audio_map_mono),
};
#else
static struct snd_soc_codec_driver soc_codec_driver_tas256x = {
.probe = tas256x_codec_probe,
.remove = tas256x_codec_remove,
.read = tas256x_codec_read,
.write = tas256x_codec_write,
#if IS_ENABLED(CODEC_PM)
.suspend = tas256x_codec_suspend,
.resume = tas256x_codec_resume,
#endif
.component_driver = {
.controls = tas256x_snd_controls_mono,
.num_controls = ARRAY_SIZE(tas256x_snd_controls_mono),
.dapm_widgets = tas256x_dapm_widgets_mono,
.num_dapm_widgets = ARRAY_SIZE(tas256x_dapm_widgets_mono),
.dapm_routes = tas256x_audio_map_mono,
.num_dapm_routes = ARRAY_SIZE(tas256x_audio_map_mono),
},
};
#endif
#if KERNEL_VERSION(4, 19, 0) <= LINUX_VERSION_CODE
static int tas256x_codec_probe(struct snd_soc_component *codec)
{
}
#else
static int tas256x_codec_probe(struct snd_soc_codec *codec)
{
}
#endif
As to how to compile the module is as follow:
create folder tas2563 into ../sound/soc/codec
Add "source "sound/soc/codecs/tas2563/Kconfig" into "../sound/soc/codec/Kconfig"
Add "obj-$(CONFIG_SND_SOC_TAS2563) += tas2563/" at the end of "../sound/soc/codec/Makefile"
Pls config following compile variable in xxxx_defconfig file, or tas2563 driver can't be compiled properly.
For example,
CONFIG_SND_SOC_TAS2563=m
CONFIG_TAS2563_REGMAP=y
CONFIG_TAS2563_CODEC=y
CONFIG_TAS2563_MISC=y
Some debug commands:
1)lsmod -- display the modules
2)modprobe tas2563 -- load tas2563 module
Hi
which platform you have used?
--> we are using Qualcomm platform(QCS4290).
I was able to build as module and loaded at boot-time. find the shared logs below
we are using mono-speaker.
--------------------------------------------------------------------
[ 24.322967] tas2563 1-004c: Driver ID: 1.0.0
[ 24.327267] tas2563 1-004c: tas2563_i2c_probe enter
[ 24.332830] tas2563 1-004c: ti,channels=2
[ 24.332841] tas2563 1-004c: ti,left-channel=0x4c
-------------------------------------------------------------------
can you share tas2563_uCDSP.bin and tas2563_cal.bin
tas2563_uCDSP.bin anyway we need to copy to some firmware folder.
but how to use tas2563_cal.bin ?
Thanks
Hi Raghu,
We'll review your details above and provide some further information within the next day.
Best regards,
-Ivan Salazar
Applications Engineer - Low Power Audio & Actuators
Hi Raghu,
_cal.bin file is used during FTC, are you running this as well?
For _uCDSP.bin you should use the binary file you get from PPC3 End System Integration, this is based on your speaker characterization and tuning.
Best regards,
-Ivan Salazar
Applications Engineer - Low Power Audio & Actuators
Hi Ivan Salazar,
we are seeing below errors with ti drivers
[ 26.428145] tas2563 0-004c: tas2563_change_book_page, ERROR, L=196, E=-2
[ 26.434873] tas2563 0-004c: tas2563_set_program() : finish
[ 26.440746] i2c_geni 4a84000.i2c: i2c error :-107
[ 26.468395] i2c_geni 4a84000.i2c: i2c error :-107
[ 26.498336] i2c_geni 4a84000.i2c: i2c error :-107
[ 26.528131] tas2563 0-004c: tas2563_change_book_page, ERROR, L=196, E=-2
[ 26.535082] i2c_geni 4a84000.i2c: i2c error :-107
[ 26.568376] i2c_geni 4a84000.i2c: i2c error :-107
[ 26.598355] i2c_geni 4a84000.i2c: i2c error :-107
[ 26.628124] tas2563 0-004c: tas2563_change_book_page, ERROR, L=196, E=-2
Firmware info we seen as below.
[ 25.845868] tas2563 0-004c: tas2563_fw_ready: start
[ 25.850834] tas2563 0-004c: firmware size: 28943
[ 25.855478] tas2563 0-004c: FW timestamp: 1551323635
[ 25.860499] tas2563 0-004c: FW Size = 28943
[ 25.865225] tas2563 0-004c: Checksum = 0xF5AE7FEB
[ 25.870410] tas2563 0-004c: PPC Version = 0x8400
[ 25.875221] tas2563 0-004c: FW Version = 0x1010000
[ 25.880400] tas2563 0-004c: Driver Version= 0x0202
[ 25.885208] tas2563 0-004c: Timestamp = 1551323635
[ 25.890384] tas2563 0-004c: DDC Name = F7B_20190228
[ 25.895719] tas2563 0-004c: Description = TI SmartAmp
[ 25.901006] tas2563 0-004c: header size: 112, line: 1192
Please refer attached logs for full info.
I found too many I2C error in the log. Pls check whether the i2c bus work well? I wonder whether other I2C chips not tas2563 can work well?
Dear customer,
Would you be so kind and check the hardware connection first? Most of our customers make a mistake for SCL and SDA pin, which usually cause I2C communication abnormal.
You can still use following command to check hardware connection.
i2cdetect -y 0
If there’s no UU in the red circle, pls check the hardware. Thanks.
Hi, Shenghao,
We have fixed the i2c transfer issues, now we have enabled I2C data/clks from CPU, but there is no output from tas2563, could you please help check the registers and help find out the reason:
LEFT_AMP : 00_Device_Page <#00>= 0x00
LEFT_AMP : 01_SW_Reset <#01>= 0x00
LEFT_AMP : 02_Power_Control <#02>= 0x0E
LEFT_AMP : 03_Playback_Config <#03>= 0x20
LEFT_AMP : 04_MISC_Config_1 <#04>= 0xC6
LEFT_AMP : 05_MISC_Config_2 <#06>= 0x19
LEFT_AMP : 06_TDM_Config_1 <#06>= 0x19
LEFT_AMP : 07_TDM2 <#07>= 0x02
LEFT_AMP : 08_TDM3 <#08>= 0x7A
LEFT_AMP : 09_TDM4 <#09>= 0x10
LEFT_AMP : 0a_TDM5 <#10>= 0x13
LEFT_AMP : 0b_TDM6 <#11>= 0x00
LEFT_AMP : 0c_TDM7 <#12>= 0x00
LEFT_AMP : 0d_TDM8 <#13>= 0x04
LEFT_AMP : 0e_TDM9 <#14>= 0x05
LEFT_AMP : 0f_TDM10 <#15>= 0x06
LEFT_AMP : 10_TDM_Colok_Detection_Monitor <#16>= 0x07
LEFT_AMP : 3e_NoiseGate_Control <#62>= 0x10
LEFT_AMP : 5c__page2_NoiseGate_CH_Threshold_1 <#348>= 0x00
LEFT_AMP : 5d_page2_NoiseGate_CH_Threshold_2 <#349>= 0x01
LEFT_AMP : 5e_page2_NoiseGate_CH_Threshold_3 <#350>= 0x09
LEFT_AMP : 5f_page2_NoiseGate_CH_Threshold_4 <#351>= 0x45
LEFT_AMP : 64_page2_NoiseGate_Timer_1 <#356>= 0x00
LEFT_AMP : 65_page2_NoiseGate_Timer_2 <#357>= 0x00
LEFT_AMP : 66_page2_NoiseGate_Timer_3 <#358>= 0x4B
LEFT_AMP : 67_page2_NoiseGate_Timer_4 <#359>= 0x00
LEFT_AMP : 0c_page2_DVC_PCM_1 <#268>= 0x40
LEFT_AMP : 0d_page2_DVC_PCM_2 <#269>= 0x00
LEFT_AMP : 0e_page2_DVC_PCM_3 <#270>= 0x00
LEFT_AMP : 0f_page2_DVC_PCM_4 <#271>= 0x00
Right_AMP : 00_Device_Page <#00>= 0x00
Right_AMP : 01_SW_Reset <#01>= 0x00
Right_AMP : 02_Power_Control <#02>= 0x0E
Right_AMP : 03_Playback_Config <#03>= 0x20
Right_AMP : 04_MISC_Config_1 <#04>= 0xC6
Right_AMP : 05_MISC_Config_2 <#06>= 0x19
Right_AMP : 06_TDM_Config_1 <#06>= 0x19
Right_AMP : 07_TDM2 <#07>= 0x02
Right_AMP : 08_TDM3 <#08>= 0x7A
Right_AMP : 09_TDM4 <#09>= 0x10
Right_AMP : 0a_TDM5 <#10>= 0x13
Right_AMP : 0b_TDM6 <#11>= 0x00
Right_AMP : 0c_TDM7 <#12>= 0x00
Right_AMP : 0d_TDM8 <#13>= 0x04
Right_AMP : 0e_TDM9 <#14>= 0x05
Right_AMP : 0f_TDM10 <#15>= 0x06
Right_AMP : 10_TDM_Colok_Detection_Monitor <#16>= 0x07
Right_AMP : 3e_NoiseGate_Control <#62>= 0x10
Right_AMP : 5c__page2_NoiseGate_CH_Threshold_1 <#348>= 0x00
Right_AMP : 5d_page2_NoiseGate_CH_Threshold_2 <#349>= 0x01
Right_AMP : 5e_page2_NoiseGate_CH_Threshold_3 <#350>= 0x09
Right_AMP : 5f_page2_NoiseGate_CH_Threshold_4 <#351>= 0x45
Right_AMP : 64_page2_NoiseGate_Timer_1 <#356>= 0x00
Right_AMP : 65_page2_NoiseGate_Timer_2 <#357>= 0x00
Right_AMP : 66_page2_NoiseGate_Timer_3 <#358>= 0x4B
Right_AMP : 67_page2_NoiseGate_Timer_4 <#359>= 0x00
Right_AMP : 0c_page2_DVC_PCM_1 <#268>= 0x40
Right_AMP : 0d_page2_DVC_PCM_2 <#269>= 0x00
Right_AMP : 0e_page2_DVC_PCM_3 <#270>= 0x00
Right_AMP : 0f_page2_DVC_PCM_4 <#271>= 0x00
bengal:/d/regmap/0-004c # cat registers
00: 00
01: 00
02: 00
03: 20
04: c6
05: 22
06: 19
07: 02
08: 72
09: 10
0a: 13
0b: 00
0c: 44
0d: 04
0e: 05
0f: 06
10: 07
11: 7f
12: 12
13: 76
14: 01
15: 2e
16: 60
17: 0e
18: 0c
19: 00
1a: fc
1b: fb
1c: df
1d: ff
1e: ff
1f: 04
20: 00
21: 00
22: 80
23: 00
24: 00
25: 00
26: 00
27: 00
28: 00
29: 00
2a: 00
2b: 00
2c: 00
2d: ad
2e: 80
2f: a5
30: 59
31: 40
32: 81
33: 34
34: 4b
35: 74
36: 0d
37: 00
38: 0a
39: 0c
3a: be
3b: 58
3c: 38
3d: 08
3e: 10
3f: 00
40: 76
41: 41
42: 00
43: c0
44: 10
45: 21
46: 00
47: b4
48: ac
49: 00
4a: 00
4b: 10
4c: 00
4d: 00
4e: 00
4f: 00
50: 00
51: 00
52: 00
53: 00
54: 00
55: 00
56: 00
57: 00
58: 00
59: 00
5a: 00
5b: 00
5c: 00
5d: 00
5e: 00
5f: 00
60: 00
61: 00
62: 00
63: 00
64: 00
65: 00
66: 00
67: 00
68: 00
69: 00
6a: 00
6b: 00
6c: 00
6d: 00
6e: 00
6f: 00
70: 00
71: 00
72: 00
73: f0
74: 00
75: 0f
76: 00
77: 00
78: 80
79: 00
7a: 00
7b: 00
7c: 00
7d: 10
7e: 92
7f: 00
80: 00
Thanks!
[ 128.055646] tas2563 0-004c: tas2563_hw_params, format: 2
[ 128.055678] tas2563 0-004c: tas2563_set_bitwidth 1568
[ 128.059309] tas2563 0-004c: tas2563_dev_update_bits: chn4c:BOOK:PAGE:REG 0:0:8, mask: 0xc, val: 0x0
[ 128.059337] tas2563 0-004c: mnCh_size: 16
[ 128.059356] tas2563 0-004c: blr_clk_ratio: 32
[ 128.060490] tas2563 0-004c: tas2563_dev_update_bits: chn4c:BOOK:PAGE:REG 0:0:12, mask: 0xff, val: 0x40
[ 128.061215] tas2563 0-004c: tas2563_dev_update_bits: chn4c:BOOK:PAGE:REG 0:0:12, mask: 0xff, val: 0x44
[ 128.061237] tas2563 0-004c: tas2563_hw_params, sample rate: 48000
[ 128.061677] tas2563 0-004c: tas2563_dev_update_bits: chn4c:BOOK:PAGE:REG 0:0:6, mask: 0x20, val: 0x0
[ 128.062117] tas2563 0-004c: tas2563_dev_update_bits: chn4c:BOOK:PAGE:REG 0:0:6, mask: 0xe, val: 0x8
[ 128.082201] __afe_port_start: port id: 0x1000
[ 128.082251] afe_get_cal_topology_id: cal_type 8 not initialized for this port 4096
[ 128.090056] afe_get_cal_topology_id: cal_type 9 not initialized for this port 4096
[ 128.097724] afe_send_port_topology_id: AFE set topology id 0x0 enable for port 0x1000 ret -22
[ 128.097741] send_afe_cal_type: cal_index is 0
[ 128.097758] send_afe_cal_type: dev_acdb_id[40] is 0
[ 128.097774] send_afe_cal_type cal_block not found!!
[ 128.103383] afe_send_hw_delay: port_id 0x1000 rate 48000 delay_usec 0 status 0
[ 128.108501] tas2563 0-004c: tas2563_mute
[ 128.108521] tas2563 0-004c: unmute: tas2563_mute
[ 128.108538] tas2563 0-004c: set power state: 0
[ 128.108556] tas2563 0-004c: tas2563_set_power_state, state: 0, mbPowerup 0
[ 128.108573] tas2563 0-004c: tas2563_set_calibration start
[ 128.114141] tas2563 0-004c: tas2563_load_calibration:
[ 128.114647] tas2563 0-004c: TAS2563 calibration file = /mnt/vendor/persist/audio/tas2563_cal.bin, handle = 1104787008
[ 128.124986] tas2563 0-004c: TAS2563 calibration file size = 440
[ 128.125010] tas2563 0-004c: firmware size: 440
[ 128.125026] tas2563 0-004c: FW timestamp: 1552463249
[ 128.125073] tas2563 0-004c: FW Size = 440
[ 128.125089] tas2563 0-004c: Checksum = 0x0000
[ 128.125105] tas2563 0-004c: PPC Version = 0x0000
[ 128.125120] tas2563 0-004c: FW Version = 0x0000
[ 128.125136] tas2563 0-004c: Driver Version= 0x0100
[ 128.125152] tas2563 0-004c: Timestamp = 1552463249
[ 128.125167] tas2563 0-004c: DDC Name = Calibration Data File
[ 128.125183] tas2563 0-004c: Description = Calibration Data File for TAS2563 Mono
[ 128.125199] tas2563 0-004c: header size: 139, line: 1193
[ 128.125216] tas2563 0-004c: program size: 2, line: 1210
[ 128.125233] tas2563 0-004c: config size: 2, line: 1218
[ 128.125281] tas2563 0-004c: fw_parse_data, 1007
[ 128.125333] tas2563 0-004c: fw_parse_block_data, 966
[ 128.125348] tas2563 0-004c: fw_parse_block_data, 970
[ 128.125383] tas2563 0-004c: fw_parse_block_data, 995
[ 128.125399] tas2563 0-004c: calib size: 297, line: 1228
[ 128.125416] tas2563 0-004c: TAS2563 calibration: 1 calibrations
[ 128.125434] tas2563 0-004c: pProgram->mnAppMode is 1
[ 128.125450] tas2563 0-004c: tas2563_set_calibration, load calibration
[ 128.125467] tas2563 0-004c: TAS2563 load data: Calibration Data, Blocks = 1, Block Type = 3
[ 128.125485] tas2563 0-004c: TAS2563 load block: Type = 3, commands = 21
[ 128.126243] tas2563 0-004c: tas2563_dev_bulk_write: chn4c:BOOK:PAGE:REG 0:15:52, len: 0x04
[ 128.126657] tas2563 0-004c: tas2563_dev_bulk_write: chn4c:BOOK:PAGE:REG 0:15:72, len: 0x04
[ 128.127067] tas2563 0-004c: tas2563_dev_bulk_write: chn4c:BOOK:PAGE:REG 0:15:64, len: 0x04
[ 128.127753] tas2563 0-004c: tas2563_dev_bulk_write: chn4c:BOOK:PAGE:REG 0:13:60, len: 0x04
[ 128.128852] tas2563 0-004c: tas2563_dev_bulk_write: chn4c:BOOK:PAGE:REG 0:16:20, len: 0x04
[ 128.130161] tas2563 0-004c: tas2563_dev_bulk_write: chn4c:BOOK:PAGE:REG 140:25:124, len: 0x04
[ 128.131399] tas2563 0-004c: tas2563_dev_bulk_write: chn4c:BOOK:PAGE:REG 0:53:44, len: 0x04
[ 128.131417] tas2563 0-004c: tas2563_set_calibration finish
[ 128.138187] tas2563 0-004c: tas2563_dev_update_bits: chn4c:BOOK:PAGE:REG 0:0:2, mask: 0xf, val: 0x80
[ 128.138205] tas2563 0-004c: tas2563_set_power_state channel is 1
[ 128.138947] tas2563 0-004c: tas2563_dev_update_bits: chn4c:BOOK:PAGE:REG 0:0:48, mask: 0x4, val: 0x4
[ 128.238774] tas2563 0-004c: irq_work_routine
[ 128.239752] tas2563 0-004c: tas2563_dev_write: chn4c:BOOK:PAGE:REG 0:0:26, VAL: 0xfc
[ 128.240559] tas2563 0-004c: tas2563_dev_write: chn4c:BOOK:PAGE:REG 0:0:27, VAL: 0xfb
[ 128.241348] tas2563 0-004c: tas2563_dev_write: chn4c:BOOK:PAGE:REG 0:0:28, VAL: 0xdf
[ 128.249555] tas2563 0-004c: irq_work_routine
[ 128.250388] tas2563 0-004c: tas2563_dev_write: chn4c:BOOK:PAGE:REG 0:0:26, VAL: 0xfc
[ 128.251581] tas2563 0-004c: tas2563_dev_write: chn4c:BOOK:PAGE:REG 0:0:27, VAL: 0xfb
[ 128.252786] tas2563 0-004c: tas2563_dev_write: chn4c:BOOK:PAGE:REG 0:0:28, VAL: 0xdf
[ 128.320391] init: starting service 'qspmhal'...
Could you tell me the sampling-rate, bitwidth of the bitstream you are playing?
And what’s I2S bit clk of the system?
If you can't answer above question correctly, would you be so kind and measure the I2S Bitclk and WS with scope?
According to your register dump, the TDM Clock detection monitor Field Descriptions----Book0Page0Registe0x11=0x7F, the FS_RATIO is INVALID.
Thanks.
[ 157.780796] bengal-asoc-snd soc:qcom,msm-audio-apr:qcom,q6core-audio:sound: msm_mi2s_set_sclk: clock rate 1536000l
[ 157.870021] msm-dai-q6-mi2s soc:qcom,msm-dai-mi2s:qcom,msm-dai-q6-mi2s-prim: msm_dai_q6_mi2s_prepare: dai id 0, afe port id = 0x1000\x0adai_data->channels = 2 sample_rate = 48000
[ 157.983015] adm_get_idx_if_copp_exists: port_idx-40, topology-0x11000003, mode-0, rate-48000, bit_width-16
[13099.048768] bengal-asoc-snd soc:qcom,msm-audio-apr:qcom,q6core-audio:sound: msm_mi2s_set_sclk: clock rate 3072000l
setting the clock to 3072000, bitwidth=32,samplerate=48khz, still meet 0x11 = 7h
I have confused what on earth clk rate you used, 3.072 MHz or 1.536 MHz?
Would you be so kind and use scope to measure it? Whether or not the I2S signal is on, including bit clk, WS clk and I2S data?
Thanks.
Sorry for there is not any check point in the board to measure those signals, is there any other method to check?
Thanks
According to the value of 0x11, the input signal to tas2563 is wrong, most probably the I2S signal is not on or abnormal. Please consult hardware guy whether there's another way to check the input signals.
HI, Shenghao, after changing some parameters, registers are shown as bellow:
00: 00
01: 00
02: 00
03: 20
04: c6
05: 22
06: 19
07: 02
08: 7e
09: 10
0a: 13
0b: 00
0c: 44
0d: 04
0e: 05
0f: 06
10: 07
11: 24
12: 12
13: 76
14: 01
15: 2e
16: 60
17: 0e
18: 0c
19: 00
1a: fc
1b: fb
1c: df
1d: ff
1e: ff
1f: 00
20: 00
21: 80
22: 80
23: 00
24: 00
25: 00
26: 90
27: 80
28: 00
29: 40
2a: 00
2b: 00
2c: 00
2d: ad
2e: 00
2f: a0
30: 59
31: 40
32: 81
33: 34
34: 4b
35: 74
36: 01
37: 00
38: 0a
39: 0c
3a: be
3b: 58
3c: 38
3d: 08
3e: 10
3f: 00
40: 76
41: 41
42: 00
43: c0
44: 10
45: 21
46: 00
47: 3b
48: ec
49: 00
4a: 00
4b: 10
4c: 00
4d: 00
4e: 00
4f: 00
50: 00
51: 00
52: 00
53: 00
54: 00
55: 00
56: 00
57: 00
58: 00
59: 00
5a: 00
5b: 00
5c: 00
5d: 00
5e: 00
5f: 00
60: 00
61: 00
62: 00
63: 00
64: 00
65: 00
66: 00
67: 00
68: 00
69: 00
6a: 00
6b: 00
6c: 00
6d: 00
6e: 00
6f: 00
70: 00
71: 00
72: 00
73: f0
74: 00
75: 0f
76: 00
77: 00
78: 80
79: 00
7a: 00
7b: 00
7c: 00
7d: 10
7e: dd
7f: 00
80: 00
0x11 currently is not 7fh, could you please help check is there any other issues from the registers?
btw, We are using sample rate 48khz, bit clk 3.072Mhz, bit width S32_LE
log file is attachedaudio_log_2563_dmesg.txt
Thanks!
Hi, Feifei,
Our team will review the information you shared and provide their feedback as soon as possible.
Best regards,
Luis Fernando Rodríguez S.
bengal:/ # cat /d/regmap/0-004c/registers 00: 00 01: 00 02: 0e 03: 20 04: c6 05: 22 06: 19 07: 02 08: 72 09: 10 0a: 13 0b: 00 0c: 44 0d: 04 0e: 05 0f: 06 10: 07 11: 14 12: 12 13: 76 14: 01 15: 2e 16: 60 17: 0e 18: 0c 19: 00 1a: fc 1b: fb 1c: df 1d: ff 1e: ff 1f: 00 20: 00 21: 00 22: 00 23: 00 24: 00 25: 00 26: 00 27: 00 28: 00 29: 00 2a: 00 2b: 00 2c: 00 2d: 00 2e: 00 2f: 00 30: 59 31: 40 32: 81 33: 34 34: 4b 35: 74 36: 0c 37: 00 38: 0a 39: 0c 3a: be 3b: 58 3c: 38 3d: 08 3e: 10 3f: 00 40: 76 41: 41 42: 00 43: c0 44: 10 45: 21 46: 00 47: 00 48: 2c 49: 00 4a: 00 4b: 10 4c: 00 4d: 00 4e: 00 4f: 00 50: 00 51: 00 52: 00 53: 00 54: 00 55: 00 56: 00 57: 00 58: 00 59: 00 5a: 00 5b: 00 5c: 00 5d: 00 5e: 00 5f: 00 60: 00 61: 00 62: 00 63: 00 64: 00 65: 00 66: 00 67: 00 68: 00 69: 00 6a: 00 6b: 00 6c: 00 6d: 00 6e: 00 6f: 00 70: 00 71: 00 72: 00 73: f0 74: 00 75: 0f 76: 00 77: 00 78: 80 79: 00 7a: 00 7b: 00 7c: 00 7d: 10 7e: de 7f: 00 80: 00
HI Luis Fernando Rodriguez S
Please find the attached logs, waveform's and register dump details.
Now MI2S lines are proper. please check the logs and provide your feedback.
Please share any userguide or testapp to check TI PA.
Thanks
Anil
Thank you, Anil,
Our team is reviewing this information. They will provide their feedback soon.
Best regards,
Luis Fernando Rodríguez S.
Hi,
The register dump you share is in poweroff mode, as you know Book0Page0Reg0x2 = 0xe, this means chip is in power off.
Pls check why the chip has not been power off. Are you sure the code has been called the tas2563_mute?
One more thing, the clk freq you measured is 512kHz, this freq is very strange. Is this the sample rate?
Good luck
we measured the WS line and SDIN0 line. we are not measured the clk line.
we are not modify any register to keep the chip power off. it is loading the firmware and calibration file successfully.
log is saying that power up and called tas2563_mute function.
[ 307.321304] tas2563 0-004c: tas2563_mute
[ 307.321318] tas2563 0-004c: mute: tas2563_mute
[ 307.321332] tas2563 0-004c: set power state: 2
[ 307.321347] tas2563 0-004c: tas2563_set_power_state, state: 2, mbPowerup 1
[ 307.322046] tas2563 0-004c: tas2563_dev_update_bits: chn4c:BOOK:PAGE:REG 0:0:2, mask: 0x3, val: 0x2
[ 307.324359] q6asm_callback: No wait command opcode[0x10d99] cmd_opcode:1fbb4000
Thanks
Anil
Hi Anil
state = 2 means shutdown. What kind of case you use?
Have you use tinyplay to play a music? One more thing, what's the freq of the WS clk?
Hi
we have used
tinymix "SEC_MI2S_RX Audio Mixer MultiMedia1" 1
tinymix "SEC_MI2S_RX Format" "S32_LE"
tinyplay ".wav"
freq of WS is 50 KHz.
clk we are not measured since we dont have tp.
Thanks
WS clk may be 48kHz, and bit clk should be 3,072MHz. This is the standard data for audio.
Pls make the state should be 1, active mode in playback
[ 295.224610] tas2563 0-004c: tas2563_mute
[ 295.224625] tas2563 0-004c: unmute: tas2563_mute
[ 295.224641] tas2563 0-004c: set power state: 0
[ 295.224658] tas2563 0-004c: tas2563_set_power_state, state: 0, mbPowerup 0
[ 295.224676] tas2563 0-004c: tas2563_set_calibration start
[ 295.230649] tas2563 0-004c: tas2563_load_calibration:
Shenghao, when playback starts, logs shows has setting power state to active(0)
and these logs happend when we stopped the playback:
[ 307.321304] tas2563 0-004c: tas2563_mute
[ 307.321318] tas2563 0-004c: mute: tas2563_mute
[ 307.321332] tas2563 0-004c: set power state: 2
[ 307.321347] tas2563 0-004c: tas2563_set_power_state, state: 2, mbPowerup 1
[ 307.322046] tas2563 0-004c: tas2563_dev_update_bits: chn4c:BOOK:PAGE:REG 0:0:2, mask: 0x3, val: 0x2
#define TAS2563_POWER_ACTIVE 0
#define TAS2563_POWER_MUTE 1
#define TAS2563_POWER_SHUTDOWN 2
also we are trying to write command to set power to active mode during unmute, previously in driver code from TI github it was commented .
Thanks!
Pls get the register dump during playback, that is active mode.
The log is correct. If you play a 48kHz, 32-bit, stereo music, can you hear the music?
Hi
This part of code commented in ti driver code.
------------------------------------------------------------------------------------------
case TAS2563_POWER_ACTIVE:
/*
nResult = pTAS2563->update_bits(pTAS2563, TAS2563_PowerControl,
TAS2563_PowerControl_OperationalMode10_Mask |
TAS2563_PowerControl_ISNSPower_Mask |
TAS2563_PowerControl_VSNSPower_Mask,
TAS2563_PowerControl_OperationalMode10_Active |
TAS2563_PowerControl_VSNSPower_Active |
TAS2563_PowerControl_ISNSPower_Active);
if (nResult < 0)
return nResult;
*/
engal:/ # cat /d/regmap/0-004c/registers 00: 00 01: 00 02: 00 03: 20 04: c6 05: 22 06: 19 07: 02 08: 7e 09: 10 0a: 13 0b: 00 0c: 44 0d: 04 0e: 05 0f: 06 10: 07 11: 24 12: 12 13: 76 14: 01 15: 2e 16: 60 17: 0e 18: 0c 19: 00 1a: fc 1b: fb 1c: df 1d: ff 1e: ff 1f: 00 20: 00 21: 80 22: 80 23: 00 24: 00 25: 00 26: 90 27: 80 28: 00 29: 40 2a: 00 2b: 00 2c: 00 2d: ba 2e: 00 2f: a3 30: 59 31: 40 32: 81 33: 34 34: 4b 35: 74 36: 08 37: 00 38: 0a 39: 0c 3a: be 3b: 58 3c: 38 3d: 08 3e: 10 3f: 00 40: 76 41: 41 42: 00 43: c0 44: 10 45: 21 46: 00 47: 40 48: 2c 49: 00 4a: 00 4b: 10 4c: 00 4d: 00 4e: 00 4f: 00 50: 00 51: 00 52: 00 53: 00 54: 00 55: 00 56: 00 57: 00 58: 00 59: 00 5a: 00 5b: 00 5c: 00 5d: 00 5e: 00 5f: 00 60: 00 61: 00 62: 00 63: 00 64: 00 65: 00 66: 00 67: 00 68: 00 69: 00 6a: 00 6b: 00 6c: 00 6d: 00 6e: 00 6f: 00 70: 00 71: 00 72: 00 73: f0 74: 00 75: 0f 76: 00 77: 00 78: 80 79: 00 7a: 00 7b: 00 7c: 00 7d: 10 7e: a4 7f: 00 80: 00 bengal:/ #
after un-commneting the code we are seeing the regdump is 02:00.
12-22 12:43:35.854 0 0 I tas2563 0-004c: entry tas2563_mute params mute = 0
12-22 12:43:35.854 0 0 I tas2563 0-004c: tas2563_mute channel chn = 1
12-22 12:43:35.854 0 0 I tas2563 0-004c: set power state: 0
attached the register dump pls have a look.
Thanks
attached the logs also
The code will be power on the chip in irq_work_queue.
I think pTAS2563->mnIRQGPIO or pTAS2563->mnIRQGPIO2 is invalid, which causes the irq_work_queue has not been created.
In tas2563-regmap.c
if (gpio_is_valid(pTAS2563->mnIRQGPIO) ||
gpio_is_valid(pTAS2563->mnIRQGPIO2)) {
INIT_DELAYED_WORK(&pTAS2563->irq_work, irq_work_routine);
}
As to the register dump, B0P0R0x11 seems OK, it is 0x24, that means audio data is 32bit, 48kHz
tinymix "SEC_MI2S_RX Audio Mixer MultiMedia1" 1
tinymix "SEC_MI2S_RX SampleRate" KHZ_48
tinymix "SEC_MI2S_RX Channels" "Two"
tinymix "SEC_MI2S_RX Format" S32_LE
Above commands are used for enabling MI2S output and configuring correct parameters.
tinyplay /data/HighQuality.wav
run this command to play music.
we are using single single channel, single irq and single reset pin.
even thought it is not irqgpio2 is ot there it should call irq_work_routine.
we are playning the audio as below
tinymix "SEC_MI2S_RX Audio Mixer MultiMedia1" 1
tinymix "SEC_MI2S_RX Format" "S32_LE"
tinyplay ".wav"
Thanks
Thank you for sharing the tinymix log. Our team will review this information and provide a response about it.
Best regards,
Luis Fernando Rodríguez S.
confirmed with HW team, speaker connection is fine.
we measured the out_p and out_n pin, on output there.
Attached the firmware and calibration file used.
Please check. if they are wrong provide the correct one.
thanks
Hi, Shenghao,
Could you take a look at the provided files and let us know your thoughts?
Thank you.
Best regards,
Luis Fernando Rodríguez S.