core.c (3bc3477915587440035f192c89a1bf9a4360abb3) | core.c (b1a4ee9fd5a2dfb0f23abe58377f816915ec14ba) |
---|---|
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> --- 190 unchanged lines hidden (view full) --- 199 sof_pdata->tplg_filename = desc->nocodec_tplg_filename; 200 201 sof_pdata->machine = mach; 202 snd_sof_set_mach_params(mach, sdev); 203 204 return 0; 205} 206 | 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> --- 190 unchanged lines hidden (view full) --- 199 sof_pdata->tplg_filename = desc->nocodec_tplg_filename; 200 201 sof_pdata->machine = mach; 202 snd_sof_set_mach_params(mach, sdev); 203 204 return 0; 205} 206 |
207static int sof_select_ipc_and_paths(struct snd_sof_dev *sdev) 208{ 209 struct snd_sof_pdata *plat_data = sdev->pdata; 210 struct sof_loadable_file_profile *base_profile = &plat_data->ipc_file_profile_base; 211 struct sof_loadable_file_profile out_profile; 212 struct device *dev = sdev->dev; 213 int ret; 214 215 /* check IPC support */ 216 if (!(BIT(base_profile->ipc_type) & plat_data->desc->ipc_supported_mask)) { 217 dev_err(dev, 218 "ipc_type %d is not supported on this platform, mask is %#x\n", 219 base_profile->ipc_type, plat_data->desc->ipc_supported_mask); 220 return -EINVAL; 221 } 222 223 if (base_profile->ipc_type != plat_data->desc->ipc_default) 224 dev_info(dev, 225 "Module parameter used, overriding default IPC %d to %d\n", 226 plat_data->desc->ipc_default, base_profile->ipc_type); 227 228 if (base_profile->fw_path) 229 dev_dbg(dev, "Module parameter used, changed fw path to %s\n", 230 base_profile->fw_path); 231 else if (base_profile->fw_path_postfix) 232 dev_dbg(dev, "Path postfix appended to default fw path: %s\n", 233 base_profile->fw_path_postfix); 234 235 if (base_profile->fw_lib_path) 236 dev_dbg(dev, "Module parameter used, changed fw_lib path to %s\n", 237 base_profile->fw_lib_path); 238 else if (base_profile->fw_lib_path_postfix) 239 dev_dbg(dev, "Path postfix appended to default fw_lib path: %s\n", 240 base_profile->fw_lib_path_postfix); 241 242 if (base_profile->fw_name) 243 dev_dbg(dev, "Module parameter used, changed fw filename to %s\n", 244 base_profile->fw_name); 245 246 if (base_profile->tplg_path) 247 dev_dbg(dev, "Module parameter used, changed tplg path to %s\n", 248 base_profile->tplg_path); 249 250 if (base_profile->tplg_name) 251 dev_dbg(dev, "Module parameter used, changed tplg name to %s\n", 252 base_profile->tplg_name); 253 254 ret = sof_create_ipc_file_profile(sdev, base_profile, &out_profile); 255 if (ret) 256 return ret; 257 258 plat_data->ipc_type = out_profile.ipc_type; 259 plat_data->fw_filename = out_profile.fw_name; 260 plat_data->fw_filename_prefix = out_profile.fw_path; 261 plat_data->fw_lib_prefix = out_profile.fw_lib_path; 262 plat_data->tplg_filename_prefix = out_profile.tplg_path; 263 plat_data->tplg_filename = out_profile.tplg_name; 264 265 return 0; 266} 267 |
|
207/* 208 * FW Boot State Transition Diagram 209 * 210 * +----------------------------------------------------------------------+ 211 * | | 212 * ------------------ ------------------ | 213 * | | | | | 214 * | BOOT_FAILED |<-------| READY_FAILED | | --- 222 unchanged lines hidden (view full) --- 437 if (plat_data->desc->dspless_mode_supported) { 438 dev_info(dev, "Switching to DSPless mode\n"); 439 sdev->dspless_mode_selected = true; 440 } else { 441 dev_info(dev, "DSPless mode is not supported by the platform\n"); 442 } 443 } 444 | 268/* 269 * FW Boot State Transition Diagram 270 * 271 * +----------------------------------------------------------------------+ 272 * | | 273 * ------------------ ------------------ | 274 * | | | | | 275 * | BOOT_FAILED |<-------| READY_FAILED | | --- 222 unchanged lines hidden (view full) --- 498 if (plat_data->desc->dspless_mode_supported) { 499 dev_info(dev, "Switching to DSPless mode\n"); 500 sdev->dspless_mode_selected = true; 501 } else { 502 dev_info(dev, "DSPless mode is not supported by the platform\n"); 503 } 504 } 505 |
445 /* check IPC support */ 446 if (!(BIT(plat_data->ipc_type) & plat_data->desc->ipc_supported_mask)) { 447 dev_err(dev, "ipc_type %d is not supported on this platform, mask is %#x\n", 448 plat_data->ipc_type, plat_data->desc->ipc_supported_mask); 449 return -EINVAL; 450 } | 506 ret = sof_select_ipc_and_paths(sdev); 507 if (ret) 508 return ret; |
451 452 /* init ops, if necessary */ 453 ret = sof_ops_init(sdev); 454 if (ret < 0) 455 return ret; 456 457 /* check all mandatory ops */ 458 if (!sof_ops(sdev) || !sof_ops(sdev)->probe) { --- 171 unchanged lines hidden --- | 509 510 /* init ops, if necessary */ 511 ret = sof_ops_init(sdev); 512 if (ret < 0) 513 return ret; 514 515 /* check all mandatory ops */ 516 if (!sof_ops(sdev) || !sof_ops(sdev)->probe) { --- 171 unchanged lines hidden --- |