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.

TAS2110: Linux driver implementation.

Part Number: TAS2110
Other Parts Discussed in Thread: TAS2563, TAS2505, TAS2562, TAS2557, TAS2558

Hello,

I have custom carrier board for Jetson Nano (kernel 4.9.253) with TAS2110 audio amplifier. Firstly I made test manually - play I2S sound and configure via I2C using script, so hardware is fine. I want to implement driver for this IC, so I use driver from your website: https://git.ti.com/cgit/lpaa-android-drivers/tas2505-linux-driver/. I know that it is driver for TAS2563, but I read that it is replacement for TAS2110.
I work with Nvidia support during added this driver to Kernel (https://forums.developer.nvidia.com/t/tas2557-tas2563-implement-driver-from-kernel-source/218181). They said that on Kernel side everything looks fine and probably fault is in driver source.
Can you said me if this driver will work with TAS2110 amplifier? If not, can you said what I must change or can you send other driver?

Best regards,
Mateusz


  • Hi Mateus,

    Not sure if you linked the correct driver, as that one is for TAS2505 but then you mention TAS2563, please confirm.
    You may try with either of these:

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Hi Mateusz

    Kindly refer to this thread TAS2110: TAS2110 Linux Driver - Audio forum - Audio - TI E2E support forums

    Both tas2557 and tas2563 are dsp-inside chip which need firmware. I think tas2562 or tas2558 driver code is more suitable for tas2110.

    Good luck.

    Shenghao

  • I am using the TAS2110 now, but in the future it will probably be tas2563. I use the driver for TAS2505 because it is only available for Linux on your git (the rest of the drivers are for Android).

  • Driver for Android can be used for Linux, because both use the Linux kernel

  • Thanks for reply.
    I compiled driver for TAS2562 without error, but I have problem with register codec. In dmesg log I see:
    [ 1.478687] tegra-asoc: sound: failed to set tas2562 sysclk!
    [ 1.484433] tegra-asoc: sound: ASoC: failed to init tas2562-playback: -524
    [ 1.491381] tegra-asoc: sound: ASoC: failed to instantiate card -524
    [ 1.498653] usb 1-3: new high-speed USB device number 2 using tegra-xusb
    [ 1.501418] tegra-asoc: sound: snd_soc_register_card failed (-524)
    [ 1.507772] tegra-asoc:: probe of sound failed with error -524
    full dmesg log:

    dmesg_full.txt
    I checked files /sys/kernel/debug/asoc/*

    sys_kernel_debug_asoc_components.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    $ sudo cat /sys/kernel/debug/asoc/components
    tegra210-ope.1
    tegra210-ope.0
    tegra210-mvc.1
    tegra210-mvc.0
    tegra210-afc.5
    tegra210-afc.4
    tegra210-afc.3
    tegra210-afc.2
    tegra210-afc.1
    tegra210-afc.0
    tegra210-sfc.3
    tegra210-sfc.2
    tegra210-sfc.1
    tegra210-sfc.0
    tegra210-mixer
    tegra210-adx.1
    tegra210-adx.0
    tegra210-amx.1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    sys_kernel_debug_asoc_dais.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    $ sudo cat /sys/kernel/debug/asoc/dais
    OPE OUT
    OPE IN
    OPE OUT
    OPE IN
    MVC OUT
    MVC IN
    MVC OUT
    MVC IN
    AFC OUT
    AFC IN
    AFC OUT
    AFC IN
    AFC OUT
    AFC IN
    AFC OUT
    AFC IN
    AFC OUT
    AFC IN
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    sys_kernel_debug_asoc_platforms.txt
    Fullscreen
    1
    2
    3
    $ sudo cat /sys/kernel/debug/asoc/platforms
    tegra210-admaif
    snd-soc-dummy
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    Above error is call from below function:

    static int tegra_machine_tas2562_init(struct snd_soc_pcm_runtime *rtd) {
    struct device *dev = rtd->card->dev;
    int err;

    err = snd_soc_dai_set_sysclk(rtd->codec_dai, 0, 12288000,
    SND_SOC_CLOCK_IN);
    if (err) {
    dev_err(dev, "failed to set tas2562 sysclk!\n");
    return err;
    }

    return 0;
    }

    When I used tas2505 driver with similar settings (only change tas2505 to tas 2562), I didn't have any problem.
    Do you have any idea what is wrong?

  • Hi Mateus,

    We'll check your error descriptions and provide further comments as soon as possible

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • I found mistake in device tree and now I see sound card in system

    sudo cat /proc/asound/cards 
     0 [tegrahda       ]: tegra-hda - tegra-hda
                          tegra-hda at 0x70038000 irq 82
     1 [tegrasndt210ref]: tegra-snd-t210r - tegra-snd-t210ref-mobile-TAS2xx
                          tegra-snd-t210ref-mobile-TAS2xxx_AMP
    

    When I play sound then I2S and I2C is quiet (only mclk was 11.3MHz).

    During boot on UART I had:
    [ 1.400695] tas2562 2-004c: Driver ID: 1.0.1
    [ 1.429716] tas2562 2-004c: gpio up !!
    [ 1.467630] tas2562 2-004c: tas2562_codec_probe!!!

    I checked files /sys/kernel/debug/asoc/*

    cat_sys_kernel_debug_asoc_codecs.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    sudo cat /sys/kernel/debug/asoc/codecs
    tegra210-ope.1
    tegra210-ope.0
    tegra210-mvc.1
    tegra210-mvc.0
    tegra210-afc.5
    tegra210-afc.4
    tegra210-afc.3
    tegra210-afc.2
    tegra210-afc.1
    tegra210-afc.0
    tegra210-sfc.3
    tegra210-sfc.2
    tegra210-sfc.1
    tegra210-sfc.0
    tegra210-mixer
    tegra210-adx.1
    tegra210-adx.0
    tegra210-amx.1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    cat_sys_kernel_debug_asoc_dais.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    sudo cat /sys/kernel/debug/asoc/dais
    OPE OUT
    OPE IN
    OPE OUT
    OPE IN
    MVC OUT
    MVC IN
    MVC OUT
    MVC IN
    AFC OUT
    AFC IN
    AFC OUT
    AFC IN
    AFC OUT
    AFC IN
    AFC OUT
    AFC IN
    AFC OUT
    AFC IN
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Below I attach dmesg log and source file:

    sound_card_lit.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    #--- sudo zcat /proc/config.gz | egrep -i 'tas2562 ---#
    CONFIG_SND_SOC_TAS2562=y
    CONFIG_TAS2562_REGMAP=y
    CONFIG_TAS2562_CODEC=y
    #--- sudo cat /proc/asound/cards ---#
    0 [tegrahda ]: tegra-hda - tegra-hda
    tegra-hda at 0x70038000 irq 82
    1 [tegrasndt210ref]: tegra-snd-t210r - tegra-snd-t210ref-mobile-TAS2xx
    tegra-snd-t210ref-mobile-TAS2xxx_AMP
    #--- sudo zcat /proc/config.gz | grep CONFIG_SND_SOC_SPDIF ---#
    CONFIG_SND_SOC_SPDIF=y
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    tas2562.h
    tas2562-codec.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /*
    ** =============================================================================
    ** Copyright (c) 2016 Texas Instruments Inc.
    **
    ** This program is free software; you can redistribute it and/or modify it under
    ** the terms of the GNU General Public License as published by the Free Software
    ** Foundation; version 2.
    **
    ** This program is distributed in the hope that it will be useful, but WITHOUT
    ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    ** FOR A PARTICULAR PURPOSE.See the GNU General Public License for more details.
    **
    ** File:
    ** tas2562-codec.c
    **
    ** Description:
    ** ALSA SoC driver for Texas Instruments TAS2562 High Performance 4W Smart
    ** Amplifier
    **
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    tas2562-codec.h
    tas2562-misc.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /*
    ** =============================================================================
    ** Copyright (c) 2016 Texas Instruments Inc.
    **
    ** This program is free software; you can redistribute it and/or modify it under
    ** the terms of the GNU General Public License as published by the Free Software
    ** Foundation; version 2.
    **
    ** This program is distributed in the hope that it will be useful, but WITHOUT
    ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    ** FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    ** File:
    ** tas2562-misc.c
    **
    ** Description:
    ** misc driver for Texas Instruments TAS2562 High Performance 4W Smart Amplifier
    **
    ** =============================================================================
    */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    tas2562-misc.h
    tas2562-regmap.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /*
    * ALSA SoC Texas Instruments TAS2562 High Performance 4W Smart Amplifier
    *
    * Copyright (C) 2016 Texas Instruments, Inc.
    *
    * Author: saiprasad
    *
    * This package is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License version 2 as
    * published by the Free Software Foundation.
    *
    * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    *
    */
    #ifdef CONFIG_TAS2562_REGMAP
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    tegra_machine_driver_mobile.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /*
    * tegra_machine_driver_mobile.c - Tegra ASoC Machine driver for mobile
    *
    * Copyright (c) 2017-2021 NVIDIA CORPORATION. All rights reserved.
    *
    * This program is free software; you can redistribute it and/or modify it
    * under the terms and conditions of the GNU General Public License,
    * version 2, as published by the Free Software Foundation.
    *
    * This program is distributed in the hope it will be useful, but WITHOUT
    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
    * more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with this program. If not, see <http://www.gnu.org/licenses/>.
    */
    #include <linux/module.h>
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Could you check again what is incorrect set?

  • Hi Mateus,

    During playback, I2S signal must work. It is correct the I2C is quiet. I think there is wrong setting from the platform side, as you know, tas2110 is a slave device, it depends on the correct clk from master side. Kindly consult the platform vendor.

    BR

    Shenghao Ding