The system does not start properly after flashing the image

Hi

JetPack4.2 was installed on my TX2, and I modified the audio driver in the kernel code and flashed the generated image into TX2 using the command “sudo./ flash.sh jetson-tx2 mmcblk0p1”, but the system did not start up properly.

Thanks

Please share the boot log with us.

Also, what is your step to replace kernel image?

Hi,

The log file was not exported because the system did not start properly, but I took photos.
The following are some of the content that is displayed at startup:

[ OK ] started resolvconf-pull-resolved.service.
[ OK ] created slice user slice of gdm.
[ OK ] started session c2 of user gdm.
[ OK ] starting user manager for UID 120...
[ OK ] Started user manager for UID 120.
       Stopping user manager for UID 1000...
       Starting resolvconf-pull-resolved.service...
[ OK ] stopped user manager for UID 1000.
[ OK ] Started resolvconf-pull-resolved.service.
[ OK ] Removed slice user slice of nvidia.
       stopping OpenBSD secure shell server...
[ OK ] stopped OpenBSD secure shell server.
       starting OpenBSD secure shell server...
[ OK ] started OpenBSD secure shell server.
[ OK ] started NVIDIA specific first-boot script.
       starting NVIDIA specific script...
       stopping user manager for UID 120...
[ OK ] stopped user manager for UID 120.
[ OK ] Removed slice user slice of gdm.
[ OK ] created slice user slice of gdm.	 
       starting user manager for UID 120...  
[ OK ] started session c3 of user gdm.
[ OK ] starting user manager for UID 120...
[ OK ] started NVIDIA specific script.
CPU1: shutdown
[ OK ] started Argus daemon.
CPU2: shutdown
       starting PHS daemon...
[ OK ] started NVS-SERVICE Emnedded sensor HAL Daemon.
[ OK ] started nv_update_verifier service.
[ OK ] started serial getty on ttyS0.
[ OK ] Reached target Login Prompts.
[ OK ] Started UART Manager for UID 120...
[ OK ] Stopped user manager for UID 120.
[ OK ] Removed slice user slice of gdm.
[ OK ] Created slice user slice of gdm.
       starting user manager for UID 120...

The steps I replace the kernel image:

  1. Compile the kernel and device tree
  2. Copy image to the Linux_for_Tegra/kernel folder
  3. Copy DTB files from arch/arm64/boot/ DTS to Linux_for_Tegra/kernel/ DTB folder
  4. Refresh the system with the command "sudo./ flash.sh jetson-tx2 mmcblk0p1"

Thanks.

The steps you shared look correct.
For such case, we need the boot log from uart. Are you able to ssh to your device under such situation? If not, then better trying to dump the uart log.

If kenrel does not have any error, then it is userspace driver problem.

Hi,

  1. Does refreshing the system still need to change other files?
  2. How to convert dtsi format file to cfg format file using pinmux-dts2cfg.py in JetPack4.2? I am using the following command but can't generate cfg format file.

    python pinmux-dts2cfg.py
    –pinmux
    addr_info.txt gpio_addr_info.txt por_val.txt
    mandatory_pinmux.txt
    tegra186-quill-p3310-1000-a00-pinmux.dtsi
    tegra186-quill-p3310-1000-a00-gpio-default.dtsi
    1.0 \

    tegra186-quill-p3310-1000-a00-pinmux-gpio.cfg

Thanks

Hi,

  1. No, I don’t think so. You could also try to replace the Image under Linux_for_Tegra/rootfs/boot.
  2. Why you have pinmux to change in your case? Is it a custom carrier board? What error do you see?

Hi,

I tried to replace the image in Linux_for_Tegra/rootfs/boot and still can’t start the system.

We made a board and added a TLV320AIC32X4, so we need to modify pinmux.

I want to use the latest version of the SDK component(CUDA, AI, computer vision), Can the SDK components in JetPack4.2 be used in JetPack3.3, or how to use the latest version of SDK components in JetPack3.3?

Thanks

Can’t be done. CUDA of one release is incompatible with other major releases.

Your command to create a cfg file seems not correct.Please refer to the README.txt file under kernel/pinmux/t18x.

Thank you WayneWWW.
The dtsi file conversion to CFG file was successful in JetPack4.2

Hi,

I modified the audio driver file related to TLV32OAIC32X4. After flashing image, the system can start up. However, the system will not start after flashing the device tree. The system version is JetPack4.2.2

I modified the following:
tegra186-quill-common.dtsi

i2c@3180000 {
		status = "okay";
		aic32x4_out: tlv320aic32x4.2-0018@18{
		compatible = "ti,tlv320aic32x4";
		status = "okay";
		reg = <0x18>;
		clocks = <&tegra_car TEGRA186_CLK_AUD_MCLK>;
		clock-names = "mclk";
		};
	};
rt565x_dai_link: nvidia,dai-link-1 {
		    link-name = "playback-i2s2";
			cpu-dai = <&tegra_i2s2>;
			codec-dai = <&aic32x4_out>;
			cpu-dai-name = "I2S2";
			codec-dai-name = "tlv320aic32x4-hifi";
			tx-mask = <0xFF>;
			rx-mask = <0xFF>;
			format = "i2s";
			bitclock-slave;
			frame-slave;
			bitclock-noninversion;
			frame-noninversion;
			bit-format = "s16_le";
			bclk_ratio = <0>;
			srate = <48000>;
			num-channel = <1>;
			ignore_suspend;
			name-prefix = "x";
			status = "okay";
		};

tegra_machine_driver_mobile.c

static int tegra_machine_dai_init(struct snd_soc_pcm_runtime *runtime,
					int rate,
					int channels,
					u64 formats,
					bool is_playback)
{
	struct snd_soc_card *card = runtime->card;
	struct tegra_machine *machine = snd_soc_card_get_drvdata(card);
	struct snd_soc_pcm_stream *dai_params;
	unsigned int clk_out_rate = 0, mclk = 0;
	int err, codec_rate, clk_rate;
	struct snd_soc_pcm_runtime *rtd;

	codec_rate = tegra_machine_srate_values[machine->rate_via_kcontrol];
	clk_rate = (machine->rate_via_kcontrol) ? codec_rate : rate;

	if (!machine->soc_data->is_clk_rate_via_dt) {
		/* TODO remove this hardcoding */
		/* aud_mclk, 256 times the sample rate */
		clk_out_rate = clk_rate << 8;
		switch (clk_rate) {
		case 11025:
			mclk = 22579200;
			break;
		case 22050:
		case 44100:
		case 88200:
		case 176400:
			mclk = 45158400;
			break;
		case 8000:
			mclk = 24576000;
			break;
		case 16000:
		case 32000:
		case 48000:
		case 64000:
		case 96000:
		case 192000:
		default:
			mclk = 49152000;
			break;
		}

		err = tegra210_xbar_set_clock(mclk);
		if (err < 0) {
			dev_err(card->dev,
				"Can't configure xbar clock = %d Hz\n", mclk);
			return err;
		}
	}

	err = tegra_alt_asoc_utils_set_rate(&machine->audio_clock, clk_rate,
			mclk, clk_out_rate);
	if (err < 0) {
		dev_err(card->dev, "Can't configure clocks\n");
		return err;
	}

	if (machine->soc_data->is_clk_rate_via_dt)
		clk_out_rate = machine->audio_clock.set_clk_out_rate;

	pr_debug("pll_a_out0 = %d Hz, aud_mclk = %d Hz, codec rate = %d Hz\n",
		machine->audio_clock.set_mclk,
		machine->audio_clock.set_clk_out_rate, clk_rate);

	/* TODO: should we pass here clk_rate ? */
	err = tegra_machine_set_params(card, machine, rate, channels, formats);
	if (err < 0)
		return err;
	rtd = snd_soc_get_pcm_runtime(card, "playback-i2s2");
	if (rtd) {
		dai_params =
		(struct snd_soc_pcm_stream *)rtd->dai_link->params;

		dai_params->rate_min = clk_rate;
		dai_params->formats = (machine->fmt_via_kcontrol == 2) ?
			(1ULL << SNDRV_PCM_FORMAT_S32_LE) : formats;

		if (machine->is_hs_supported) {
			err = snd_soc_dai_set_sysclk(rtd->codec_dai,
			RT5659_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;
			}
		}
	}

	rtd = snd_soc_get_pcm_runtime(card, "rt565x-codec-sysclk-bclk1");
	if (rtd) {
		dai_params =
		(struct snd_soc_pcm_stream *)rtd->dai_link->params;

		dai_params->rate_min = clk_rate;
		dai_params->formats = (machine->fmt_via_kcontrol == 2) ?
			(1ULL << SNDRV_PCM_FORMAT_S32_LE) : formats;

		err = rt565x_manage_codec_sysclk(dai_params, rtd->codec_dai,
						 RT5659_PLL1_S_BCLK1);
		if (err < 0) {
			dev_err(card->dev, "codec_dai clock not set\n");
			return err;
		}
	}
	return 0;
}
static void dai_link_setup(struct platform_device *pdev)
{
	struct snd_soc_card *card = platform_get_drvdata(pdev);
	struct tegra_machine *machine = snd_soc_card_get_drvdata(card);
	struct snd_soc_codec_conf *tegra_machine_codec_conf = NULL;
	struct snd_soc_codec_conf *tegra_new_codec_conf = NULL;
	struct snd_soc_dai_link *tegra_machine_dai_links = NULL;
	struct snd_soc_dai_link *tegra_machine_codec_links = NULL;
	const char *codec_dai_name;
	int i;

	/* set new codec links and conf */
	tegra_machine_codec_links = tegra_machine_new_codec_links(pdev,
		tegra_machine_codec_links,
		&machine->num_codec_links);
	if (!tegra_machine_codec_links)
		goto err_alloc_dai_link;

	/* set codec init */
	for (i = 0; i < machine->num_codec_links; i++) {
		if (tegra_machine_codec_links[i].name) {
			if (strstr(tegra_machine_codec_links[i].name,
				"playback-i2s2") ||
			    strstr(tegra_machine_codec_links[i].name,
				"rt565x-codec-sysclk-bclk1")) {
				codec_dai_name =
				 tegra_machine_codec_links[i].codec_dai_name;
				if (!strcmp("dit-hifi", codec_dai_name)) {
					dev_info(&pdev->dev, "This is a dummy codec\n");
					machine->is_hs_supported = false;
				} else {
					machine->is_hs_supported = true;
					tegra_machine_codec_links[i].init =
						tegra_machine_rt565x_init;
				}
			} else if (strstr(tegra_machine_codec_links[i].name,
				"dspk-playback-r")) {
				tegra_machine_codec_links[i].init =
					tegra_machine_dspk_init;
			} else if (strstr(tegra_machine_codec_links[i].name,
				"dspk-playback-l")) {
				tegra_machine_codec_links[i].init =
					tegra_machine_dspk_init;
			} else if (strstr(tegra_machine_codec_links[i].name,
				"fe-pi-audio-z-v2")) {
				tegra_machine_codec_links[i].init =
					tegra_machine_fepi_init;
			}
		}
	}

	tegra_new_codec_conf = tegra_machine_new_codec_conf(pdev,
		tegra_new_codec_conf,
		&machine->num_codec_links);
	if (!tegra_new_codec_conf)
		goto err_alloc_dai_link;

	/* get the xbar dai link/codec conf structure */
	tegra_machine_dai_links = machine->soc_data->get_dai_link();
	if (!tegra_machine_dai_links)
		goto err_alloc_dai_link;

	tegra_machine_codec_conf = machine->soc_data->get_codec_conf();
	if (!tegra_machine_codec_conf)
		goto err_alloc_dai_link;

	/* set ADMAIF dai_ops */
	for (i = machine->soc_data->admaif_dai_link_start;
		i <= machine->soc_data->admaif_dai_link_end; i++)
		tegra_machine_set_dai_ops(i, &tegra_machine_pcm_ops);

	/* set sfc dai_init */
	tegra_machine_set_dai_init(machine->soc_data->sfc_dai_link,
		&tegra_machine_sfc_init);
#if IS_ENABLED(CONFIG_SND_SOC_TEGRA210_ADSP_ALT)
	/* set ADSP PCM/COMPR */
	for (i = machine->soc_data->adsp_pcm_dai_link_start;
		i <= machine->soc_data->adsp_pcm_dai_link_end; i++) {
		tegra_machine_set_dai_ops(i, &tegra_machine_pcm_ops);
	}

	/* set ADSP COMPR */
	for (i = machine->soc_data->adsp_compr_dai_link_start;
		i <= machine->soc_data->adsp_compr_dai_link_end; i++) {
		tegra_machine_set_dai_compr_ops(i,
			&tegra_machine_compr_ops);
	}
#endif

	if (machine->soc_data->is_asrc_available) {
	/* set ASRC params. The default is 2 channels */
		for (i = 0; i < 6; i++) {
			tegra_machine_set_dai_params(TEGRA186_DAI_LINK_ASRC1_TX1
				+ i, (struct snd_soc_pcm_stream *)
				&tegra_machine_asrc_link_params[i]);
			tegra_machine_set_dai_params(TEGRA186_DAI_LINK_ASRC1_RX1
				 + i, (struct snd_soc_pcm_stream *)
				&tegra_machine_asrc_link_params[i]);
		}
	}

	/* append machine specific dai_links */
	card->num_links = machine->soc_data->append_dai_link(
		tegra_machine_codec_links, 2 * machine->num_codec_links);
	tegra_machine_dai_links = machine->soc_data->get_dai_link();
	card->dai_link = tegra_machine_dai_links;

	/* append machine specific codec_conf */
	card->num_configs = machine->soc_data->append_codec_conf(
		tegra_new_codec_conf, machine->num_codec_links);
	tegra_machine_codec_conf = machine->soc_data->get_codec_conf();
	card->codec_conf = tegra_machine_codec_conf;

	return;

err_alloc_dai_link:
	tegra_machine_remove_dai_link();
	tegra_machine_remove_codec_conf();
}

tegra_defconfig

CONFIG_SND_SOC_TLV320AIC32X4=y
CONFIG_SND_SOC_TLV320AIC32X4_I2C=y

Kconfig

config SND_SOC_TEGRA_T186REF_MOBILE_ALT
	tristate "SoC Audio support for T186Ref Mobile"
	depends on SND_SOC_TEGRA_T186REF_ALT
	select SND_SOC_RT5659
	select SND_SOC_SGTL5000
	select SND_SOC_TLV320AIC32X4
	select SND_SOC_TLV320AIC32X4_I2C
	help
	  Say Y or M here.

The attachment is the content displayed on the screen at boot-up.

Hi,

  1. I don’t think it is a good idea to share a kernel log by taking a photo of your monitor…
    Do you have a uart console for debug?

  2. Your picture indicates the error happens in rt5659_set_jack_detect. Are you sure this driver is inside the kernel or as a modules?

I just checked and notice CONFIG_SND_SOC_RT5659 is not enabled in defconfig by default.

Hi,

The driver is compiled into the kernel. Printed information can be seen in the log. CONFIG_SND_SOC_RT5659 in the JetPack3.3 is not enabled, but the audio driver is available.
However, in the JetPack4.2.2 , there will be an audio drive failure and the system will not start.

The problem now is that the driver is compiled into the kernel, but once the device tree is flashed to the kernel, the system cannot start.

The following is part of the log:

[2019-09-11 11:58:03.844]# RECV ASCII>
5700] tegra_nvdisp_handle_pd_enable: Unpowergated Head1 pd
[    4.675804] tegra_nvdisp_handle_pd_enable: Unpowergated Head2 pd
[    4.677419] Parent Clock set for DC plld2
[    4.678390] random: crng init done
[    4.682758] tegradc 15210000.nvdisplay: hdmi: tmds rate:148500K prod-setting:prod_c_hdmi_111m_223m
[    4.684642] tegradc 15210000.nvdisplay: hdmi: get RGB quant from EDID.
[    4.684665] tegradc 15210000.nvdisplay: hdmi: get YCC quant from EDID.
[    4.722410] extcon-disp-state external-con

[2019-09-11 11:58:03.899]# RECV ASCII>
nection:disp-state: cable 47 state 1
[    4.722413] Extcon AUX1(HDMI) enable
[    4.725548] OPE platform probe
[    4.725667] OPE platform probe successful
[    4.738066] ===== tegra_machine_driver_probe ======
[    4.738801] dai_link_setup:====playback-i2s2 =====
[    4.797102] aic32x4_codec_probe:===========probe=================
[    4.818146] tlv320aic32x4 2-0018: ASoC: no source widget found for CM_R
[    4.818154] tlv320aic32x4 2-0018: ASoC: Failed to add route CM_R -> 10 kOhm -> CM_R to Right

[2019-09-11 11:58:03.952]# RECV ASCII>
 Mixer Negative Resistor
[    4.818187] tlv320aic32x4 2-0018: ASoC: no source widget found for CM_R
[    4.818191] tlv320aic32x4 2-0018: ASoC: Failed to add route CM_R -> 20 kOhm -> CM_R to Right Mixer Negative Resistor
[    4.818218] tlv320aic32x4 2-0018: ASoC: no source widget found for CM_R
[    4.818221] tlv320aic32x4 2-0018: ASoC: Failed to add route CM_R -> 40 kOhm -> CM_R to Right Mixer Negative Resistor
[    4.824472] tlv320aic32x4 2-0018: ASoC: no source widget found for CM_L
[    4.824476] t

[2019-09-11 11:58:04.003]# RECV ASCII>
lv320aic32x4 2-0018: ASoC: Failed to add route CM_L -> 10 kOhm -> CM_L to Left Mixer Negative Resistor
[    4.824499] tlv320aic32x4 2-0018: ASoC: no source widget found for CM_L
[    4.824502] tlv320aic32x4 2-0018: ASoC: Failed to add route CM_L -> 20 kOhm -> CM_L to Left Mixer Negative Resistor
[    4.824524] tlv320aic32x4 2-0018: ASoC: no source widget found for CM_L
[    4.824527] tlv320aic32x4 2-0018: ASoC: Failed to add route CM_L -> 40 kOhm -> CM_L to Left Mixer Negative Resistor
[    4.831947] t

[2019-09-11 11:58:04.057]# RECV ASCII>
egra-asoc: sound: ADMAIF1 <-> ADMAIF1 mapping ok
[    4.832038] tegra-asoc: sound: ADMAIF2 <-> ADMAIF2 mapping ok
[    4.832121] tegra-asoc: sound: ADMAIF3 <-> ADMAIF3 mapping ok
[    4.832201] tegra-asoc: sound: ADMAIF4 <-> ADMAIF4 mapping ok
[    4.832286] tegra-asoc: sound: ADMAIF5 <-> ADMAIF5 mapping ok
[    4.832364] tegra-asoc: sound: ADMAIF6 <-> ADMAIF6 mapping ok
[    4.832443] tegra-asoc: sound: ADMAIF7 <-> ADMAIF7 mapping ok
[    4.832527] tegra-asoc: sound: ADMAIF8 <-> ADMAIF8 mapping ok


[2019-09-11 11:58:04.112]# RECV ASCII>
[    4.832607] tegra-asoc: sound: ADMAIF9 <-> ADMAIF9 mapping ok
[    4.832701] tegra-asoc: sound: ADMAIF10 <-> ADMAIF10 mapping ok
[    4.832783] tegra-asoc: sound: ADMAIF11 <-> ADMAIF11 mapping ok
[    4.832891] tegra-asoc: sound: ADMAIF12 <-> ADMAIF12 mapping ok
[    4.832979] tegra-asoc: sound: ADMAIF13 <-> ADMAIF13 mapping ok
[    4.833067] tegra-asoc: sound: ADMAIF14 <-> ADMAIF14 mapping ok
[    4.833145] tegra-asoc: sound: ADMAIF15 <-> ADMAIF15 mapping ok
[    4.833228] tegra-asoc: sound: ADMA

[2019-09-11 11:58:04.163]# RECV ASCII>
IF16 <-> ADMAIF16 mapping ok
[    4.833306] tegra-asoc: sound: ADMAIF17 <-> ADMAIF17 mapping ok
[    4.833391] tegra-asoc: sound: ADMAIF18 <-> ADMAIF18 mapping ok
[    4.833502] tegra-asoc: sound: ADMAIF19 <-> ADMAIF19 mapping ok
[    4.833584] tegra-asoc: sound: ADMAIF20 <-> ADMAIF20 mapping ok
[    4.837346] ------------[ cut here ]------------
[    4.837362] WARNING: CPU: 2 PID: 1 at /home/lion/project/cpc1816/kernel_src32.2.1/kernel/kernel-4.9/kernel/workqueue.c:1512 __queue_delayed_work+0x184/0x1

[2019-09-11 11:58:04.219]# RECV ASCII>
90
[    4.837367] Modules linked in:
[    4.837369] 
[    4.837376] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.9.140 #3
[    4.837378] Hardware name: quill (DT)
[    4.837381] task: ffffffc1ecb30000 task.stack: ffffffc1ecb38000
[    4.837386] PC is at __queue_delayed_work+0x184/0x190
[    4.837390] LR is at queue_delayed_work_on+0x7c/0x88
[    4.837395] pc : [<ffffff800825476c>] lr : [<ffffff80082547f4>] pstate: 204000c5
[    4.837397] sp : ffffffc1ecb3ba10
[    4.837404] x29: ffffffc1ecb3ba10 x2

[2019-09-11 11:58:04.274]# RECV ASCII>
8: 0000000000000000 
[    4.837410] x27: 0000000000000001 x26: ffffffc1e60cee40 
[    4.837415] x25: ffffffc1e5cb2800 x24: ffffff80082547f4 
[    4.837419] x23: 000000000000003f x22: 0000000000000040 
[    4.837424] x21: ffffffc1eca06e00 x20: ffffffc1e60af100 
[    4.837429] x19: ffffffc1e60af0e0 x18: 0000000000000000 
[    4.837435] x17: 0000000000000000 x16: 0000000000000000 
[    4.837440] x15: 20624b512a1a733c x14: ffffffc1e5827e47 
[    4.837464] x13: 0000000000000004 x12: 0000000000000002 
[ 

[2019-09-11 11:58:04.329]# RECV ASCII>
   4.837468] x11: 0101010101010101 x10: 0101010101010101 
[    4.837473] x9 : 0000000000000000 x8 : 0000000000000000 
[    4.837478] x7 : 0000000000000000 x6 : 00000002000003cb 
[    4.837482] x5 : 0000000000000000 x4 : 0000000000000001 
[    4.837487] x3 : 000000000000003f x2 : ffffffc1e60af0e0 
[    4.837492] x1 : 0000000000000001 x0 : ffffff800a2053af 
[    4.837493] 
[    4.837498] ---[ end trace c7ab3ed28dec1270 ]---
[    4.837500] Call trace:
[    4.837506] [<ffffff800825476c>] __queue_delaye

[2019-09-11 11:58:04.374]# RECV ASCII>
d_work+0x184/0x190
[    4.837511] [<ffffff80082547f4>] queue_delayed_work_on+0x7c/0x88
[    4.837518] [<ffffff8008ed0c94>] rt5659_set_jack_detect+0x5c/0x70
[    4.837538] [<ffffff8008eeb2c4>] tegra_machine_rt565x_init+0xa4/0x1b0
[    4.837545] [<ffffff8008eba9cc>] snd_soc_instantiate_card+0x7fc/0xbb8
[    4.837549] [<ffffff8008ebaeec>] snd_soc_register_card+0x164/0x210
[    4.837553] [<ffffff8008eeaca4>] tegra_machine_dr

[2019-09-11 11:58:04.426]# RECV ASCII>
iver_probe+0x264/0x638
[    4.837565] [<ffffff80088ef7f0>] platform_drv_probe+0x60/0xc0
[    4.837569] [<ffffff80088ece70>] driver_probe_device+0xd8/0x408
[    4.837573] [<ffffff80088ed27c>] __driver_attach+0xdc/0x128
[    4.837582] [<ffffff80088ea8ec>] bus_for_each_dev+0x5c/0xa8
[    4.837586] [<ffffff80088ec670>] driver_attach+0x30/0x40
[    4.837590] [<ffffff80088ec0a4>] bus_add_driver+0x20c/0x2a8
[    4.837594] [<ffffff80088ee1b4>] driver_register+0x6c/0x110
[    4.837603] [<ffffff80088ef72c>] _

[2019-09-11 11:58:04.478]# RECV ASCII>
_platform_driver_register+0x5c/0x68
[    4.837610] [<ffffff80097ca24c>] tegra_asoc_machine_driver_init+0x18/0x20
[    4.837615] [<ffffff8008203afc>] do_one_initcall+0x44/0x130
[    4.837621] [<ffffff8009770d18>] kernel_init_freeable+0x1a0/0x244
[    4.837632] [<ffffff80090c6750>] kernel_init+0x18/0x108
[    4.837636] [<ffffff8008203850>] ret_from_fork+0x10/0x40
[    4.837641] ------------[ cut here ]------------
[    4.837646] WARNING: CPU: 2 PID: 1 at /home/lion/project/cpc1816/kernel_src32.2.1/kern

[2019-09-11 11:58:04.531]# RECV ASCII>
el/kernel-4.9/kernel/workqueue.c:1513 __queue_delayed_work+0xf0/0x190
[    4.837649] Modules linked in:
[    4.837650] 
[    4.837653] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W       4.9.140 #3
[    4.837655] Hardware name: quill (DT)
[    4.837657] task: ffffffc1ecb30000 task.stack: ffffffc1ecb38000
[    4.837661] PC is at __queue_delayed_work+0xf0/0x190
[    4.837668] LR is at queue_delayed_work_on+0x7c/0x88
[    4.837672] pc : [<ffffff80082546d8>] lr : [<ffffff80082547f4>] pstate: 204000c

[2019-09-11 11:58:04.587]# RECV ASCII>
5
[    4.837673] sp : ffffffc1ecb3ba10
[    4.837678] x29: ffffffc1ecb3ba10 x28: 0000000000000000 
[    4.837683] x27: 0000000000000001 x26: ffffffc1e60cee40 
[    4.837688] x25: ffffffc1e5cb2800 x24: ffffff80082547f4 
[    4.837692] x23: 000000000000003f x22: 0000000000000040 
[    4.837697] x21: ffffffc1eca06e00 x20: ffffffc1e60af100 
[    4.837702] x19: ffffffc1e60af0e0 x18: 0000000000000000 
[    4.837706] x17: 0000000000000000 x16: 0000000000000000 
[    4.837711] x15: 20624b512a1a733c x14: ff

[2019-09-11 11:58:04.641]# RECV ASCII>
ffffc1e5827e47 
[    4.837715] x13: 0000000000000004 x12: 0000000000000002 
[    4.837720] x11: 0101010101010101 x10: 0101010101010101 
[    4.837724] x9 : 0000000000000000 x8 : 0000000000000000 
[    4.837729] x7 : 0000000000000000 x6 : 00000002000003cb 
[    4.837733] x5 : 0000000000000000 x4 : 0000000000000001 
[    4.837738] x3 : 000000000000003f x2 : ffffffc1e60af0e0 
[    4.837743] x1 : 0000000000000001 x0 : ffffff800a2053af 
[    4.837744] 
[    4.837746] ---[ end trace c7ab3ed28dec1271 ]---

[2019-09-11 11:58:04.695]# RECV ASCII>

[    4.837747] Call trace:
[    4.837752] [<ffffff80082546d8>] __queue_delayed_work+0xf0/0x190
[    4.837756] [<ffffff80082547f4>] queue_delayed_work_on+0x7c/0x88
[    4.837766] [<ffffff8008ed0c94>] rt5659_set_jack_detect+0x5c/0x70
[    4.837770] [<ffffff8008eeb2c4>] tegra_machine_rt565x_init+0xa4/0x1b0
[    4.837774] [<ffffff8008eba9cc>] snd_soc_instantiate_card+0x7fc/0xbb8
[    4.837778] [<ffffff8008ebaeec>] snd_soc_register_card+0x164/0x210
[    4.837787] [<ffffff8008eeaca4>] tegra_machine_drive

[2019-09-11 11:58:04.748]# RECV ASCII>
r_probe+0x264/0x638
[    4.837791] [<ffffff80088ef7f0>] platform_drv_probe+0x60/0xc0
[    4.837795] [<ffffff80088ece70>] driver_probe_device+0xd8/0x408
[    4.837803] [<ffffff80088ed27c>] __driver_attach+0xdc/0x128
[    4.837807] [<ffffff80088ea8ec>] bus_for_each_dev+0x5c/0xa8
[    4.837811] [<ffffff80088ec670>] driver_attach+0x30/0x40
[    4.837814] [<ffffff80088ec0a4>] bus_add_driver+0x20c/0x2a8
[    4.837822] [<ffffff80088ee1b4>] driver_register+0x6c/0x110
[    4.837826] [<ffffff80088ef72c>] __pl

[2019-09-11 11:58:04.801]# RECV ASCII>
atform_driver_register+0x5c/0x68
[    4.837831] [<ffffff80097ca24c>] tegra_asoc_machine_driver_init+0x18/0x20
[    4.837834] [<ffffff8008203afc>] do_one_initcall+0x44/0x130
[    4.837842] [<ffffff8009770d18>] kernel_init_freeable+0x1a0/0x244
[    4.837847] [<ffffff80090c6750>] kernel_init+0x18/0x108
[    4.837850] [<ffffff8008203850>] ret_from_fork+0x10/0x40
[    4.837855] ------------[ cut here ]------------
[    4.837859] WARNING: CPU: 2 PID: 1 at /home/lion/project/cpc1816/kernel_src32.2.1/kernel/

[2019-09-11 11:58:04.855]# RECV ASCII>
kernel-4.9/kernel/workqueue.c:1514 __queue_delayed_work+0x134/0x190
[    4.837862] Modules linked in:
[    4.837864] 
[    4.837867] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W       4.9.140 #3
[    4.837868] Hardware name: quill (DT)
[    4.837871] task: ffffffc1ecb30000 task.stack: ffffffc1ecb38000
[    4.837875] PC is at __queue_delayed_work+0x134/0x190
[    4.837893] LR is at queue_delayed_work_on+0x7c/0x88
[    4.837896] pc : [<ffffff800825471c>] lr : [<ffffff80082547f4>] pstate: a04000c5

[2019-09-11 11:58:04.910]# RECV ASCII>

[    4.837898] sp : ffffffc1ecb3ba10
[    4.837903] x29: ffffffc1ecb3ba10 x28: 0000000000000000 
[    4.837907] x27: 0000000000000001 x26: ffffffc1e60cee40 
[    4.837912] x25: ffffffc1e5cb2800 x24: ffffff80082547f4 
[    4.837916] x23: 000000000000003f x22: 0000000000000040 
[    4.837921] x21: ffffffc1eca06e00 x20: ffffffc1e60af100 
[    4.837926] x19: ffffffc1e60af0e0 x18: 0000000000000000 
[    4.837930] x17: 0000000000000000 x16: 0000000000000000 
[    4.837935] x15: 20624b512a1a733c x14: fff

[2019-09-11 11:58:04.965]# RECV ASCII>
fffc1e5827e47 
[    4.837939] x13: 0000000000000004 x12: 0000000000000002 
[    4.837944] x11: 0101010101010101 x10: 0101010101010101 
[    4.837948] x9 : 0000000000000000 x8 : 0000000000000000 
[    4.837953] x7 : 0000000000000000 x6 : 00000002000003cb 
[    4.837957] x5 : 0000000000000000 x4 : 0000000000000001 
[    4.837962] x3 : 000000000000003f x2 : ffffffc1e60af0e0 
[    4.837966] x1 : 0000000000000001 x0 : ffffff800a2053af 
[    4.837968] 
[    4.837969] ---[ end trace c7ab3ed28dec1272 ]---


[2019-09-11 11:58:05.011]# RECV ASCII>

[    4.837971] Call trace:
[    4.837975] [<ffffff800825471c>] __queue_delayed_work+0x134/0x190
[    4.837980] [<ffffff80082547f4>] queue_delayed_work_on+0x7c/0x88
[    4.837996] [<ffffff8008ed0c94>] rt5659_set_jack_detect+0x5c/0x70
[    4.838000] [<ffffff8008eeb2c4>] tegra_machine_rt565x_init+0xa4/0x1b0
[    4.838004] [<ffffff8008eba9cc>] snd_soc_instantiate_card+0x7fc/0xbb8
[    4.838008] [<ffffff8008ebaeec>] snd_soc_r

[2019-09-11 11:58:05.064]# RECV ASCII>
egister_card+0x164/0x210
[    4.838012] [<ffffff8008eeaca4>] tegra_machine_driver_probe+0x264/0x638
[    4.838016] [<ffffff80088ef7f0>] platform_drv_probe+0x60/0xc0
[    4.838020] [<ffffff80088ece70>] driver_probe_device+0xd8/0x408
[    4.838024] [<ffffff80088ed27c>] __driver_attach+0xdc/0x128
[    4.838027] [<ffffff80088ea8ec>] bus_for_each_dev+0x5c/0xa8
[    4.838031] [<ffffff80088ec670>] driver_attach+0x30/0x40
[    4.838035] [<ffffff80088ec0a4>] bus_add_driver+0x20c/0x2a8
[    4.838039] [<ffffff

[2019-09-11 11:58:05.121]# RECV ASCII>
80088ee1b4>] driver_register+0x6c/0x110
[    4.838043] [<ffffff80088ef72c>] __platform_driver_register+0x5c/0x68
[    4.838047] [<ffffff80097ca24c>] tegra_asoc_machine_driver_init+0x18/0x20
[    4.838051] [<ffffff8008203afc>] do_one_initcall+0x44/0x130
[    4.838055] [<ffffff8009770d18>] kernel_init_freeable+0x1a0/0x244
[    4.838058] [<ffffff80090c6750>] kernel_init+0x18/0x108
[    4.838062] [<ffffff8008203850>] ret_from_fork+0x10/0x40
[    4.838069] ------------[ cut here ]------------
[    4.8380

[2019-09-11 11:58:05.172]# RECV ASCII>
71] kernel BUG at /home/lion/project/cpc1816/kernel_src32.2.1/kernel/kernel-4.9/kernel/time/timer.c:1126!
[    4.838075] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[    4.838080] Modules linked in:
[    4.838083] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W       4.9.140 #3
[    4.838084] Hardware name: quill (DT)
[    4.838087] task: ffffffc1ecb30000 task.stack: ffffffc1ecb38000
[    4.838091] PC is at add_timer+0x38/0x40
[    4.838095] LR is at __queue_delayed_work+0xac/0x190
[    4.83809

[2019-09-11 11:58:05.226]# RECV ASCII>
7] pc : [<ffffff80082b94e8>] lr : [<ffffff8008254694>] pstate: 604000c5
[    4.838099] sp : ffffffc1ecb3b9f0
[    4.838104] x29: ffffffc1ecb3b9f0 x28: 0000000000000000 
[    4.838109] x27: 0000000000000001 x26: ffffffc1e60cee40 
[    4.838113] x25: ffffffc1e5cb2800 x24: ffffff80082547f4 
[    4.838118] x23: 000000000000003f x22: 0000000000000040 
[    4.838123] x21: ffffffc1eca06e00 x20: ffffffc1e60af100 
[    4.838127] x19: ffffffc1e60af100 x18: 0000000000000000 
[    4.838132] x17: 000000000000000

[2019-09-11 11:58:05.280]# RECV ASCII>
0 x16: 0000000000000000 
[    4.838136] x15: 20624b512a1a733c x14: ffffffc1e5827e47 
[    4.838141] x13: 0000000000000004 x12: 0000000000000002 
[    4.838146] x11: 0101010101010101 x10: 0101010101010101 
[    4.838150] x9 : 0000000000000000 x8 : 0000000000000000 
[    4.838154] x7 : 0000000000000000 x6 : 00000002000003cb 
[    4.838159] x5 : 0000000000000000 x4 : 0000000000000001 
[    4.838164] x3 : 00000000fffedfe3 x2 : ffffffc1e60af0e0 
[    4.838168] x1 : 0000000000000001 x0 : ffffffc1e60af680 

[2019-09-11 11:58:05.334]# RECV ASCII>

