[TLV320AIC23] [AM3517EVM][AUDIO] codec name mis-match in soc_bind_dai_link

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi
I'm trying to get audio working on the TI AM3517EVM (which uses the tlv320aic23) on the 2.6.37, and I get the following error message while trying to bind:
	CODEC tlv320aic23-codec not registered
This is despite of the having gotten this msg before:
	Registered codec 'tlv320aic23-codec.2-001a'
Digging deeper and putting a printk in soc_bind_dai_link(),I realized that while finding this codec from the registered codecs, the names were not matching:
soc_bind_dai_link:1249:codec->name is tlv320aic23-codec.2-001a, dai_link->codec_name is tlv320aic23-codec

Now, I realized that earlier while calling snd_soc_register_codec() from tlv320aic23_codec_probe(), the dev is passed in as the i2c client device and the name of this device is 2-001a (I2C ID 0x1a on i2c bus 2), this I think is the name generated by the i2c client from the following board-info entry (in arch/arm/mach-omap2/board-am3517evm.c) :
	static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = {
        {
                I2C_BOARD_INFO("tlv320aic23", 0x1A),
        },

Now, when assigning the name to the codec through fmt_single_name(), the else of the following is getting taken:

	found = strstr(name, dev->driver->name);
	if (found) {
	:
	} else {
	:
		snprintf(tmp, NAME_SIZE, "%s.%s", dev->driver->name, name);
	:

This prepends the driver name (I,e. tlv320aic23-codec) to the device name ( 2-001a) and registers the codec with that name. While, during snd_soc_register_card(),dai_link->codec_name is taken from its init value in sound/soc/omap/am3517evm.c :
	static struct snd_soc_dai_link am3517evm_dai = {
			:
      	  .codec_name = "tlv320aic23-codec",
			:
	};
Now, this whole sequence used to work fine on 2.6.32. So, my question is where/why is this change that automatically assigns the device ID, because of which the else in the "if (found)" tends to be taken and finally there is a name mismatch.

On Omap3 EVM (which uses the TWL4030 codec - sound/soc/codecs/twl4030.c), this works fine as:
	snd_soc_register_codec(&pdev->dev, &soc_codec_dev_twl4030,
                        twl4030_dai, ARRAY_SIZE(twl4030_dai));
Is called instead of 
	snd_soc_register_codec(&i2c->dev,
                        &soc_codec_dev_tlv320aic23, &tlv320aic23_dai, 1);
as in tlv320aic23 (sound/soc/codecs/tlv320aic23.c).
If I force the names to match (e,g. by appending 2-001a to am3517evm_dai.codec_name) - the card gets registered and I can see the device nodes getting created.

-Abhilash



--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux