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.

TAS2559: TAS2559

Part Number: TAS2559
Other Parts Discussed in Thread: TAS2560

Hello,

For one of our Embedded Project to port Android system on imx8mp NXP chipsets, we have a customized Target hardware which supports TAS2559YZ Audio-amplifier.

The imx8mp NXP-processor acts as HOST and provides SAI (Serial audio interface) and I2C interfaces to TAS2559 Amplifier.

imx8mp acts as I2C Master and TAS 2559 is I2C slave (address-0x4C) on i2c bus.

In order to have proper hardware configuration in kernel Device tree file (.dts), We have downloaded TI data sheet for tas2559to study the features & configurations of the audio-device and also downloaded TI-supplied TAS2559 Android driver package from Git repository  https://git.ti.com/cgit/tas2557sw-android/tas2559-android-driver/tree?h=master

The Host-device connection has MCLK --> to tas2559 MCLK1_GPI2 pin  and I2S signals are connected to (BCLK1_GPIO1, WCLK1_GPIO2,DIN1_GPI1, DOUT1_GPIO3) as inputs. 

The Reset from imx8mp SOC is directly connected to tas2559 RESET and tas2559 interrupt pin is not used.  

Please clarify the following DTS entries highlighted in Yellow. What does each of  these entries mean ?

We are not using any GPIO pin for Reset and Interrupt. In such a case, do we have to retain these entries or we can remove these entries? pls advice.