[    4.838170] 
[    4.838172] Process swapper/0 (pid: 1, stack limit = 0xffffffc1ecb38000)
[    4.838174] Call trace:
[    4.838178] [<ffffff80082b94e8>] add_timer+0x38/0x40
[    4.838182] [<ffffff8008254694>] __queue_delayed_work+0xac/0x190
[    4.838186] [<ffffff80082547f4>] queue_delayed_work_on+0x7c/0x88
[    4.838190] [<ffffff8008ed0c94>] rt5659_set_jack_detect+0x5c/0x70
[    4.838194] [<ffffff8008eeb2c4>] tegra_machine_rt565x_init+0xa4/0x1b0
[    4.838197] [<ffffff8008eba9cc>] snd_soc_insta

[2019-09-11 11:58:05.387]# RECV ASCII>
ntiate_card+0x7fc/0xbb8
[    4.838201] [<ffffff8008ebaeec>] snd_soc_register_card+0x164/0x210
[    4.838205] [<ffffff8008eeaca4>] tegra_machine_driver_probe+0x264/0x638
[    4.838209] [<ffffff80088ef7f0>] platform_drv_probe+0x60/0xc0
[    4.838213] [<ffffff80088ece70>] driver_probe_device+0xd8/0x408
[    4.838216] [<ffffff80088ed27c>] __driver_attach+0xdc/0x128
[    4.838220] [<ffffff80088ea8ec>] bus_for_each_dev+0x5c/0xa8
[    4.838224] [<ffffff80088ec670>] driver_attach+0x30/0x40
[    4.838227] [<

[2019-09-11 11:58:05.440]# RECV ASCII>
ffffff80088ec0a4>] bus_add_driver+0x20c/0x2a8
[    4.838231] [<ffffff80088ee1b4>] driver_register+0x6c/0x110
[    4.838235] [<ffffff80088ef72c>] __platform_driver_register+0x5c/0x68
[    4.838240] [<ffffff80097ca24c>] tegra_asoc_machine_driver_init+0x18/0x20
[    4.838243] [<ffffff8008203afc>] do_one_initcall+0x44/0x130
[    4.838266] [<ffffff8009770d18>] kernel_init_freeable+0x1a0/0x244
[    4.838284] [<ffffff80090c6750>] kernel_init+0x18/0x108
[    4.838288] [<ffffff8008203850>] ret_from_fork+0x10/

[2019-09-11 11:58:05.532]# RECV ASCII>
0x40
[    5.843755] ---[ end trace c7ab3ed28dec1273 ]---
[    5.852935] Kernel panic - not syncing: Fatal exception in interrupt
[    5.852940] SMP: stopping secondary CPUs
[    5.860179] Kernel Offset: 0x180000 from 0xffffff8008000000
[    5.860182] Memory Limit: none
[    8.107727] trusty-log panic notifier - trusty version Built: 21:17:07 Aug 12 2019 
[    8.107727] Rebooting in 5 seconds..

Attachments are log files and modified source files.
Thanks.

log.txt (98.8 KB)
modify-src.zip (33.4 KB)

For the source code, could you just upload the diff or git diff?

It is really hard to know what did you modify by reading the source code directly…

Hi,WayneWWW

I uploaded the source to git. The first upload is the unmodified source code, and the second upload is the modified source code.

Thanks

Hello!

With regard to the crash being observed, please make sure you include the following fix …

https://nv-tegra.nvidia.com/gitweb/?p=linux-nvidia.git;a=commit;h=a960d522a5486aee27605f890034869c4f49d94a

This is included in the latest L4T/Jetpack release.

Regards,
Jon

Hi,jonathanh

This link won’t open, please re-attach a link.
https://nv-tegra.nvidia.com/gitweb/?p=linux-nvidia.git;a=commit;h=a960d522a5486aee27605f890034869c4f49d94a

Thanks.

Hello!

That is strange it works fine for me and should be a public link. Anyway, attaching patch.

Regards
Jon
rt565x-crash.patch.txt (4.49 KB)

The URL works for me too (an external user). Probably a proxy or firewall issue.

Hi,

I made the following changes in the program, the system can be started.

static int tegra_machine_rt565x_init(struct snd_soc_pcm_runtime *rtd)
{
	struct snd_soc_card *card = rtd->card;
	//struct tegra_machine *machine = snd_soc_card_get_drvdata(card);
	struct snd_soc_jack *jack;
	int err;
/*
	err = tegra_alt_asoc_utils_set_extern_parent(&machine->audio_clock,
							"pll_a_out0");
	if (err < 0) {
		dev_err(card->dev, "Failed to set extern clk parent\n");
		return err;
	}
*/

	jack = devm_kzalloc(card->dev, sizeof(struct snd_soc_jack), GFP_KERNEL);
	if (!jack)
		return -ENOMEM;

	err = snd_soc_card_jack_new(card, "Headset Jack", SND_JACK_HEADSET,
				    jack, NULL, 0);
	if (err) {
		dev_err(card->dev, "Headset Jack creation failed %d\n", err);
		return err;
	}

	err = tegra_machine_add_codec_jack_control(card, rtd, jack);
	if (err) {
		dev_err(card->dev, "Failed to add jack control: %d\n", err);
		return err;
	}
/*
	err = rt5659_set_jack_detect(rtd->codec, jack);
	if (err) {
		dev_err(card->dev, "Failed to set jack for RT565x: %d\n", err);
		return err;
	}
*/
	/* single button supporting play/pause */
	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);

	/* multiple buttons supporting play/pause and volume up/down */
	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_MEDIA);
	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);

	snd_soc_dapm_sync(&card->dapm);

	return 0;
}

Thanks.