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.

TAS2563QFNEVM: TAS2563: TAS2563 integration on linux kernel 6.12 with IMX95

Part Number: TAS2563QFNEVM
Other Parts Discussed in Thread: TAS2563, TAS2562, TAS2781

TI part number TAS2563 is been incorporated in one of the product which uses i.MX95 SOC based om the Yocto and kernel version 6.12 (NXP).

Here I am looking for the corresponding driver support to recognize the TAS2562 HW and to use its functionalitoes.
Previously one of my colleauge has worked for the same but with kernel version 6.6, below is the ticket link for the same use case.

TAS2563: TAS2563 integrated on linux kernel 6.6 with IMX95. Driver got loaded, card detected in aplay. But the 48khz wav files are not runnig. - Amplifiers forum - Amplifiers - TI E2E support forums 

Is the changes suggested in the above forum holds for kernel 6.12 also?

If not, requesting for support on this new case.

  • Hi, Guy.

    Let me know which chip on earth you will use, TAS2563 or TAS2562. In the title, you mentioned TAS2563, while in the TAS2562.

    Actually, kernel 6.12 have already contain the TAS2563 driver, see tas2781-i2c.c « codecs « soc « sound - kernel/git/stable/linux.git - Linux kernel stable tree

  • Hi Shenghao Ding,

    Thanks for connecting and apologies for the confusion. 
    The chip used is TAS2563.

    Can you confirm the usage of the following patch which was shared by TI in another forum where kernel version used was 6.6.x.
    e2e.ti.com/.../tas2563-tas2563-integrated-on-linux-kernel-6-6-with-imx95-driver-got-loaded-card-detected-in-aplay-but-the-48khz-wav-files-are-not-runnig

    "tas2781-audio-codec.patch"

    This patch has changes related to following files
    1. include/sound/tas2781-comlib-i2c.h
    2. include/sound/tas2781-dsp.h
    3. include/sound/tas2x20-tlv.h
    4. include/sound/tas5825-tlv.h
    5. sound/soc/codecs/tas2781-comlib-i2c.c
    6. sound/soc/codecs/tas2781-comlib.c
    7. sound/soc/codecs/tas2781-fmwlib.c
    8. sound/soc/codecs/tas2781-i2c.c

    And also found below set configs are added 
    +CONFIG_SND_SOC_TAS2781_COMLIB=y
    +CONFIG_SND_SOC_TAS2781_COMLIB_I2C=y
    +CONFIG_SND_SOC_TAS2781_FMWLIB=y
    +CONFIG_SND_SOC_TAS2781_I2C=y

    Some of the above files are available in 6.12, but the contents are exactly same as defined in the patch.

    Can you suggest is there anything's to be picked from this patch and what configs to be enabled for bringing and making TAS2563 functional?

  • You can sue the code in kernel 6.12 directly.

  • In kernel 6.12, no CONFIG_SND_SOC_TAS2781_COMLIB_I2C, so you won't care that.

    What you do is to register the sound card in your platform. If you have issue, you can consultant the platform vendor. They have many examples to register third-party audio amplifier. Good luck.

  • Without adding any patch and only device tree changes to add TAS2563 is getting the probe error.

    localhost:~$ dmesg | grep -i "tas2563"
    [ 21.743068] platform sound-tas2563: deferred probe pending: asoc-simple-card: parse error

    Below are the dts changes.

    sound-tas2563 {
    compatible = "simple-audio-card";
    simple-audio-card,name = "tas2563";
    simple-audio-card,format = "i2s";
    simple-audio-card,frame-master = <&cpu_dai>;
    simple-audio-card,bitclock-master = <&cpu_dai>;
    simple-audio-card,widgets =
    "Speaker", "SPK";
    simple-audio-card,routing =
    "ASI", "SPK",
    "SPK", "OUT",
    "DMIC", "ASI OUT";
    cpu_dai: simple-audio-card,cpu {
    sound-dai = <&sai3>;
    dai-tdm-slot-num = <1>;
    dai-tdm-slot-width = <16>;
    };

    codec_dai: simple-audio-card,codec {
    sound-dai = <&audio_amp>;
    };
    };


    audio_amp: tas2563@4c {
    compatible = "ti,tas2563";
    reg = <0x4c>;
    #sound-dai-cells = <0>;

    reset-gpio = <&gpio_expander 0 GPIO_ACTIVE_HIGH>;

    clocks = <&scmi_clk IMX95_CLK_SAI3>;
    clock-names = "mclk";

    vdd-supply = <&reg_3p3v>;
    iovdd-supply = <&reg_1p8v>;
    };

  • I am taking the same DTS changes which able to detect/probe the TAS2563 with kernel 6.6.

    I confirm no changes in the hardware base board, but only latest version of i.MX95 SOC from NXP is used, which basically supports minimum kernel version 6.12.

    So I am here trying to port from kernel 6.6.x to 6.12.x

  • Why not consult the platform vendor on the DTS setting?

  • Do you mean the same dts setting work in kernel 6.6?

  • Yes, can you confirm what reg addr to use?
    It is reg = <0x4c>; or reg = <0x48>; ?

    In i2c probe I see both getting detected but unused.

    localhost:~$ sudo i2cdetect -y 3
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- 48 -- -- -- 4c -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- UU -- -- --
    localhost:~$


  • 0x4c is the right one, do not care 0x48, 0x48 is used for broadcast in multiple pcs tas2563, such as two pcs or four. Your case is only one TAS2563 in your device.

  • Ok, then can you guide on resolving deferred probe error.
    What is the config's which are much required to bring up the TAS2563.
    Apart from the data sheet, is there any application note kind of a document to guide the integration relative to latest kernel versions.

  • Hi Ding
    I am able resolve the probe error and could read TAS2563 sound card from aplay -l

    localhost:~$ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: tas2563 [tas2563], device 0: sai-tx-rx-tasdev_codec tasdev_codec-0 [sai-tx-rx-tasdev_codec tasdev_codec-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0


    The logs from the dmesg describes:
    tasdev-codec 3-004c: Direct firmware load for tas2563RCA1.bin failed with error -2
    tasdev-codec 3-004c: Falling back to sysfs fallback for: tas2563RCA1.bin
    tasdev-codec 3-004c: Failed to read tas2563RCA1.bin


    Can I get the binary "tas2563RCA1.bin" ?

  • I am able resolve the probe error and could read TAS2563 sound card from aplay -l

    I guess you are the new engineer. Maybe this is the big step for you in your career. Congratulations!

    As to tas2563RCA1.bin, pls access following link

    https://tidrive.ext.ti.com/u/iNUqJ91VKkGa1Sor/44a3f155-a8d4-46c0-9cb0-73aa25487dc3?l

    access coce: 14yj.Rrk

    In folder RCA/jsn file/tas2563 is a tas2563RCA1.bin. you can use it direrctly.

    OR you can made it by yourself, following is the instructions:

    In folder RCA/jsn file/tas2563, you will find tas2563-1amp-reg.json. Pls use regbin-toolv1.4.2(RCA/toolset/regbin tool/Non_Integrated_Bin_Tool_v1.4.2.zip) to generate the bin file.

    The guideline is "RCA/toolset/regbin tool/Regbin Tool User Guideline.pdf".

    As to how to select the audio profiles inside tas2563RCA1.bin, I'd like you study P43 ~ P45, P49~P50 of Guideline for Audio AMP Linux driver porting.pdf.

  • Hi Shenghao,
    Thanks for sharing the tas2563RCA1.bin file. Post having the tas2563RCA1.bin in the "/lib/firmware", I see the following from dmesg log.

    tasdev-codec 3-004c: Direct firmware load for tas2563_coef.bin failed with error -2
    tasdev-codec 3-004c: Falling back to sysfs fallback for: tas2563_coef.bin

    I'm not sure is this dependency blocking the TAS2562 functionality, because I am trying to record the audio file with .wav extension and didn't encounter any failures or errors in the process, but when I try to play the recorded audio file from the windows machine, I can't hear out any voice note/ audio from the wav file.

    Below is the procedure followed.

    localhost:~$ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: tas2563 [tas2563], device 0: sai-tx-rx-tasdev_codec tasdev_codec-0 [sai-tx-rx-tasdev_codec tasdev_codec-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0


    localhost:~$ arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 0: tas2563 [tas2563], device 0: sai-tx-rx-tasdev_codec tasdev_codec-0 [sai-tx-rx-tasdev_codec tasdev_codec-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0


    localhost:/userdata$ arecord -t wav -c 1 -f S16_LE -r 48000 -v test_2_koala.wav &
    [1] 1143
    localhost:/userdata$ Plug PCM: Route conversion PCM (sformat=S16_LE)
    Transformation table:
    0 <- 0*0.5 + 1*0.5
    Its setup is:
    stream : CAPTURE
    access : RW_INTERLEAVED
    format : S16_LE
    subformat : STD
    channels : 1
    rate : 48000
    exact rate : 48000 (48000/1)
    msbits : 16
    buffer_size : 5760
    period_size : 1920
    period_time : 40000
    tstamp_mode : ENABLE
    tstamp_type : MONOTONIC
    period_step : 1
    avail_min : 1920
    period_event : 0
    start_threshold : 1
    stop_threshold : 5760
    silence_threshold: 0
    silence_size : 0
    boundary : 6485183463413514240
    Slave: Direct Snoop PCM
    Its setup is:
    stream : CAPTURE
    access : MMAP_INTERLEAVED
    format : S16_LE
    subformat : STD
    channels : 2
    rate : 48000
    exact rate : 48000 (48000/1)
    msbits : 16
    buffer_size : 5760
    period_size : 1920
    period_time : 40000
    tstamp_mode : ENABLE
    tstamp_type : MONOTONIC
    period_step : 1
    avail_min : 1920
    period_event : 0
    start_threshold : 1
    stop_threshold : 5760
    silence_threshold: 0
    silence_size : 0
    boundary : 6485183463413514240
    Hardware PCM card 0 'tas2563' device 0 subdevice 0
    Its setup is:
    stream : CAPTURE
    access : MMAP_INTERLEAVED
    format : S16_LE
    subformat : STD
    channels : 2
    rate : 48000
    exact rate : 48000 (48000/1)
    msbits : 16
    buffer_size : 5760
    period_size : 1920
    period_time : 40000
    tstamp_mode : ENABLE
    tstamp_type : MONOTONIC
    period_step : 1
    avail_min : 1920
    period_event : 0
    start_threshold : 1
    stop_threshold : 6485183463413514240
    silence_threshold: 0
    silence_size : 0
    boundary : 6485183463413514240
    appl_ptr : 0
    hw_ptr : 0
    Recording WAVE 'test_2_koala.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

  • Hi guy

    1) type amixer in your system, I will check whether the RCA file has been load properly first.

    2) share the playback command you used.

    3) also share the wav file you playback with me

    As to coef.bin, have you used PPC3 tool to generated bin file for PDM recording?

  • Hi

    Please find the inline response.

    1) type amixer in your system, I will check whether the RCA file has been load properly first.

    localhost:/$ amixer
    Simple mixer control 'Speaker Digital',0
    Capabilities: volume volume-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 255
    Mono: 243 [95%] [0.00dB]
    Simple mixer control 'Speaker Force Firmware Load',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Speaker Profile Id',0
    Capabilities: volume volume-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 10
    Mono: 0 [0%]

    2) share the playback command you used.
    I am not using playback (aplay here) as I don't have speakers at this moment to connect TAS2563.

    My purpose is to record the audio file (.wav) and move it to windows laptop to verify using media player.

    3) also share the wav file you playback with me




    4) As to coef.bin, have you used PPC3 tool to generated bin file for PDM recording?

    No, I haven't used PPC3 tool

  • The amixer log is fine for me. RCA has been loaded successfully. Next step, pls add PDM coef bin file into the system.

    Without PDM coef bin file, the recording can't work.

    Usually, we debug playback first to make sure the system clk and audio path works well, then debug record.

  • Thanks for confirming. Can you help me to find the "tas2563_coef.bin" or how to generate one if required?

  • Let me transfer your request to your TAS2563 expert.

  • tidrive.ext.ti.com/.../44a3f155-a8d4-46c0-9cb0-73aa25487dc3

    access coce: 14yj.Rrk

    This link got expired, it is possible to reshare?

  • https://tidrive.ext.ti.com/u/zWVY_JjlWJ7fZVjw/44a3f155-a8d4-46c0-9cb0-73aa25487dc3?l

    access code: Lf45.qKK

  • My amixer controls outputs only related to speaker related controls but nothing related to PDM microphone.

    localhost:/$ amixer controls
    numid=1,iface=MIXER,name='Speaker Digital Volume'
    numid=2,iface=MIXER,name='Speaker Force Firmware Load'
    numid=3,iface=MIXER,name='Speaker Profile Id'

    Am I missing PDM related things here.

    In one of the readme file I see below things mentioned. 

    PDM ON/OFF feature:
    Before runing aplay&arecord, run following command to turn on PDM
    amixer cset numid=6,iface=MIXER,name='Pdm switch Ctrl' 1
    Before runing aplay&arecord, run following command to turn off PDM
    amixer cset numid=6,iface=MIXER,name='Pdm switch Ctrl' 0


    But in my scenario I don't see the PDM related controls.


  • All the register-related settings are in RCA bin file. you can select profile 8 before recoding.

    Profile 8 is 08-pdm-rec-i2s-48kHz-32bit-tx-slot-0-1-mic-slot-3-ref, it is for RX path(playback path) is 32-bit i2s and TX path(audio recording path) is for 16-bit 4-slot TDM DSP-A, slot 0/1 are PMIC data and slot-3 is echo ref, slot 2 is no data.

  • Can you help me with these changes and generate a RCA bin file for me.
    Sorry I making this request because I haven't used this tool before and I might need some time to get used to it.
    Also we are planning for a Proof of concept demo for the TAS2563 use case which is scheduled tomorrow.


  • in your bin file, it has already contained that setting.

    Simple mixer control 'Speaker Profile Id',0
    Capabilities: volume volume-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 10
    Mono: 0 [0%]

    The key word "Limits" means the profile 0 ~ 10.

  • Hi Shenghao,

    Can I get tas2563_coef.bin file ?

  • Sorry, I have no coef.bin for PDM. Please Let us now what's the trouble with the PDM making?