core.c (6e9548cdb30e5d6724236dd7b89a79a270751485) core.c (3dc0d709177828a22dfc9d0072e3ac937ef90d06)
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2//
3// This file is provided under a dual BSD/GPLv2 license. When using or
4// redistributing this file, you may do so under either license.
5//
6// Copyright(c) 2018 Intel Corporation. All rights reserved.
7//
8// Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
9//
10
11#include <linux/firmware.h>
12#include <linux/module.h>
13#include <sound/soc.h>
14#include <sound/sof.h>
15#include "sof-priv.h"
16#include "ops.h"
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2//
3// This file is provided under a dual BSD/GPLv2 license. When using or
4// redistributing this file, you may do so under either license.
5//
6// Copyright(c) 2018 Intel Corporation. All rights reserved.
7//
8// Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
9//
10
11#include <linux/firmware.h>
12#include <linux/module.h>
13#include <sound/soc.h>
14#include <sound/sof.h>
15#include "sof-priv.h"
16#include "ops.h"
17#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_PROBES)
18#include "sof-probes.h"
19#endif
20
21/* see SOF_DBG_ flags */
22static int sof_core_debug = IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE);
23module_param_named(sof_debug, sof_core_debug, int, 0444);
24MODULE_PARM_DESC(sof_debug, "SOF core debug options (0x0 all off)");
25
26/* SOF defaults if not provided by the platform in ms */
27#define TIMEOUT_DEFAULT_IPC_MS 500

--- 325 unchanged lines hidden (view full) ---

353 /* initialize sof device */
354 sdev->dev = dev;
355
356 /* initialize default DSP power state */
357 sdev->dsp_power_state.state = SOF_DSP_PM_D0;
358
359 sdev->pdata = plat_data;
360 sdev->first_boot = true;
17
18/* see SOF_DBG_ flags */
19static int sof_core_debug = IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE);
20module_param_named(sof_debug, sof_core_debug, int, 0444);
21MODULE_PARM_DESC(sof_debug, "SOF core debug options (0x0 all off)");
22
23/* SOF defaults if not provided by the platform in ms */
24#define TIMEOUT_DEFAULT_IPC_MS 500

--- 325 unchanged lines hidden (view full) ---

350 /* initialize sof device */
351 sdev->dev = dev;
352
353 /* initialize default DSP power state */
354 sdev->dsp_power_state.state = SOF_DSP_PM_D0;
355
356 sdev->pdata = plat_data;
357 sdev->first_boot = true;
361#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_PROBES)
362 sdev->extractor_stream_tag = SOF_PROBE_INVALID_NODE_ID;
363#endif
364 dev_set_drvdata(dev, sdev);
365
366 /* check all mandatory ops */
367 if (!sof_ops(sdev) || !sof_ops(sdev)->probe || !sof_ops(sdev)->run ||
368 !sof_ops(sdev)->block_read || !sof_ops(sdev)->block_write ||
369 !sof_ops(sdev)->send_msg || !sof_ops(sdev)->load_firmware ||
370 !sof_ops(sdev)->ipc_msg_data || !sof_ops(sdev)->ipc_pcm_params ||
371 !sof_ops(sdev)->fw_ready) {

--- 116 unchanged lines hidden ---
358 dev_set_drvdata(dev, sdev);
359
360 /* check all mandatory ops */
361 if (!sof_ops(sdev) || !sof_ops(sdev)->probe || !sof_ops(sdev)->run ||
362 !sof_ops(sdev)->block_read || !sof_ops(sdev)->block_write ||
363 !sof_ops(sdev)->send_msg || !sof_ops(sdev)->load_firmware ||
364 !sof_ops(sdev)->ipc_msg_data || !sof_ops(sdev)->ipc_pcm_params ||
365 !sof_ops(sdev)->fw_ready) {

--- 116 unchanged lines hidden ---