tree:
https://github.com/plbossart/sound fix/sof-bytcr-support
head: 0af86a92c47f38710675d9becd905bdaea5a99ad
commit: 0af86a92c47f38710675d9becd905bdaea5a99ad [1/1] ASoC: SOF: Intel: add BYT-CR
topology quirk for SSP2->SSP0 override
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 0af86a92c47f38710675d9becd905bdaea5a99ad
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
sound/soc/sof/topology.c: In function 'sof_link_ssp_load':
> sound/soc/sof/topology.c:2529:6: error: too few arguments to
function 'soc_intel_is_byt_cr'
if (soc_intel_is_byt_cr()) {
^~~~~~~~~~~~~~~~~~~
In file included from sound/soc/sof/sof-priv.h:31:0,
from sound/soc/sof/topology.c:15:
sound/soc/sof/../intel/common/soc-intel-quirks.h:89:20: note: declared here
static inline bool soc_intel_is_byt_cr(struct platform_device *pdev)
^~~~~~~~~~~~~~~~~~~
vim +/soc_intel_is_byt_cr +2529 sound/soc/sof/topology.c
2491
2492 static int sof_link_ssp_load(struct snd_soc_component *scomp, int index,
2493 struct snd_soc_dai_link *link,
2494 struct snd_soc_tplg_link_config *cfg,
2495 struct snd_soc_tplg_hw_config *hw_config,
2496 struct sof_ipc_dai_config *config)
2497 {
2498 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
2499 struct snd_soc_tplg_private *private = &cfg->priv;
2500 struct sof_ipc_reply reply;
2501 u32 size = sizeof(*config);
2502 int ret;
2503
2504 /* handle master/slave and inverted clocks */
2505 sof_dai_set_format(hw_config, config);
2506
2507 /* init IPC */
2508 memset(&config->ssp, 0, sizeof(struct sof_ipc_dai_ssp_params));
2509 config->hdr.size = size;
2510
2511 ret = sof_parse_tokens(scomp, &config->ssp, ssp_tokens,
2512 ARRAY_SIZE(ssp_tokens), private->array,
2513 le32_to_cpu(private->size));
2514 if (ret != 0) {
2515 dev_err(sdev->dev, "error: parse ssp tokens failed %d\n",
2516 le32_to_cpu(private->size));
2517 return ret;
2518 }
2519
2520 config->ssp.mclk_rate = le32_to_cpu(hw_config->mclk_rate);
2521 config->ssp.bclk_rate = le32_to_cpu(hw_config->bclk_rate);
2522 config->ssp.fsync_rate = le32_to_cpu(hw_config->fsync_rate);
2523 config->ssp.tdm_slots = le32_to_cpu(hw_config->tdm_slots);
2524 config->ssp.tdm_slot_width = le32_to_cpu(hw_config->tdm_slot_width);
2525 config->ssp.mclk_direction = hw_config->mclk_direction;
2526 config->ssp.rx_slots = le32_to_cpu(hw_config->rx_slots);
2527 config->ssp.tx_slots = le32_to_cpu(hw_config->tx_slots);
2528
2529 if (soc_intel_is_byt_cr()) {
2530 if
(config->dai_index == 2) {
2531 dev_dbg(sdev->dev, "BYT-CR detected, using SSP0 instead of
SSP2\n");
2532 config->dai_index = 0;
2533 }
2534 }
2535
2536 dev_dbg(sdev->dev, "tplg: config SSP%d fmt 0x%x mclk %d bclk %d fclk %d
width (%d)%d slots %d mclk id %d quirks %d\n",
2537 config->dai_index, config->format,
2538 config->ssp.mclk_rate, config->ssp.bclk_rate,
2539 config->ssp.fsync_rate, config->ssp.sample_valid_bits,
2540 config->ssp.tdm_slot_width, config->ssp.tdm_slots,
2541 config->ssp.mclk_id, config->ssp.quirks);
2542
2543 /* validate SSP fsync rate and channel count */
2544 if (config->ssp.fsync_rate < 8000 || config->ssp.fsync_rate > 192000)
{
2545 dev_err(sdev->dev, "error: invalid fsync rate for SSP%d\n",
2546 config->dai_index);
2547 return -EINVAL;
2548 }
2549
2550 if (config->ssp.tdm_slots < 1 || config->ssp.tdm_slots > 8) {
2551 dev_err(sdev->dev, "error: invalid channel count for SSP%d\n",
2552 config->dai_index);
2553 return -EINVAL;
2554 }
2555
2556 /* send message to DSP */
2557 ret = sof_ipc_tx_message(sdev->ipc,
2558 config->hdr.cmd, config, size, &reply,
2559 sizeof(reply));
2560
2561 if (ret < 0) {
2562 dev_err(sdev->dev, "error: failed to set DAI config for SSP%d\n",
2563 config->dai_index);
2564 return ret;
2565 }
2566
2567 /* set config for all DAI's with name matching the link name */
2568 ret = sof_set_dai_config(sdev, size, link, config);
2569 if (ret < 0)
2570 dev_err(sdev->dev, "error: failed to save DAI config for SSP%d\n",
2571 config->dai_index);
2572
2573 return ret;
2574 }
2575
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation