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.

TLV320DAC3100 Audio routing or Serializer Problem -- Card detected but NO SOUND

Other Parts Discussed in Thread: TLV320DAC3100

we taken tlv320aic31xx.c as the reference for the tlv320dac3100. Sound card is registered -- we are getting Audio routing problems and regulator and Remote IO error , below is the log:

tlv320aic31xx-codec 1-0018: ASoC: no sink widget found for HPLOUT
[    2.606112] tlv320aic31xx-codec 1-0018: ASoC: Failed to add route Output Left -> Switch -> HPLOUT
[    2.620089] tlv320aic31xx-codec 1-0018: ASoC: no sink widget found for HPROUT
[    2.627722] tlv320aic31xx-codec 1-0018: ASoC: Failed to add route Output Right -> Switch -> HPROUT
[    2.637300] evm_aic3x_init,np->name: sound : full name : /sound
[    2.643646] evm_aic3x_init,ret:0
[    2.647150] tlv320aic31xx-codec 1-0018: ASoC: DAPM unknown pin MONO_LOUT
[    2.654261] tlv320aic31xx-codec 1-0018: ASoC: DAPM unknown pin HPLCOM
[    2.661152] tlv320aic31xx-codec 1-0018: ASoC: DAPM unknown pin HPRCOM
[    2.670229] davinci_evm sound.12: tlv320aic31xx-hifi <-> 4803c000.mcasp mapping ok


[    2.680792] tlv320aic31xx-codec 1-0018: Failed to restore cache: -121
why this error is coming i am not getting : in the code it is related to regmap:

[    2.885829] ALSA device list:
[    2.889089]   #0: AM335x-EVMSK
 

[    4.549612] Error: Driver 'tlv320aic31xx-codec' is already registered, aborting...


[    4.786730] Error: Driver 'davinci-mcasp' is already registered, aborting...
[    5.614910] Error: Driver 'davinci_evm' is already registered, aborting...

ALSA: Restoring mixer settings...
No state is present for card AM335xEVMSK    ----- this
Found hardware: "AM335x-EVMSK" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card AM335xEVMSK   -- and this   -- why two times this error was came --

As the card is loaded why this "NO State for card " error is occurring -- some thing  we are missing -- in the setting or any configuration issue is there ???

--Please help in this --

in the dts file we given the audio routing as :

        ti,audio-routing =
            "Headphone Jack",       "HPL",
            "Headphone Jack",       "HPR";

serializer :

serial-dir = <    /* 0: INACTIVE, 1: TX, 2: RX */    
        0 0 1 2                               -- we are using AXR2 as transmit and which is a DIN pin to the codec.
    >;

one more error:

[    2.680792] tlv320aic31xx-codec 1-0018: Failed to restore cache: -121
why this error is coming i am not getting : in the code it is related to regmap: 

in the the codec drvier: tlv320aic31xx.c  --code -- please let me know anything we are missing here ???

regcache_cache_only(aic31xx->regmap, false);
    ret = regcache_sync(aic31xx->regmap);
    if (ret != 0) {
        dev_err(codec->dev,
            "Failed to restore cache: %d\n", ret);
        regcache_cache_only(aic31xx->regmap, true);
        regulator_bulk_disable(ARRAY_SIZE(aic31xx->supplies),
                       aic31xx->supplies);
        return ret;
    }

Thanks in advance ... waiting for the reply from anyone..

regards,

Viswanath K.

  • i forgot to mention one more point :

    tlv320aic31xx-codec 1-0018: ASoC: no sink widget found for HPLOUT
    [ 2.606112] tlv320aic31xx-codec 1-0018: ASoC: Failed to add route Output Left -> Switch -> HPLOUT
    [ 2.620089] tlv320aic31xx-codec 1-0018: ASoC: no sink widget found for HPROUT
    [ 2.627722] tlv320aic31xx-codec 1-0018: ASoC: Failed to add route Output Right -> Switch -> HPROUT
    In DTS Audio routing is given as:
    ti,audio-routing =
    "Headphone Jack", "HPL",
    "Headphone Jack", "HPR";

    HPL and HPR because it is given in the codec driver: tlv320aic31xx.c -in this structure it is given like this
    static const struct snd_soc_dapm_widget aic31xx_dapm_widgets

    SND_SOC_DAPM_OUTPUT("HPL"),
    SND_SOC_DAPM_OUTPUT("HPR"),

    Please help me in this audio routing -- issue
    -----------------------------------------------------------------------------------

    and this below log is coming from davinci-evm.c : evm_aic3x_init function -- this is might because , they written this one for
    tlv320aix3106 -- in and the codec driver is tlv320aic3x.c -- can we neglect this error .. ???

    [ 2.647150] tlv320aic31xx-codec 1-0018: ASoC: DAPM unknown pin MONO_LOUT
    [ 2.654261] tlv320aic31xx-codec 1-0018: ASoC: DAPM unknown pin HPLCOM
    [ 2.661152] tlv320aic31xx-codec 1-0018: ASoC: DAPM unknown pin HPRCOM
  • Some how few error logs are went out :
    tlv320aic31xx-codec 1-0018: ASoC: no sink widget found for HPLOUT
    [ 2.606112] tlv320aic31xx-codec 1-0018: ASoC: Failed to add route Output Left -> Switch -> HPLOUT
    [ 2.620089] tlv320aic31xx-codec 1-0018: ASoC: no sink widget found for HPROUT
    [ 2.627722] tlv320aic31xx-codec 1-0018: ASoC: Failed to add route Output Right -> Switch -> HPROU

    ----- modifications are in tlv320aic31xx.c in codecs:
    /* HPL path */
    {"HPLOUT", "Switch", "Output Left"},
    {"HPL Driver", NULL, "HP Left"},
    {"HPLOUT", NULL, "HPL Driver"}, // HPL to HPLOUT i done so that that log went off -- dts and davinci-evm.c also having HPLOUT

    /* HPR path */
    {"HPROUT", "Switch", "Output Right"},
    {"HPR Driver", NULL, "HP Right"},
    {"HPROUT", NULL, "HPR Driver"}, // same as above comment modified.

    I dont know is it right or wrong -- plz correct if i am wrong ---- and the last one is :
    [ 2.615815] davinci_evm sound.12: tlv320aic31xx-hifi <-> 4803c000.mcasp mapping ok

    [ 2.626516] tlv320aic31xx-codec 1-0018: Failed to restore cache: -121 -- this one i dont know how to fix in the tlv320aic31xx.c
    this is the code for the above log:
    static int aic31xx_power_on(struct snd_soc_codec *codec)
    {
    struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec);
    int ret = 0;

    ret = regulator_bulk_enable(ARRAY_SIZE(aic31xx->supplies),
    aic31xx->supplies);
    if (ret)
    return ret;

    if (gpio_is_valid(aic31xx->pdata.gpio_reset)) {
    gpio_set_value(aic31xx->pdata.gpio_reset, 1);
    udelay(100);
    }
    regcache_cache_only(aic31xx->regmap, false);
    ret = regcache_sync(aic31xx->regmap);
    if (ret != 0) {
    dev_err(codec->dev,
    "Failed to restore cache: %d\n", ret);
    regcache_cache_only(aic31xx->regmap, true);
    regulator_bulk_disable(ARRAY_SIZE(aic31xx->supplies),
    aic31xx->supplies);
    return ret;
    }
    return 0;
    }

    We are getting this error "Failed to restore cache"
    if i comment this few lines of code this is effecting in as a remote IO error after the card has been registered with ALSA cards list.
    the max reg's are like 12* 128 means : 12 pages and each page has 128 registers.

    here i am unable to fix the solution.... plz any one ... help or any way plz suggest us...

    regmap in tlv320aic31xx.c :
    struct regmap_config aic31xx_i2c_regmap = {
    .reg_bits = 8,
    .val_bits = 8,
    .writeable_reg = aic31xx_writeable,
    .volatile_reg = aic31xx_volatile,
    .reg_defaults = aic31xx_reg_defaults,
    .num_reg_defaults = ARRAY_SIZE(aic31xx_reg_defaults),

    .cache_type = REGCACHE_RBTREE,
    .ranges = aic31xx_ranges,
    .num_ranges = ARRAY_SIZE(aic31xx_ranges),
    .max_register = 12 * 128,
    };

    aic31xx_i2c_probe ---- function ---
    regmap_config = &aic31xx_i2c_regmap;

    aic31xx = devm_kzalloc(&i2c->dev, sizeof(*aic31xx), GFP_KERNEL);
    if (aic31xx == NULL)
    return -ENOMEM;

    aic31xx->regmap = devm_regmap_init_i2c(i2c, regmap_config);
  • This issue is fixed: it is because of configuration in the dts file. we are using i2c-0 bus but the codec details given in i2c-1 -- so that it is throwing the error.

    As we changed to i2c-0 bus config- strucuture so that the error is fixed.

    BUT we are NOT getting SOUND. not getting how to trace from here. as we are using tlc320aic31xx.c driver as the reference we took for the tlv320dac3100.

    in this only ADC-gain -cnrl page 4-5 is only extra remaining all are same.  Please kindly help me here. 

    regards,

    Viswanath K