and if these entries are removed from dts file, does it cause any drive-probe function failure?

 tas2559@4c{
#sound-dai-cells = <1>;
compatible = "ti,tas2559";
reg = <0x4c>;
ti,tas2559-reset-gpio = <&msmgpio 13 0>;
ti,tas2560-reset-gpio = <&msmgpio 73 0>;
ti,tas2559-irq-gpio = <&msmgpio 59 0>;
ti,tas2560-irq-gpio = <&msmgpio 82 0>;
ti,tas2559-addr = <0x4c>;
ti,tas2560-addr = <0x4d>;
ti,tas2559-channel = <0>; /* 0, left; 1, right */
ti,tas2560-channel = <1>; /* 0, left; 1, right */
ti,ycrc-enable = <1>; /* 0, disable; non-zero, enable */
ti,echo-ref = <0>; /* 0, left channel; 1, right channel; 2, both */
ti,bit-rate = <16>; /* 16, 20, 24, 32 */
status = "ok";
};

  • For tas2559, you will remove the entries related with tas2560, such as ti,tas2560-reset-gpio, ti,tas2560-irq-gpio = <&msmgpio 82 0>;ti,tas2560-addr = <0x4d>;

    The dts is for the tas2560 and tas2559 mixture case.

    since reset gpio and irq-gpio are not used, you can remove them, too.

    I think you will have some change in your driver, too.

    Except for i2c setting in dts, where do you register the audio card?

  • Thanks much for prompt response. I have changed driver code to adapt only for Audio Mono (only tas2559 address) and removed references to tas2560 as 2nd Channel. Also, gpio and irq related code commented out. for DTS, we have made tas2559-node entries as 'Child' inside i2c5 bus-node. Is there any other DTS tree entries required besides this ?   We are using SAI (serial audio-interface for audio data transfer). SAI node is already present in the kernel dts source tree. Besides this, any other entries required for the dts source tree?   (you mentioned where do you register audio card?) does it require any DTS tree entries to register audio card. We have not enabled yet, #ifdef  CONFIG_TAS2559_CODEC i think that registers sound card on our target board to ALSA.  please confirm.                                                                                                                                                                                                                                    From initial kernel logs which i had, it appears that deivce tas2559 is correctly getting detected at slave-address (0x4c) and its registers getting accessed.        To proceed further, we will need Firmware Binary file (tas2559_uCDSP.bin) which we do not have currently.                                                                                As per data sheet, it is mentioned it is generated through PPC3 software utility.                                                                                                                              My colleague (swapnil.pendhare@agiliad.com) has requested for PPC3 software download thro'TI-web site. Hope, we receive it at the earliest.                        Meanwhile, i request for a sample tas2559_uCDSP.bin file, if you have one for tas2559 chip.                                                                                                          i can load the same with driver code on Android target board with tas2559 audio-chip and try to understand how driver code loads and parses it and  populates different device-data structures (pTAS2559 device structures) associated with it.                                                                                                            About, device data structures as defined in tas2559.h, there are many which are not well understood as there are no comments in driver-code and could not find any references in data sheet also. Request to please provide some reference links or explanations for the same to understand driver code better.                                                                                                                                                                                                                                                                                       1) What is the difference in TFirmware, TProgram and TConfiguration data structures ?                                                                                                                 2) Calibration routines are used for which sensors ? in other words, is calibration used for any sensing circuit ?  please clarify.                                                     3) what is the difference in hardware reset and software reset for tas2559 chip?                                                                                                                             4) Does tas2559 DSP-chip have Factory loaded default firmware? or device get configured only after loading .bin file ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

  • Kindly share tas2559_uCDSP.bin with me.

  • Hello,

    I don't have tas2559_uCDSP.bin with me. So, I requested in previous message, you to give one sample (.bin file) which i can load using 'tas2559 Android/linux driver code' which is (downloaded from TI-portal) . We have a customized NXP-imx8mp processor based target board which runs Android OS for a medical-application which has tas2559 audio-chip for playing sound. The Target hardware is provided by our customer and we are porting Andorid on it.                        We created  Android build with tas2559 drivers and found that driver code EXITS when it tries to load firmware tas2559_uCDSP.bin file as it does not find it. We are stuck at this step.      To summarize:                                                                                                                                                                                       a) please provide us with some sample "tas2559_uCDSP.bin" file which driver can load and parse and configure the Target-board audio-chip.                           b) Please guide, how to integrate .bin file with Android Build that we create. currently, we have only integrated tas2559 driver code files and device-tree file.     c) Later, can we customize .bin file using PPC3 software utility ?                                                                                                                                                                         

  • Let me transfer your requirement to our hardware expert.

  • Thanks. Please try to expedite support as our development work is stuck and can't progress without above information. today, my company colleague Swapnil Pendhare received PPC3 (Pure Play Console 3 App gui software ) and upon installation, We found Message " There are no available applications to install. Contact TI-team for Access to EVM apps. Could you please help with regard to this so we can install TAS2559 app?                                                                    Does PPC3 software generate "tas2559_uCDSP.bin" file for Android system ?  In the user-manual of PPC3 i did not find any such mention.                              Another query, is it must to have a TAS2559 EVM board ?  to try out .bin file . Since we have our Target hardware board with Audio chip we are thinking of trying configuraiton (.bin file) to run on our Target hardware. Please advice.                               

  • Hi Krishnakant,

    bin file is generated from PPC3, using the End System Integration. You don't need to connect the EVM in order to generate the bin file.
    Please confirm if the below is correct for your system, then I can help generating the bin file:

    • WCLK = 48kHz
    • BCLK = 3.072MHz

    Please share the account address used to access the software (myTI account) so I can check if the proper access has been granted.

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Thank you for your prompt response. This clarifies that we don't need EVM just to create .bin file. My TI account : krishnakant.mehta@agiliad.com    { The PPC3 software request was done by my colleague 'Swapnil Pendhare' from our company Agiliad. {We work on same project and same company}. But since my name is not registered in for PPC3 software, i think i could not see available-applications to install. About the configuration, listing them below.                     Master-Slave configuration where Master is imx8mp-NXP cpu and Slave is TAS2559 Audio amp chip to play sound.  some of configuration parameters are as below.          a) DSP mode: ROM2 {PCM playback & IV sense}    b) ASI-1 format: I2S      c) word-length or bit-rate: 16 bits     d) ASI1 input Channel A or Left Channel. (Mono output) we don't have stereo connection    e)  Sampling rate (WCLK) =48 kHz;  Main_CLk = 24.576 MHz        f) ASI1_BCLK (GPIO1-pin)                        g) ASI1_WCLK (GPIO-2)              h) ASI1_DIN (GPI1)    i) GPIO1/2 and GPI1 all as  - inputs    i) Main_CLK as GPI2  j) SNS_Control: speaker Load =8 Ohm    k) SAR_control Enabled      l) No battery (Fix power supply)    m) Irq-pin Not connected to cpu   . Any other information required, please let me know.  I am not sure, what Bit-Clock (BCLK) is required. How do we calculate it ? please guide on this.  We want to play 16-bit or 32-bit Audio .wav or .mp3 files on Target system. But consider now, BCLK =3.072 Mhz for .bin file generation.   With the above information, request to generate .bin file and send it to me. Thanks Much.    

  • Sending Master-slave block in figure below. (MAster NXP imx8mp SOC and Slave-TAS2559 Audio AMp chip) . In our Target system, we are not using Battery, instead of that fix +5 volt is provided.  Also, Interrupt (Irq GPIO4) to NXP-cpu is not used. Master-clock, Bit-clock and Word Clock all are inputs to TAS2559 and Audio-Data is thro' NXP DAI (Digital Audio serial interface) input as I2S format.                                               

                                                                                                  

  • Hi Krishnakant,

    I exported the configuration files using the below settings:

    BCLK is a ratio of the sampling frequency, number of channels (I2S format supports only 2 channels) and bits per channel, eg. 48kHz * (2 channels) * (32 bits per channel) = 3.072MHz

    tas2559_uCDSP.zip

    You can generate similar configuration files using PPC3 -> TAS2559 plugin -> End System Integration.

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Thanks a lot, for sending us tas2559_uCDSP.bin file and corresponding Json and config files. Especially, Json file was very helpful in tracing the tas2559 driver source code files. have a few queries related to it.  a) How to include tas2559_uCDSP.bin file in the Android BUILD process? please provide any reference or link in this regard.  b) In our case, we have only one channel Audio (LEFT channel). in this case, would not BCLK be half of 3.072? { i mean 1.536 MHz )                  c) what is the difference in YRAM & PRAM ? and checkSums associated with it ?   e) what is Calibration RAM_Mode Configuration? what parameters does it calibrate? These are not covered in tas2559 data sheet documentation. So please throw some light to understand & interpret them.                                                                                 One Request: my TI-Login  :   krishnakant.mehta@agiliad.com is not enabled to use PPC3 software which we received and could install last week. please let me know how I can activate, so that i can use PPC3 software and generate own configurations as you have suggested.                                                                                                                                        

  • Hi Krishnakant,

    You should now have access to the software.

    b) I2S interface is standard for 2 channels, even if only 1 if these is being used. The device can be configured to use the data from only one of these channels or mix them.

    c) These are two different memory blocks for the integrated DSP, these are all coefficients based on the PPC3 configuration for speaker protection and tuning (like EQ, DRC, etc) checksums are available to make sure the coefficients are correct after write.

    e) Calibration mode is an optional sequence that can be used during final production, it runs a brief test with the actual speaker connected to update the speaker parameters in order to compensate for part-to-part variation. You can refer to section 2 of this app note: https://www.ti.com/lit/an/slaa954/slaa954.pdf#page=5&zoom=100,0,102

    I'll check on a) with our SW experts.

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Hi Krishnakant,

    Regarding a), below is a reference form a previous project, you may adjust this to your specific use case like bin file name and associated directories. Don't have more information about compiling so you may also reach out to your platform vendor.

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Thank you very much for prompt support. If any other query, will post it.