Hi everybody,
I want to use RT5639 on tx2.
I tried the following steps to get the codec running:
- I activated the rt5640.c driver in the kernel.
- I added the codec to the device tree:
gpio@2200000 {
aud_rst {
gpio-hog;
gpios = <0x12 0x4e 0>;
output-high;
label = "audio reset";
status = "okay";
};
};
i2c@c240000 {
rt5640_codec:rt5640.1-001c@1c {
compatible = "realtek,rt5640";
reg = <0x1c>;
status = "okay";
gpios = <0x12 0x4d 0x0>;
realtek,jd-src = <0x1>;
realtek,ldo1-en-gpios = <0x12 0x4e 0x0>;
realtek,dmic1-data-pin = <0x2>;
};
};
sound {
#stream-id-cells = <0x1>;
status = "okay";
compatible = "nvidia,tegra-audio-t186ref-mobile-rt565x";
nvidia,model = "tegra-snd-t186ref-mobile-rt565x";
nvidia,num-codec-link = <0xd>;
nvidia,num-clk = <0x8>;
nvidia,hp-det-gpios = <0x12 0x4d 0x0>;
nvidia,ldo-gpios = <0x12 0x4e 0x0>;
nvidia,clk-rates = <0x10266000 0xac4400 0x2b11000 0x2b11000 0xea60000 0xbb8000 0x2ee0000 0x2ee0000>;
clocks = <0xd 0x10d 0xd 0x10f 0xd 0xf6 0xd 0x57 0xd 0x261 0xd 0x7c>;
clock-names = "pll_p_out1", "pll_a", "pll_a_out0", "ahub", "clk_m", "extern1";
resets = <0xd 0x92>;
reset-names = "extern1_rst";
nvidia,audio-routing =
"x Headphone Jack", "x HPOL",
"x Headphone Jack", "x HPOR",
"x Int Spk", "x SPORP",
"x Int Spk", "x SPORN",
"x Int Spk", "x SPOLP",
"x Int Spk", "x SPOLN",
"x micbias1", "x Mic Jack",
"x IN2P", "x Mic Jack",
"x DMIC L1", "x Int Mic",
"x DMIC L2", "x Int Mic",
"x DMIC R1", "x Int Mic",
"x DMIC R2", "x Int Mic",
"y Headphone", "y OUT",
"y IN", "y Mic",
"z Headphone", "z OUT",
"z IN", "z Mic",
"l IN", "l OUT",
"s Headphone", "s OUT",
"s IN", "s Mic";
nvidia,xbar = <0xb3>;
linux,phandle = <0x6a>;
phandle = <0x6a>;
nvidia,dai-link-1 {
link-name = "rt5640-playback";
cpu-dai = <0xb4>;
codec-dai = <&rt5640_codec>;
cpu-dai-name = "I2S1";
codec-dai-name = "rt5640-aif1";
format = "i2s";
bitclock-slave;
frame-slave;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
bclk_ratio = <0x0>;
srate = <0xbb80>;
num-channel = <0x2>;
ignore_suspend;
name-prefix = [78 00];
status = "okay";
linux,phandle = <0x106>;
phandle = <0x106>;
};
};
3.I changed the tegra_t186ref_mobile_rt565x.c
static int tegra_t186ref_jack_notifier(struct notifier_block *self,
unsigned long action, void *dev)
{
idx = tegra_machine_get_codec_dai_link_idx_t18x("rt5640-playback");
/* check if idx has valid number */
if (idx == -EINVAL)
return idx;
}
static int tegra_t186ref_dai_init(struct snd_soc_pcm_runtime *rtd,
int rate,
int channels,
u64 formats,
bool is_playback)
{
idx = tegra_machine_get_codec_dai_link_idx_t18x("rt5640-playback");
/* check if idx has valid number */
if (idx != -EINVAL) {
dai_params =
(struct snd_soc_pcm_stream *)card->rtd[idx].dai_link->params;
dai_params->rate_min = clk_rate;
dai_params->formats = formats;
dev_info(card->dev,"565x_playback\n");
err = snd_soc_dai_set_sysclk(card->rtd[idx].codec_dai,
RT5640_SCLK_S_MCLK, clk_out_rate, SND_SOC_CLOCK_IN);
if (err < 0) {
dev_err(card->dev, "codec_dai clock not set\n");
return err;
}
}
)
static void dai_link_setup(struct platform_device *pdev)
{
/* set codec init */
for (i = 0; i < machine->num_codec_links; i++) {
if (tegra_t186ref_codec_links[i].name) {
if (strstr(tegra_t186ref_codec_links[i].name,
"rt565x-playback"))
tegra_t186ref_codec_links[i].init = tegra_t186ref_init;
else if (strstr(tegra_t186ref_codec_links[i].name,
"rt5640-playback"))
tegra_t186ref_codec_links[i].init = tegra_t186ref_init;
else if (strstr(tegra_t186ref_codec_links[i].name,
"dspk-playback-r"))
tegra_t186ref_codec_links[i].init = tegra_t186ref_dspk_init;
else if (strstr(tegra_t186ref_codec_links[i].name,
"dspk-playback-l"))
tegra_t186ref_codec_links[i].init = tegra_t186ref_dspk_init;
}
}
}
4.I didn’t change tegra_t186ref_driver_probe.
static int tegra_t186ref_driver_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
struct snd_soc_card *card = &snd_soc_tegra_t186ref;
struct tegra_t186ref *machine;
struct tegra_asoc_platform_data *pdata = NULL;
struct snd_soc_codec *codec = NULL;
int idx = 0;
int ret = 0;
const char *codec_dai_name;
if (!np) {
dev_err(&pdev->dev, "No device tree node for t186ref driver");
return -ENODEV;
}
machine = devm_kzalloc(&pdev->dev, sizeof(struct tegra_t186ref),
GFP_KERNEL);
if (!machine) {
dev_err(&pdev->dev, "Can't allocate t186ref struct\n");
ret = -ENOMEM;
goto err;
}
card->dev = &pdev->dev;
platform_set_drvdata(pdev, card);
snd_soc_card_set_drvdata(card, machine);
machine->is_codec_dummy = 0;
machine->audio_clock.clk_cdev1_state = 0;
machine->digital_reg = NULL;
machine->spk_reg = NULL;
machine->dmic_reg = NULL;
card->dapm.idle_bias_off = true;
ret = snd_soc_of_parse_card_name(card, "nvidia,model");
if (ret)
goto err;
ret = snd_soc_of_parse_audio_routing(card,
"nvidia,audio-routing");
if (ret)
goto err;
if (of_property_read_u32(np, "nvidia,num-clk",
&machine->audio_clock.num_clk) < 0) {
dev_err(&pdev->dev,
"Missing property nvidia,num-clk\n");
ret = -ENODEV;
goto err;
}
if (of_property_read_u32_array(np, "nvidia,clk-rates",
(u32 *)&machine->audio_clock.clk_rates,
machine->audio_clock.num_clk) < 0) {
dev_err(&pdev->dev,
"Missing property nvidia,clk-rates\n");
ret = -ENODEV;
goto err;
}
dai_link_setup(pdev);
#ifdef CONFIG_SWITCH
/* Addd h2w swith class support */
ret = tegra_alt_asoc_switch_register(&tegra_t186ref_headset_switch);
if (ret < 0)
goto err_alloc_dai_link;
#endif
pdata = devm_kzalloc(&pdev->dev,
sizeof(struct tegra_asoc_platform_data),
GFP_KERNEL);
if (!pdata) {
dev_err(&pdev->dev,
"Can't allocate tegra_asoc_platform_data struct\n");
return -ENOMEM;
}
pdata->gpio_codec1 = pdata->gpio_codec2 = pdata->gpio_codec3 =
pdata->gpio_spkr_en = pdata->gpio_hp_mute =
pdata->gpio_int_mic_en = pdata->gpio_ext_mic_en = -1;
machine->pdata = pdata;
machine->pcard = card;
ret = tegra_alt_asoc_utils_init(&machine->audio_clock,
&pdev->dev,
card);
if (ret)
goto err_switch_unregister;
ret = snd_soc_register_card(card);
if (ret) {
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
ret);
goto err_fini_utils;
}
idx = tegra_machine_get_codec_dai_link_idx_t18x("rt565x-playback");
/* check if idx has valid number */
if (idx == -EINVAL)
dev_warn(&pdev->dev, "codec link not defined - codec not part of sound card");
else {
codec = card->rtd[idx].codec;
codec_dai_name = card->rtd[idx].dai_link->codec_dai_name;
dev_info(&pdev->dev,
"codec-dai \"%s\" registered\n", codec_dai_name);
if (!strcmp("dit-hifi", codec_dai_name)) {
dev_info(&pdev->dev, "This is a dummy codec\n");
machine->is_codec_dummy = 1;
}
if (!machine->is_codec_dummy) {
/* setup for jack detection only in non-dummy case */
rt5659_set_jack_detect(codec, &tegra_t186ref_hp_jack);
}
}
return 0;
err_fini_utils:
tegra_alt_asoc_utils_fini(&machine->audio_clock);
err_switch_unregister:
#ifdef CONFIG_SWITCH
tegra_alt_asoc_switch_unregister(&tegra_t186ref_headset_switch);
#endif
err_alloc_dai_link:
tegra_machine_remove_dai_link();
tegra_machine_remove_codec_conf();
err:
return ret;
}
5.the kernel log
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.795307] rt5640 1-001c: 5640_probe
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.801220] rt5640 1-001c: 5639_id
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.814279] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF1 <-> ADMAIF1 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.823344] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF2 <-> ADMAIF2 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.832259] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF3 <-> ADMAIF3 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.841205] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF4 <-> ADMAIF4 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.850078] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF5 <-> ADMAIF5 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.862008] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF6 <-> ADMAIF6 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.870877] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF7 <-> ADMAIF7 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.879758] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF8 <-> ADMAIF8 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.888599] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF9 <-> ADMAIF9 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.897542] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF10 <-> ADMAIF10 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.906588] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF11 <-> ADMAIF11 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.915575] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF12 <-> ADMAIF12 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.924590] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF13 <-> ADMAIF13 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.933528] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF14 <-> ADMAIF14 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.942483] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF15 <-> ADMAIF15 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.951383] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF16 <-> ADMAIF16 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.960314] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF17 <-> ADMAIF17 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.969157] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF18 <-> ADMAIF18 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.978026] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF19 <-> ADMAIF19 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 7.986824] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF20 <-> ADMAIF20 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 8.000139] tegra-snd-t186ref-mobile-rt565x sound: ADSP-FE1 <-> ADSP PCM1 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 8.009156] tegra-snd-t186ref-mobile-rt565x sound: ADSP-FE2 <-> ADSP PCM2 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 8.017958] compress asoc: ADSP-FE3 <-> ADSP COMPR1 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 8.024898] compress asoc: ADSP-FE4 <-> ADSP COMPR2 mapping ok
Dec 17 06:57:31 tegra-ubuntu kernel: [ 8.074703] input: tegra-snd-t186ref-mobile-rt565x Headphone Jack as /devices/sound/sound/card1/input2
Dec 17 06:57:31 tegra-ubuntu kernel: [ 8.085958] tegra-snd-t186ref-mobile-rt565x sound: codec link not defined - codec not part of sound card
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405336] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405339] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405345] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405538] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405542] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405545] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405550] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405698] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405702] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405705] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405709] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405876] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405880] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405883] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.405887] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.406056] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.406060] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.406063] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.406066] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412409] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412418] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412421] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412427] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412637] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412641] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412643] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412647] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412802] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412805] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412808] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.412811] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.413066] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.413070] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.413072] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.413074] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.413225] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.413228] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.413229] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.413232] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418809] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418815] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418817] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418821] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418863] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418865] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418867] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418869] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418897] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418900] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418901] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418903] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418934] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418936] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418938] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418940] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418969] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418971] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418973] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.418975] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.421606] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
Dec 17 06:57:50 tegra-ubuntu kernel: [ 21.421611] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
6.When I aplay -D hw:1,0 -r8000 output.wav or other wav file, I couldn’t hear any voice.
Playing WAVE 'output.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1297: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (46439 46440)
PERIOD_SIZE: 2048
PERIOD_BYTES: 8192
PERIODS: 4
BUFFER_TIME: (185759 185760)
BUFFER_SIZE: 8192
BUFFER_BYTES: 32768
TICK_TIME: 0
dmesg
[ 866.581397] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 866.581400] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 866.581439] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
[ 866.581442] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 866.581445] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 866.581448] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 866.581490] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
[ 866.581493] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 866.581495] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 866.581498] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 866.581594] tegra-snd-t186ref-mobile-rt565x sound: 565x_playback
7.I can see rt5640 in I2c@c240000
nvidia@tegra-ubuntu:~/Downloads$ find /sys/devices/*.i2c/ -name name -exec cat {} ; | grep rt56
rt5640
So, I am a newer in audio codec , Could anyone give me some suggestion.