TK1 i2s asoc driver

Hi all!

I’m trying to interface TK1 with an external device that will feed audio via i2s to the TK1. Therefore, the TK1 will be the slave. I was trying to find how I’m going to do that and I’ve seen that there’s am asoc driver ‘tegra30-i2s’ that seems to implement what is needed.

The thing is that the external device is not a codec it’s always streaming audio data and the clocks, so no control data are needed; therefore I was thinking that this core i2s driver might work. The i2s channel I’m using is i2s3 (DAP4), so I’ve enabled in the device tree the corresponding feature.

tegra_i2s3: i2s@70301300 {
			compatible = "nvidia,tegra124-i2s";
			reg = <0x70301300 0x100>;
			nvidia,ahub-cif-ids = <7 7>;
			nvidia,ahub-i2s-id = <3>;
			status = "okay";
		};

Kernel seems that is registering all the i2s interfaces though and this is the registered devices

# find / -name tegra30*
/sys/bus/platform/devices/tegra30-avp-audio
/sys/bus/platform/devices/tegra30-ahub
/sys/bus/platform/devices/tegra30-dam.0
/sys/bus/platform/devices/tegra30-dam.1
/sys/bus/platform/devices/tegra30-dam.2
/sys/bus/platform/devices/tegra30-i2s.0
/sys/bus/platform/devices/tegra30-i2s.1
/sys/bus/platform/devices/tegra30-i2s.3
/sys/bus/platform/devices/tegra30-i2s.4
/sys/bus/platform/devices/tegra30-spdif
/sys/bus/platform/devices/tegra30-hda
/sys/bus/platform/drivers/tegra30-ahub
/sys/bus/platform/drivers/tegra30-ahub/tegra30-ahub
/sys/bus/platform/drivers/hda-platform/tegra30-hda
/sys/bus/platform/drivers/tegra30-dam
/sys/bus/platform/drivers/tegra30-dam/tegra30-dam.0
/sys/bus/platform/drivers/tegra30-dam/tegra30-dam.1
/sys/bus/platform/drivers/tegra30-dam/tegra30-dam.2
/sys/bus/platform/drivers/tegra30-i2s
/sys/bus/platform/drivers/tegra30-i2s/tegra30-i2s.0
/sys/bus/platform/drivers/tegra30-i2s/tegra30-i2s.1
/sys/bus/platform/drivers/tegra30-i2s/tegra30-i2s.3
/sys/bus/platform/drivers/tegra30-i2s/tegra30-i2s.4
/sys/devices/platform/tegra30-avp-audio
/sys/devices/platform/tegra30-ahub
/sys/devices/platform/tegra30-dam.0
/sys/devices/platform/tegra30-dam.1
/sys/devices/platform/tegra30-dam.2
/sys/devices/platform/tegra30-i2s.0
/sys/devices/platform/tegra30-i2s.1
/sys/devices/platform/tegra30-i2s.3
/sys/devices/platform/tegra30-i2s.4
/sys/devices/platform/tegra30-spdif
/sys/devices/platform/tegra30-hda
/sys/kernel/debug/asoc/tegra30-dam.2
/sys/kernel/debug/asoc/tegra30-dam.1
/sys/kernel/debug/asoc/tegra30-dam.0
/sys/kernel/debug/regmap/tegra30-i2s.4
/sys/kernel/debug/regmap/tegra30-i2s.3
/sys/kernel/debug/regmap/tegra30-i2s.1
/sys/kernel/debug/regmap/tegra30-i2s.0
/sys/kernel/debug/regmap/tegra30-dam.2
/sys/kernel/debug/regmap/tegra30-dam.1
/sys/kernel/debug/regmap/tegra30-dam.0
/sys/kernel/debug/regmap/tegra30-ahub-ahub
/sys/kernel/debug/regmap/tegra30-ahub-apbif

Also boot log displays only a single device for ALSA

[    6.178501] ALSA device list:
[    6.181484]   #0: HDA NVIDIA Tegra at 0x70038000 irq 113

What I don’t understand is, shouldn’t display also the i2s3 in there? As a separate audio device?
Also in my boot log I don’t see anywhere the MODULE_DESCRIPTION (“Tegra30 I2S ASoC driver”) from the sound/soc/tegra/tegra30_i2s.c driver. Usually, when a driver is loaded I see this description. Is that mean that the driver is not loaded?

Thanks in advance.

I don’t know about requirements to get ALSA to see the device, but if this is L4T on a regular Jetson you are missing an entry. On an R21.4 board I see this:

[    6.775468] ALSA device list:
[    6.780190]   #0: HDA NVIDIA Tegra at 0x70038000 irq 113
[    6.787433]   #1: tegra-rt5639

If this were a hotplug layer I’d say you simply lacked a driver to take responsibility for the device, thus the device is not listed…however, I don’t think there is anything “hotplug” for that i2s bus, so you may need to write some sort of “glue” to tell ALSA about the device…sorry, I don’t know specifically what that would be.

Hi linuxdev, thanks for your reply.
I’ve removed the rt5939 driver as it’s not used in this custom board.
Yeah, I know exactly what you mean, this glue I’m also trying to find out :p

It gets more complicated.

In the kernel source code, I see two I2S ASoC drivers. The one is the sound/soc/tegra/tegra30_i2s.c and the other one is the sound/soc/tegra30_i2s_alt.c. I haven’t found any documentation for these drivers. I suppose that to only use the I2S I need one of those. I’ve managed to make tegra30_i2s probe and the driver modules load

# lsmod
Module                  Size  Used by
snd_soc_tegra30_i2s    16560  0 
snd_soc_tegra30_spdif     5397  0 
snd_soc_tegra_utils     7172  1 snd_soc_tegra30_i2s
snd_soc_tegra_pcm       3381  2 snd_soc_tegra30_spdif,snd_soc_tegra30_i2s
snd_soc_tegra30_dam    10449  1 snd_soc_tegra30_i2s
snd_soc_tegra30_ahub    11218  3 snd_soc_tegra30_spdif,snd_soc_tegra30_dam,snd_soc_tegra30_i2s
regmap_mmio             2270  3 snd_soc_tegra30_ahub,snd_soc_tegra30_dam,snd_soc_tegra30_i2s
snd_soc_tegra_offload    11637  0 
snd_soc_spdif_tx        1811  0

I would also expect to see something in the devices

# aplay --ls  list-devices
**** List of PLAYBACK Hardware Devices ****
card 0: Tegra [HDA NVIDIA Tegra], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

But there’s nothing there.

Also, what trouble me is that this driver seems like it doesn’t support slave mode. Here in this code it forces the master function.

mask |= TEGRA30_I2S_CTRL_MASTER_ENABLE;
	switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
	case SND_SOC_DAIFMT_CBS_CFS:
		val |= TEGRA30_I2S_CTRL_MASTER_ENABLE;
		break;
	case SND_SOC_DAIFMT_CBM_CFM:
		val = 0;
		break;
	default:
		return -EINVAL;
	}

On the other hand, tegra30_i2s_alt, is quite different. It seems that is supporting SLAVE mode.

mask = TEGRA30_I2S_CTRL_MASTER_MASK;
	switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
	case SND_SOC_DAIFMT_CBS_CFS:
		val = TEGRA30_I2S_CTRL_SLAVE_ENABLE;
		break;
	case SND_SOC_DAIFMT_CBM_CFM:
		val = TEGRA30_I2S_CTRL_MASTER_ENABLE;
		break;
	default:
		return -EINVAL;
	}

On the other hand, because the device-tree doesn’t work, the of_match_device() function in tegra30_i2s_platform_probe(), always returns NULL (see line 619 in tegra30_i2s_alt.c). Therefore, the driver never loads. The same, of course, happens for tegra30_i2s, but in this case there’s an initialization code for this case.

Actually I’m really disappointed with the fact that the device-tree, doesn’t work!

This is my entry in the dts file

ahub@70300000 {
		status = "okay";
		i2s@70301100 {
			status = "okay";
		};
		i2s@70301300 {
			status = "okay";
		};
	};

Also in tegra124-soc.dtsi

tegra_i2s1: i2s@70301100 {
			compatible = "nvidia,tegra124-i2s";
			reg = <0x70301100 0x100>;
			nvidia,ahub-cif-ids = <5 5>;
			nvidia,ahub-i2s-id = <1>;
			status = "disabled";
		};

tegra_i2s3: i2s@70301300 {
			compatible = "nvidia,tegra124-i2s";
			reg = <0x70301300 0x100>;
			nvidia,ahub-cif-ids = <7 7>;
			nvidia,ahub-i2s-id = <3>;
			status = "disabled";
		};

But that doesn’t do anything, so all the of_match_device() functions that expect to find the .compatible string return always NULL. The only way to affect the I2S initialization is through the arch/arm/mach-tegra/devices.c and arch/arm/mach-tegra/board-ardbeg.c board files, but there are missing other initialization data.

Hi dimtass,

The thing is that the external device is not a codec it’s always streaming audio data and the clocks,
so no control data are needed; therefore I was thinking that this core i2s driver might work.
The i2s channel I’m using is i2s3 (DAP4),

From this description, there are something need to be done like below.
1, You can use kernel/sound/soc/tegra/tegra_rt5639.c as base to modify for your machine driver in ASoC.
2, You need a dummy codec as codec driver in ASoC for your external device.
3, Where to configure i2s is in board file arch/arm/mach-tegra/board-ardbeg.c via ardbeg_audio_pdata_rt5639
4, The code like sound/soc/tegra/tegra30_i2s.c …should not be touched. all things need be done are to modify codec driver, machine driver and board file.

Hi tedc, thanks for your reply.
Excuse me but I’m a bit confused, tegra_rt5639.c is the machine or the codec driver?
As I’ve understand the tegra_rt5639.c is the codec driver for rt5639. So, you mean that I need to create another c file (the dummy codec) and copy the parts I need from rt5639 and modify them. Is that right?
Or a modified rt5639.c will be my machine driver and I need to create a new dummy codec driver for that?

Thanks.

Hi dimtass,

nvl4t_docs/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide/l4t_asoc_driver.html could be a reference for your bringup and download it from http://developer.nvidia.com/embedded/dlc/l4t-documentation-24-1 although this document is for tx1. But still worth to take a look.

Hi tedc,

I’ve written a dummy codec and I’ve edited kernel/sound/soc/tegra/tegra_rt5639.c according to my needs. The problem I have is that although I register my device in arch/arm/mach-tegra/board-ardbed.c, I get an error that my codec is not register.

In arch/arm/mach-tegra/board-ardbed.c, I have these structs:

static struct tegra_asoc_platform_data ardbeg_audio_pdata_pcm271 = {
	.gpio_hp_det = -1,
	.gpio_ldo1_en = -1,
	.gpio_spkr_en = -1,
	.gpio_int_mic_en = -1,
	.gpio_ext_mic_en = -1,
	.gpio_hp_mute = -1,
	.gpio_codec1 = -1,
	.gpio_codec2 = -1,
	.gpio_codec3 = -1,
	.i2s_param[1]       = {	// 1= DAP2 -> I2S1
		.audio_port_id = 1,
		.is_i2s_master = 0,
		.i2s_mode = TEGRA_DAIFMT_I2S,
		.sample_size	= 32,
		.channels       = 8,
	},
	.i2s_param[3] = {// 3= DAP4 -> I2S3
			.audio_port_id = 3,
			.is_i2s_master = 0,
			.i2s_mode = TEGRA_DAIFMT_I2S,
			.sample_size	= 32,
			.channels       = 8,
	},
};

static struct platform_device ardbeg_audio_device_pcm271_codec = {
	.name = "tegra-snd-pcm271",
	.id = 0,
	.dev = {
		.platform_data = &ardbeg_audio_pdata_pcm271,
	},
};

In the same file in the tegra_ardbeg_late_init() function I register the device

ret = platform_device_register(&ardbeg_audio_device_pcm271_codec);

Also in ardbeg_audio_init() I set the 'codec_name and ‘codec_dai_name’

ardbeg_audio_pdata_pcm271.codec_name = "pcm271a.0-001a";
	ardbeg_audio_pdata_pcm271.codec_dai_name = "pcm271a-hifi";

In my modified sound/soc/tegra/tegra_rt5639.c file I have the following:

static struct snd_soc_ops tegra_pcm271_ops = {
	.hw_params = tegra_pcm271_hw_params,
	.hw_free = tegra_hw_free,
	.startup = tegra_pcm271_startup,
	.shutdown = tegra_pcm271_shutdown,
};

static struct snd_soc_dai_link tegra_pcm271_dai[NUM_DAI_LINKS] = {
	[DAI_LINK_I2S_A] = {
		.name = "pcm271a",
		.stream_name = "Playback",
		.codec_name = "pcm271a.0-001a",
		.platform_name = "tegra-pcm-audio",
		.cpu_dai_name = "tegra30-i2s.1",
		.codec_dai_name = "pcm271a-hifi",
		.init = tegra_pcm271_init,
		.ops = &tegra_pcm271_ops,
	},
};

static struct snd_soc_card snd_soc_tegra_pcm271 = {
	.name = "tegra-pcm271a",
	.owner = THIS_MODULE,
	.dai_link = tegra_pcm271_dai,
	.num_links = ARRAY_SIZE(tegra_pcm271_dai),
};

static const struct of_device_id tegra_rt5639_of_match[] = {
	{ .compatible = "nvidia,tegra-audio-rt5639", },
	{},
};

static struct platform_driver tegra_pcm271_driver = {
	.driver = {
		.name = DRV_NAME,
		.owner = THIS_MODULE,
		.pm = &snd_soc_pm_ops,
		.of_match_table = tegra_rt5639_of_match,
	},
	.probe = tegra_pcm271_driver_probe,
	.remove = tegra_pcm271_driver_remove,
};

static int __init tegra_rt5639_modinit(void)
{
	return platform_driver_register(&tegra_pcm271_driver);
}
module_init(tegra_rt5639_modinit);

static void __exit tegra_rt5639_modexit(void)
{
	platform_driver_unregister(&tegra_pcm271_driver);
}
module_exit(tegra_rt5639_modexit);

Of course, there is more code, but I’ve paste the significant changes.

So, when tegra_pcm271_driver_probe() is called, also snd_soc_register_card() is called, then snd_soc_instantiate_card() that calls the soc_bind_dai_link().

In soc_bind_dai_link() I print all the entries from ‘dai_list’, ‘codec_list’. In the output I only get these:

[    6.124775] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-spdif
[    6.133389] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.4
[    6.142002] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.3
[    6.150613] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.1
[    6.159224] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.0
[    6.167835] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-compr
[    6.176966] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-pcm
[    6.185924] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.194102] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.202286] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.210464] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: snd-soc-dummy-dai
[    6.219424] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.2
[    6.227255] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.1
[    6.235085] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.0
[    6.242916] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: snd-soc-dummy

Then I get an error:

[    6.250921] tegra-snd-pcm271 tegra-snd-pcm271.0: ASoC: CODEC pcm271a.0-001a not registered
[    6.259014] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: (0) soc_bind_dai_link(), ret: -517
[    6.267539] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: snd_soc_instantiate_card(), ret: -517
[    6.276352] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: snd_soc_register_card(): -517
[    6.284450] tegra-snd-pcm271 tegra-snd-pcm271.0: snd_soc_register_card failed (-517)
[    6.292046] platform tegra-snd-pcm271.0: Driver tegra-snd-pcm271 requests probe deferral

I think that I should also find my codec in the list, but I don’t. Is there something wrong with my procedure? How can I register my codec in tegra?

Thanks!

I had some progress with registering the driver, but I think that’s not the correct way to do it.
What I’ve done is to add the following in arch/arm/mach-tegra/board-ardbeg.c

struct platform_device pcm271_dit_driver = {
	.name = "pcm271a",
	.id = -1,
};

static struct tegra_asoc_platform_data ardbeg_audio_pdata_pcm271 = {
	.gpio_hp_det = -1,
	.gpio_ldo1_en = -1,
	.gpio_spkr_en = -1,
	.gpio_int_mic_en = -1,
	.gpio_ext_mic_en = -1,
	.gpio_hp_mute = -1,
	.gpio_codec1 = -1,
	.gpio_codec2 = -1,
	.gpio_codec3 = -1,
	.i2s_param[1]       = {	// 1= DAP2 -> I2S1
		.audio_port_id = 1,
		.is_i2s_master = 0,
		.i2s_mode = TEGRA_DAIFMT_I2S,
		.sample_size	= 32,
		.channels       = 8,
	},
	.i2s_param[3] = {// 3= DAP4 -> I2S3
			.audio_port_id = 3,
			.is_i2s_master = 0,
			.i2s_mode = TEGRA_DAIFMT_I2S,
			.sample_size	= 32,
			.channels       = 8,
	},
};

static void ardbeg_audio_init(void)
{
	ardbeg_audio_pdata_pcm271.codec_name = "pcm271a";
	ardbeg_audio_pdata_pcm271.codec_dai_name = "pcm271a-hifi";
}

static struct platform_device ardbeg_audio_device_pcm271_codec = {
	.name = "tegra-snd-pcm271",
	.id = 0,
	.dev = {
		.platform_data = &ardbeg_audio_pdata_pcm271,
	},
};


static void __init tegra_ardbeg_late_init(void)
{
...
	ret = platform_device_register(&pcm271_dit_driver);
	pr_info("pcm271-codec: register pcm271a codec, ret: %d\n", ret);
	ret = platform_device_register(&ardbeg_audio_device_pcm271_codec);
	pr_info("pcm271-driver: register pcm271a driver, ret: %d\n", ret);
...
}

My codec driver is the following one:

#include <asm/mach-types.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <sound/soc.h>
#include <sound/pcm.h>
#include <sound/initval.h>


static int pcm271_codec_probe(struct snd_soc_codec *codec)
{
	codec->dapm.idle_bias_off = 1;
	return 0;
}

static int pcm271_codec_write(struct snd_soc_codec * codec, unsigned int reg,
							unsigned int val){
	return 0;
}

static unsigned int pcm271_codec_read(struct snd_soc_codec *codec, unsigned int reg) {
	return 0;
}

static struct snd_soc_codec_driver soc_codec_dev_pcm271 = {
	.probe = pcm271_codec_probe,
	.read = pcm271_codec_read,
	.write = pcm271_codec_write,
};

