// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) // // This file is provided under a dual BSD/GPLv2 license. When using or // redistributing this file, you may do so under either license. // // Copyright(c) 2022 MediaTek Inc. All rights reserved. // // Author: YC Hung <yc.hung@mediatek.com>
/* Get information about the panic status from the debug box area. *Computethetracepointbasedonthestatus.
*/
sof_mailbox_read(sdev, sdev->debug_box.offset + 0x4, &status, 4);
/* Get information about the registers, the filename and line *numberandthestack.
*/
mtk_adsp_get_registers(sdev, &xoops, &panic_info, stack,
MTK_ADSP_STACK_DUMP_SIZE);
/* Print the information to the console */
sof_print_oops_and_stack(sdev, level, status, status, &xoops, &panic_info,
stack, MTK_ADSP_STACK_DUMP_SIZE);
}
EXPORT_SYMBOL(mtk_adsp_dump);
/* Read the message from the debug box. */
sof_mailbox_read(priv->sdev, priv->sdev->debug_box.offset + 4,
&panic_code, sizeof(panic_code));
/* Check to see if the message is a panic code 0x0dead*** */ if ((panic_code & SOF_IPC_PANIC_MAGIC_MASK) == SOF_IPC_PANIC_MAGIC) {
snd_sof_dsp_panic(priv->sdev, panic_code, true);
} else {
snd_sof_ipc_msgs_rx(priv->sdev);
/* Tell DSP cmd is done */
ret = mtk_adsp_ipc_send(priv->dsp_ipc, MTK_ADSP_IPC_RSP, MTK_ADSP_IPC_OP_RSP); if (ret)
dev_err(priv->dev, "request send ipc failed");
}
}
EXPORT_SYMBOL(mtk_adsp_handle_request);
spcm = snd_sof_find_spcm_dai(scomp, rtd); if (!spcm) {
dev_warn_ratelimited(sdev->dev, "warn: can't find PCM with DAI ID %d\n",
rtd->dai_link->id); return0;
}
stream = &spcm->stream[substream->stream];
ret = snd_sof_ipc_msg_data(sdev, stream, &posn, sizeof(posn)); if (ret < 0) {
dev_warn(sdev->dev, "failed to read stream position: %d\n", ret); return0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.