static struct snd_soc_dai_driver pcm271_codec_dai = {
	.name		= "pcm271a-hifi",
	.playback 	= {
		.stream_name	= "Playback",
		.channels_min	= 2,
		.channels_max	= 2,
		.rates		= SNDRV_PCM_RATE_96000,
		.formats	= SNDRV_PCM_FMTBIT_FLOAT_LE,
	},
	.capture	= {
		.stream_name	= "Capture",
		.channels_min	= 8,
		.channels_max	= 8,
		.rates		= SNDRV_PCM_RATE_96000,
		.formats	= SNDRV_PCM_FMTBIT_FLOAT_LE,
	},
};

static int pcm271_dit_probe(struct platform_device *pdev)
{
	int ret = snd_soc_register_codec(&pdev->dev,
			&soc_codec_dev_pcm271, &pcm271_codec_dai, 1);
	dev_info(NULL, "pcm271-codec: probe res: %d\n", ret);
	return ret;
}

static int pcm271_dit_remove(struct platform_device *pdev)
{
	dev_info(NULL, "pcm271-codec: remove\n");
	snd_soc_unregister_codec(&pdev->dev);
	return 0;
}

/**
 * I2S Digital audio Interface Transmittion (DIT) device
 */
static struct platform_driver pcm271_dit_driver = {
	.driver		= {
		.name	= "pcm271a",
		.owner	= THIS_MODULE,
	},
	.probe		= pcm271_dit_probe,
	.remove		= pcm271_dit_remove,
};

#ifdef CONFIG_OF
static const struct of_device_id pcm271_codec_dt_ids[] = {
	{ .compatible = "midas,pcm271a", },
	{ }
};
MODULE_DEVICE_TABLE(of, pcm271_codec_dt_ids);
#endif

module_platform_driver(pcm271_dit_driver);

MODULE_DESCRIPTION("PCM271A ASoC driver (pcm271a)");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" DRV_NAME);

And in sound/soc/tegra/tegra_rt5639.c I’ve change several things, but the important ones are the following:

static struct snd_soc_dai_link tegra_pcm271_dai[NUM_DAI_LINKS] = {
	[DAI_LINK_I2S_A] = {
		.name = "PCM271A",
		.stream_name = "Playback",
		.codec_name = "pcm271a",
		.platform_name = "tegra-pcm-audio",
		.cpu_dai_name = "tegra30-i2s.1",
		.codec_dai_name = "pcm271a-hifi",
		.init = tegra_pcm271_init,
		.ops = &tegra_pcm271_ops,
	},
}

static struct snd_soc_card snd_soc_tegra_pcm271 = {
	.name = "tegra-pcm271a",
	.owner = THIS_MODULE,
	.dai_link = tegra_pcm271_dai,
	.num_links = ARRAY_SIZE(tegra_pcm271_dai),
}

static const struct of_device_id tegra_rt5639_of_match[] = {
	{ .compatible = "nvidia,tegra-audio-rt5639", },
	{},
};

static struct platform_driver tegra_pcm271_driver = {
	.driver = {
		.name = DRV_NAME,
		.owner = THIS_MODULE,
		.pm = &snd_soc_pm_ops,
		.of_match_table = tegra_rt5639_of_match,
	},
	.probe = tegra_pcm271_driver_probe,
	.remove = tegra_pcm271_driver_remove,
};

static int __init tegra_rt5639_modinit(void)
{
	return platform_driver_register(&tegra_pcm271_driver);
}
module_init(tegra_rt5639_modinit);

static void __exit tegra_rt5639_modexit(void)
{
	platform_driver_unregister(&tegra_pcm271_driver);
}
module_exit(tegra_rt5639_modexit);

MODULE_DESCRIPTION("Tegra+pcm271a machine ASoC driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" DRV_NAME);

Now when the kernel boots I can see both the codec and the DAI:

[    6.040879] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: snd_soc_register_card()
[    6.048885] tegra-snd-pcm271 tegra-snd-pcm271.0: codec name: pcm271a
[    6.055330] tegra-snd-pcm271 tegra-snd-pcm271.0: codec dai name: pcm271a-hifi
[    6.062554] tegra-snd-pcm271 tegra-snd-pcm271.0: platform name: tegra30-i2s.0
[    6.069777] tegra-snd-pcm271 tegra-snd-pcm271.0: cpu name: (null)
[    6.075982] tegra-snd-pcm271 tegra-snd-pcm271.0: ASoC: binding PCM271A at idx 0
[    6.083295] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-spdif
[    6.092167] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.4
[    6.101039] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.3
[    6.109913] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.1
[    6.118785] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.0
[    6.127655] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-compr
[    6.137048] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-pcm
[    6.146265] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: pcm271a-hifi
[    6.155050] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.163488] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.171933] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.180371] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: snd-soc-dummy-dai
[    6.189591] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: pcm271a
[    6.197336] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.2
[    6.205427] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.1
[    6.213516] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.0
[    6.221605] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: snd-soc-dummy
[    6.229870] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-spdif
[    6.238394] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.4
[    6.246916] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.3
[    6.255440] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.1
[    6.263964] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.0
[    6.272487] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra-offload
[    6.281010] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: snd-soc-dummy
[    6.290160] tegra-snd-pcm271 tegra-snd-pcm271.0:  pcm271a-hifi <-> tegra30-i2s.0 mapping ok
[    6.299377] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271: snd_soc_register_card: 0
[    6.306877] sysedp_create_consumer: unable to create speaker, no consumer_data for speaker found
[    6.315491] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: probe finished

And when if I list the alsa devices I get:

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Tegra [HDA NVIDIA Tegra], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrapcm271a [tegra-pcm271a], device 0: Playback pcm271a-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Now, the thing is that if in arch/arm/mach-tegra/board-ardbeg.c I change the codec name in the ardbeg_audio_pdata_pcm271 struct, then the ASOC driver fails to load, eg:

static void ardbeg_audio_init(void)
{
	ardbeg_audio_pdata_pcm271.codec_name = "pcm271a.c001";
	ardbeg_audio_pdata_pcm271.codec_dai_name = "pcm271a-hifi";
}

That will return an error that the ‘ASoC: CODEC pcm271a.c001 not registered’. Why is that happens? Shouldn’t snd_soc_dai_link.name in sound/soc/tegra/tegra_rt5639.c be a random name? It supposed to be a random name in there and only ‘snd_soc_dai_link.codec_name’, ‘snd_soc_dai_link.stream_name’, ‘snd_soc_dai_link.cpu_dai_name’ and ‘snd_soc_dai_link.codec_dai_name’ point to the codec and cpu names.

It seems like the registration is correct.

Any ideas?

P.S. I don’t get audio yet.

Hi dimtass,
Do you replace the name in tegra_rt5639.c also?
.codec_name = “rt5639.0-001c” → “pcm271a.c001”

Hi dimtass,
There are config files at
/etc/udev/rules.d/90-alsa-asound-tegra.rules
/etc/asound.conf.tegrart5639

Please also check if it requires modification.

Hi DaneLLL and thank you for your response. After some struggling I’ve managed to implement my own codec and driver and it seems to be working. I haven’t test it yet with the real hardware but at least from the kernel side everything seems to be working.

The problem was mainly with the naming and how the codec and the driver are registered in the board-ardbeg.c

Therefore, for the following snd_soc_dai_driver in the codec

static struct snd_soc_dai_driver pcm271_codec_dai[] = {
	// This is the Tegra's DAP2 interface (tegra30-i2s.1)
	{
		.name		= "pcm271a-hifi1",
		.id = 0,
		.playback 	= {
			.stream_name	= "I2S1 Playback",
			.channels_min	= 2,
			.channels_max	= 8,
			.rates		= SNDRV_PCM_RATE_96000,
			.formats	= SNDRV_PCM_FMTBIT_S32_LE,
		},
		.capture	= {
			.stream_name	= "I2S1 Capture",
			.channels_min	= 2,
			.channels_max	= 8,
			.rates		= SNDRV_PCM_RATE_96000,
			.formats	= SNDRV_PCM_FMTBIT_S32_LE,
		},
	},
	// This is the Tegra's DAP4 interface (tegra30-i2s.3)
	{
		.name		= "pcm271a-hifi2",
		.id = 1,
		.playback 	= {
			.stream_name	= "I2S3 Playback",
			.channels_min	= 2,
			.channels_max	= 8,
			.rates		= SNDRV_PCM_RATE_96000,
			.formats	= SNDRV_PCM_FMTBIT_S32_LE,
		},
		.capture	= {
			.stream_name	= "I2S3 Capture",
			.channels_min	= 2,
			.channels_max	= 8,
			.rates		= SNDRV_PCM_RATE_96000,
			.formats	= SNDRV_PCM_FMTBIT_S32_LE,
		},
	},
};

the correct snd_soc_dai_link is the following:

static struct snd_soc_dai_link tegra_pcm271_dai[4] = {
	[0] = {
		.name = "PCM271A-1-p",
		.stream_name = "I2S1 Playback",
		.codec_name = "pcm271a",
		.platform_name = "tegra30-i2s.1",
		.cpu_dai_name = "tegra30-i2s.1",
		.codec_dai_name = "pcm271a-hifi1",
		.init = tegra_pcm271_init,
		.ops = &tegra_pcm271_ops,
	},
	[1] = {
		.name = "PCM271A-1-c",
		.stream_name = "I2S1 Capture",
		.codec_name = "pcm271a",
		.platform_name = "tegra30-i2s.1",
		.cpu_dai_name = "tegra30-i2s.1",
		.codec_dai_name = "pcm271a-hifi1",
		.ops = &tegra_pcm271_ops,
	},

	[2] = {
		.name = "PCM271A-2-p",
		.stream_name = "I2S3 Playback",
		.codec_name = "pcm271a",
		.platform_name = "tegra30-i2s.3",
		.cpu_dai_name = "tegra30-i2s.3",
		.codec_dai_name = "pcm271a-hifi2",
		.ops = &tegra_pcm271_ops,
	},

	[3] = {
		.name = "PCM271A-2-c",
		.stream_name = "I2S3 Capture",
		.codec_name = "pcm271a",
		.platform_name = "tegra30-i2s.3",
		.cpu_dai_name = "tegra30-i2s.3",
		.codec_dai_name = "pcm271a-hifi2",
		.ops = &tegra_pcm271_ops,
	},
};

And finally both the dummy codec and the driver need to be registered in the tegra_ardbeg_late_init() in board-ardbeg.c

So the hassle was with the names between the codec and the driver and how the L4T needs the devices to be registered in board-ardbeg.c

So after these changes now I get:

[    0.120367] pcm271-codec: register pcm271a codec, ret: 0
[    0.120452] pcm271-driver: register pcm271a driver, ret: 0
[    5.867578] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: probe
[    5.874283] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: initializing tools: 0
[    6.025224] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: snd_soc_card_set_drvdata
[    6.033316] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: set I2S modes and clocks
[    6.041409] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: card name: tegra-pcm271
[    6.049414] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: card dai links: 4
[    6.056898] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: codec name: pcm271a
[    6.064556] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: snd_soc_register_card()
[    6.072560] tegra-snd-pcm271 tegra-snd-pcm271.0: codec name: pcm271a
[    6.079003] tegra-snd-pcm271 tegra-snd-pcm271.0: codec dai name: pcm271a-hifi1
[    6.086314] tegra-snd-pcm271 tegra-snd-pcm271.0: platform name: tegra30-i2s.1
[    6.093541] tegra-snd-pcm271 tegra-snd-pcm271.0: cpu name: (null)
[    6.099726] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: codec name: pcm271a
[    6.107383] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: snd_soc_register_card()
[    6.115388] tegra-snd-pcm271 tegra-snd-pcm271.0: codec name: pcm271a
[    6.121831] tegra-snd-pcm271 tegra-snd-pcm271.0: codec dai name: pcm271a-hifi1
[    6.129142] tegra-snd-pcm271 tegra-snd-pcm271.0: platform name: tegra30-i2s.1
[    6.136365] tegra-snd-pcm271 tegra-snd-pcm271.0: cpu name: (null)
[    6.142549] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: codec name: pcm271a
[    6.150206] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: snd_soc_register_card()
[    6.158217] tegra-snd-pcm271 tegra-snd-pcm271.0: codec name: pcm271a
[    6.164661] tegra-snd-pcm271 tegra-snd-pcm271.0: codec dai name: pcm271a-hifi2
[    6.171972] tegra-snd-pcm271 tegra-snd-pcm271.0: platform name: tegra30-i2s.3
[    6.179196] tegra-snd-pcm271 tegra-snd-pcm271.0: cpu name: (null)
[    6.185379] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: codec name: pcm271a
[    6.193037] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: snd_soc_register_card()
[    6.201040] tegra-snd-pcm271 tegra-snd-pcm271.0: codec name: pcm271a
[    6.207484] tegra-snd-pcm271 tegra-snd-pcm271.0: codec dai name: pcm271a-hifi2
[    6.214795] tegra-snd-pcm271 tegra-snd-pcm271.0: platform name: tegra30-i2s.3
[    6.222018] tegra-snd-pcm271 tegra-snd-pcm271.0: cpu name: (null)
[    6.228231] tegra-snd-pcm271 tegra-snd-pcm271.0: ASoC: binding PCM271A-1-p at idx 0
[    6.235891] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-spdif
[    6.244764] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.4
[    6.253635] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.3
[    6.262507] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.1
[    6.271379] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.0
[    6.280250] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-compr
[    6.289644] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-pcm
[    6.298863] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: pcm271a-hifi2
[    6.307734] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: pcm271a-hifi1
[    6.316606] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.325043] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.333481] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.341919] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: snd-soc-dummy-dai
[    6.351138] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: pcm271a
[    6.358882] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.2
[    6.366973] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.1
[    6.375064] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.0
[    6.383155] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: snd-soc-dummy
[    6.391421] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-spdif
[    6.399945] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.4
[    6.408469] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.3
[    6.417001] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.1
[    6.624504] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.0
[    6.633038] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra-offload
[    6.641580] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: snd-soc-dummy
[    6.650123] tegra-snd-pcm271 tegra-snd-pcm271.0: ASoC: binding PCM271A-1-c at idx 1
[    6.657784] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-spdif
[    6.666659] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.4
[    6.675541] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.3
[    6.684415] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.1
[    6.693287] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.0
[    6.702161] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-compr
[    6.711556] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-pcm
[    6.720776] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: pcm271a-hifi2
[    6.729735] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: pcm271a-hifi1
[    6.738613] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.747054] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.755495] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.763933] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: snd-soc-dummy-dai
[    6.773155] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: pcm271a
[    6.780902] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.2
[    6.788996] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.1
[    6.797095] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.0
[    6.805188] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: snd-soc-dummy
[    6.813456] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-spdif
[    6.821982] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.4
[    6.830509] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.3
[    6.839035] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.1
[    6.847561] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.0
[    6.856094] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra-offload
[    6.864621] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: snd-soc-dummy
[    6.873149] tegra-snd-pcm271 tegra-snd-pcm271.0: ASoC: binding PCM271A-2-p at idx 2
[    6.880810] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-spdif
[    6.889683] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.4
[    6.898557] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.3
[    6.907430] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.1
[    6.916302] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.0
[    6.925175] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-compr
[    6.934574] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-pcm
[    6.943793] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: pcm271a-hifi2
[    6.952668] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: pcm271a-hifi1
[    6.961541] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.969982] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.978422] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    6.986863] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: snd-soc-dummy-dai
[    6.996091] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: pcm271a
[    7.003835] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.2
[    7.011929] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.1
[    7.020022] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.0
[    7.028117] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: snd-soc-dummy
[    7.036384] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-spdif
[    7.044911] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.4
[    7.053439] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.3
[    7.061965] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.1
[    7.070492] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.0
[    7.079019] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra-offload
[    7.087545] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: snd-soc-dummy
[    7.096072] tegra-snd-pcm271 tegra-snd-pcm271.0: ASoC: binding PCM271A-2-c at idx 3
[    7.103730] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-spdif
[    7.112603] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.4
[    7.121477] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.3
[    7.130352] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.1
[    7.139225] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra30-i2s.0
[    7.148100] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-compr
[    7.157494] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: tegra-offload-pcm
[    7.166715] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: pcm271a-hifi2
[    7.175589] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: pcm271a-hifi1
[    7.184462] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    7.192908] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    7.201350] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: dit-hifi
[    7.209791] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: CPU DAI name found: snd-soc-dummy-dai
[    7.219012] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: pcm271a
[    7.226759] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.2
[    7.234852] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.1
[    7.242945] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: spdif-dit.0
[    7.251038] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: Codec found: snd-soc-dummy
[    7.259306] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-spdif
[    7.267833] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.4
[    7.276359] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.3
[    7.284885] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.1
[    7.293411] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra30-i2s.0
[    7.301937] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: tegra-offload
[    7.310464] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: platform found: snd-soc-dummy
[    7.319612] tegra-snd-pcm271 tegra-snd-pcm271.0:  pcm271a-hifi1 <-> tegra30-i2s.1 mapping ok
[    7.328528] tegra-snd-pcm271 tegra-snd-pcm271.0:  pcm271a-hifi1 <-> tegra30-i2s.1 mapping ok
[    7.337430] tegra-snd-pcm271 tegra-snd-pcm271.0:  pcm271a-hifi2 <-> tegra30-i2s.3 mapping ok
[    7.346327] tegra-snd-pcm271 tegra-snd-pcm271.0:  pcm271a-hifi2 <-> tegra30-i2s.3 mapping ok
[    7.356703] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271: snd_soc_register_card: 0
[    7.364205] sysedp_create_consumer: unable to create speaker, no consumer_data for speaker found
[    7.372821] tegra-snd-pcm271 tegra-snd-pcm271.0: pcm271-driver: probe finished
[    7.912470] ALSA device list:
[    7.915448]   #0: HDA NVIDIA Tegra at 0x70038000 irq 113
[    7.920780]   #1: tegra-pcm271
root@test:~# aplay --list-devices
**** List of PLAYBACK Hardware Devices ****
card 0: Tegra [HDA NVIDIA Tegra], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrapcm271 [tegra-pcm271], device 0: I2S1 Playback pcm271a-hifi1-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrapcm271 [tegra-pcm271], device 1: I2S1 Capture pcm271a-hifi1-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrapcm271 [tegra-pcm271], device 2: I2S3 Playback pcm271a-hifi2-2 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrapcm271 [tegra-pcm271], device 3: I2S3 Capture pcm271a-hifi2-3 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0