diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig index 322cf65c51ff57..44c8bfbf1d2a4c 100644 --- a/sound/soc/sof/Kconfig +++ b/sound/soc/sof/Kconfig @@ -9,8 +9,9 @@ config SND_SOC_SOF select SND_SOC_TOPOLOGY select SND_SOC_COMPRESS help - This adds support for SOF - Say Y if you have such a device. + This adds support for Sound Open Firmware (SOF). SOF is a free and + generic open source audio DSP firmware for multiple devices. + Say Y if you have such a device that is supported by SOF. If unsure select "N". config SND_SOC_SOF_NOCODEC diff --git a/sound/soc/sof/control.c b/sound/soc/sof/control.c index db09ba63154b69..0e0f928c10c321 100644 --- a/sound/soc/sof/control.c +++ b/sound/soc/sof/control.c @@ -157,20 +157,31 @@ int snd_sof_bytes_get(struct snd_kcontrol *kcontrol, (struct soc_bytes_ext *)kcontrol->private_value; struct snd_sof_control *scontrol = be->dobj.private; struct snd_sof_dev *sdev = scontrol->sdev; - //struct sof_ipc_ctrl_data *cdata = scontrol->control_data; - //unsigned int i, channels = scontrol->num_channels; + struct sof_ipc_ctrl_data *cdata = scontrol->control_data; + struct sof_abi_hdr *data = cdata->data; + size_t size; + int ret = 0; pm_runtime_get_sync(sdev->dev); /* get all the mixer data from DSP */ snd_sof_ipc_get_comp_data(sdev->ipc, scontrol, SOF_IPC_COMP_GET_DATA, SOF_CTRL_TYPE_DATA_GET, scontrol->cmd); + size = data->size + sizeof(*data); + if (size > be->max) { + dev_err(sdev->dev, "error: DSP sent %ld bytes max is %d\n", + size, be->max); + ret = -EINVAL; + goto out; + } - /* TODO: copy back to userspace */ + /* copy back to kcontrol */ + memcpy(ucontrol->value.bytes.data, data, size); +out: pm_runtime_mark_last_busy(sdev->dev); pm_runtime_put_autosuspend(sdev->dev); - return 0; + return ret; } int snd_sof_bytes_put(struct snd_kcontrol *kcontrol, @@ -180,18 +191,28 @@ int snd_sof_bytes_put(struct snd_kcontrol *kcontrol, (struct soc_bytes_ext *)kcontrol->private_value; struct snd_sof_control *scontrol = be->dobj.private; struct snd_sof_dev *sdev = scontrol->sdev; - //struct sof_ipc_ctrl_data *cdata = scontrol->control_data; - //unsigned int i, channels = scontrol->num_channels; + struct sof_ipc_ctrl_data *cdata = scontrol->control_data; + struct sof_abi_hdr *data = cdata->data; + int ret = 0; pm_runtime_get_sync(sdev->dev); - /* TODO: copy from userspace */ + if (data->size > be->max) { + dev_err(sdev->dev, "error: size too big %d bytes max is %d\n", + data->size, be->max); + ret = -EINVAL; + goto out; + } + + /* copy from kcontrol */ + memcpy(data, ucontrol->value.bytes.data, data->size); /* notify DSP of mixer updates */ snd_sof_ipc_set_comp_data(sdev->ipc, scontrol, SOF_IPC_COMP_SET_DATA, SOF_CTRL_TYPE_DATA_SET, scontrol->cmd); +out: pm_runtime_mark_last_busy(sdev->dev); pm_runtime_put_autosuspend(sdev->dev); - return 0; + return ret; } diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index 5aad175d6e2556..fe010440c8f5e9 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -315,8 +315,7 @@ static int sof_probe(struct platform_device *pdev) } ret = snd_soc_register_component(&pdev->dev, sdev->cmpnt_drv, - sdev->ops->dai_drv->drv, - sdev->ops->dai_drv->num_drv); + sdev->ops->drv, sdev->ops->num_drv); if (ret < 0) { dev_err(sdev->dev, "error: failed to register DSP DAI driver %d\n", ret); @@ -367,7 +366,6 @@ void snd_sof_shutdown(struct device *dev) } EXPORT_SYMBOL(snd_sof_shutdown); - static struct platform_driver sof_driver = { .driver = { .name = "sof-audio", diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c index ec966d25816df4..c604decd3a6615 100644 --- a/sound/soc/sof/debug.c +++ b/sound/soc/sof/debug.c @@ -7,6 +7,9 @@ * * Author: Liam Girdwood * Yan Wang + * + * Generic debug routines used to export DSP MMIO and memories to userspace + * for firmware debugging. */ #include @@ -41,6 +44,7 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer, size = dfse->size; + /* validate position & count */ if (pos < 0) return -EINVAL; if (pos >= size || !count) @@ -48,18 +52,22 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer, if (count > size - pos) count = size - pos; + /* intermediate buffer size must be u32 multiple */ size = (count + 3) & ~3; buf = kzalloc(size, GFP_KERNEL); if (!buf) return -ENOMEM; + /* copy from DSP MMIO */ pm_runtime_get(sdev->dev); memcpy_fromio(buf, dfse->buf + pos, size); pm_runtime_put(sdev->dev); + /* copy to userspace */ ret = copy_to_user(buffer, buf, count); kfree(buf); + /* update count & position if copy succeeded */ if (ret == count) return -EFAULT; count -= ret; @@ -109,17 +117,18 @@ int snd_sof_dbg_init(struct snd_sof_dev *sdev) const struct snd_sof_debugfs_map *map; int err = 0, i; + /* use "sof" as top level debugFS dir */ sdev->debugfs_root = debugfs_create_dir("sof", NULL); if (IS_ERR_OR_NULL(sdev->debugfs_root)) { dev_err(sdev->dev, "error: failed to create debugfs directory\n"); return -EINVAL; } + /* create debugFS files for platform specific MMIO/DSP memories */ for (i = 0; i < ops->debug_map_count; i++) { map = &ops->debug_map[i]; - err = snd_sof_debugfs_create_item(sdev, - sdev->bar[map->bar] + + err = snd_sof_debugfs_create_item(sdev, sdev->bar[map->bar] + map->offset, map->size, map->name); if (err < 0) diff --git a/sound/soc/sof/intel/apl.c b/sound/soc/sof/intel/apl.c index 96885d53b7a958..3ff19d94f43937 100644 --- a/sound/soc/sof/intel/apl.c +++ b/sound/soc/sof/intel/apl.c @@ -94,6 +94,7 @@ struct snd_sof_dsp_ops sof_apl_ops = { .trace_trigger = hda_dsp_trace_trigger, /* DAI drivers */ - .dai_drv = &hda_dai_drv, + .drv = skl_dai, + .num_drv = SOF_SKL_NUM_DAIS, }; EXPORT_SYMBOL(sof_apl_ops); diff --git a/sound/soc/sof/intel/bdw.c b/sound/soc/sof/intel/bdw.c index ada4907d558187..ef272108593f64 100644 --- a/sound/soc/sof/intel/bdw.c +++ b/sound/soc/sof/intel/bdw.c @@ -743,11 +743,6 @@ static struct snd_soc_dai_driver bdw_dai[] = { }, }; -static struct snd_sof_dai_drv bdw_dai_drv = { - .drv = bdw_dai, - .num_drv = ARRAY_SIZE(bdw_dai) -}; - /* broadwell ops */ struct snd_sof_dsp_ops sof_bdw_ops = { /*Device init */ @@ -791,7 +786,8 @@ struct snd_sof_dsp_ops sof_bdw_ops = { .load_firmware = snd_sof_load_firmware_memcpy, /* DAI drivers */ - .dai_drv = &bdw_dai_drv, + .drv = bdw_dai, + .num_drv = ARRAY_SIZE(bdw_dai) }; EXPORT_SYMBOL(sof_bdw_ops); diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c index e2dd813e44922a..16b1ede1e1bcbe 100644 --- a/sound/soc/sof/intel/byt.c +++ b/sound/soc/sof/intel/byt.c @@ -811,17 +811,6 @@ static struct snd_soc_dai_driver byt_dai[] = { }, }; -static struct snd_sof_dai_drv byt_dai_drv = { - .drv = byt_dai, - .num_drv = 3, /* we have only 3 SSPs on byt*/ -}; - -static struct snd_sof_dai_drv cht_dai_drv = { - .drv = byt_dai, - /* all 6 SSPs may be available for cherrytrail */ - .num_drv = ARRAY_SIZE(byt_dai), -}; - /* baytrail ops */ struct snd_sof_dsp_ops sof_byt_ops = { /* device init */ @@ -869,7 +858,8 @@ struct snd_sof_dsp_ops sof_byt_ops = { .load_firmware = snd_sof_load_firmware_memcpy, /* DAI drivers */ - .dai_drv = &byt_dai_drv, + .drv = byt_dai, + .num_drv = 3, /* we have only 3 SSPs on byt*/ }; EXPORT_SYMBOL(sof_byt_ops); @@ -920,7 +910,9 @@ struct snd_sof_dsp_ops sof_cht_ops = { .load_firmware = snd_sof_load_firmware_memcpy, /* DAI drivers */ - .dai_drv = &cht_dai_drv, + .drv = byt_dai, + /* all 6 SSPs may be available for cherrytrail */ + .num_drv = ARRAY_SIZE(byt_dai), }; EXPORT_SYMBOL(sof_cht_ops); diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c index f2c616904cbb86..238031634875f6 100644 --- a/sound/soc/sof/intel/cnl.c +++ b/sound/soc/sof/intel/cnl.c @@ -243,6 +243,7 @@ struct snd_sof_dsp_ops sof_cnl_ops = { .trace_trigger = hda_dsp_trace_trigger, /* DAI drivers */ - .dai_drv = &hda_dai_drv, + .drv = skl_dai, + .num_drv = SOF_SKL_NUM_DAIS, }; EXPORT_SYMBOL(sof_cnl_ops); diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index 59e41ee6907210..cca873fc86bc05 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -20,7 +20,7 @@ * some products who use this DAI array only physically have a subset of * the DAIs, but no harm is done here by adding the whole set. */ -static struct snd_soc_dai_driver skl_dai[] = { +struct snd_soc_dai_driver skl_dai[] = { { .name = "SSP0 Pin", .playback = SOF_DAI_STREAM("ssp0 Tx", 1, 8, @@ -111,9 +111,4 @@ static struct snd_soc_dai_driver skl_dai[] = { }, }; -struct snd_sof_dai_drv hda_dai_drv = { - .drv = skl_dai, - .num_drv = ARRAY_SIZE(skl_dai) -}; -EXPORT_SYMBOL(hda_dai_drv); diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 77a2315223a0da..7f63b454e07844 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -305,6 +305,9 @@ #define HDA_DSP_MAX_BDL_ENTRIES \ (HDA_DSP_BDL_SIZE / sizeof(struct sof_intel_dsp_bdl)) +/* Number of DAIs */ +#define SOF_SKL_NUM_DAIS 14 + struct sof_intel_dsp_bdl { u32 addr_l; u32 addr_h; @@ -495,7 +498,7 @@ int hda_dsp_trace_release(struct snd_sof_dev *sdev); int hda_dsp_trace_trigger(struct snd_sof_dev *sdev, int cmd); /* common dai driver */ -extern struct snd_sof_dai_drv hda_dai_drv; +extern struct snd_soc_dai_driver skl_dai[]; /* * Platform Specific HW abstraction Ops. diff --git a/sound/soc/sof/intel/hsw.c b/sound/soc/sof/intel/hsw.c index 42d7fa622ff7c6..c0139855cd6da6 100644 --- a/sound/soc/sof/intel/hsw.c +++ b/sound/soc/sof/intel/hsw.c @@ -743,11 +743,6 @@ static struct snd_soc_dai_driver hsw_dai[] = { }, }; -static struct snd_sof_dai_drv hsw_dai_drv = { - .drv = hsw_dai, - .num_drv = ARRAY_SIZE(hsw_dai) -}; - /* haswell ops */ struct snd_sof_dsp_ops sof_hsw_ops = { /*Device init */ @@ -791,7 +786,8 @@ struct snd_sof_dsp_ops sof_hsw_ops = { .load_firmware = snd_sof_load_firmware_memcpy, /* DAI drivers */ - .dai_drv = &hsw_dai_drv, + .drv = hsw_dai, + .num_drv = ARRAY_SIZE(hsw_dai) }; EXPORT_SYMBOL(sof_hsw_ops); diff --git a/sound/soc/sof/intel/skl.c b/sound/soc/sof/intel/skl.c index 273820203adae4..4c1ae35f371897 100644 --- a/sound/soc/sof/intel/skl.c +++ b/sound/soc/sof/intel/skl.c @@ -94,6 +94,7 @@ struct snd_sof_dsp_ops sof_skl_ops = { .trace_trigger = hda_dsp_trace_trigger, /* DAI drivers */ - .dai_drv = &hda_dai_drv, + .drv = skl_dai, + .num_drv = SOF_SKL_NUM_DAIS, }; EXPORT_SYMBOL(sof_skl_ops); diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c index 0e1e271fb583a3..6fe1fc3a87a954 100644 --- a/sound/soc/sof/nocodec.c +++ b/sound/soc/sof/nocodec.c @@ -46,11 +46,11 @@ int sof_nocodec_setup(struct device *dev, /* create dummy BE dai_links */ links = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link) * - ops->dai_drv->num_drv, GFP_KERNEL); + ops->num_drv, GFP_KERNEL); if (!links) return -ENOMEM; - ret = sof_bes_setup(dev, ops, links, ops->dai_drv->num_drv, + ret = sof_bes_setup(dev, ops, links, ops->num_drv, &sof_nocodec_card); if (ret) { kfree(links); diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index 92da3074f286ef..e4048f129e0d9e 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -141,7 +141,6 @@ static int sof_pcm_hw_params(struct snd_pcm_substream *substream, params); dev_dbg(sdev->dev, "stream_tag %d", pcm.params.stream_tag); - /* send IPC to the DSP */ ret = sof_ipc_tx_message(sdev->ipc, pcm.hdr.cmd, &pcm, sizeof(pcm), &ipc_params_reply, sizeof(ipc_params_reply)); @@ -233,7 +232,6 @@ static int sof_pcm_trigger(struct snd_pcm_substream *substream, int cmd) return -EINVAL; } - /* set RUN firstly per the sequence suggested by firmware team */ snd_sof_pcm_platform_trigger(sdev, substream, cmd); /* send IPC to the DSP */ diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 5def46b92f1957..11f3b1575f8a24 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -63,11 +63,6 @@ struct snd_soc_component; struct sof_intel_hda_dev; struct snd_sof_pdata; -struct snd_sof_dai_drv { - struct snd_soc_dai_driver *drv; - int num_drv; -}; - /* * SOF DSP HW abstraction operations. * Used to abstract DSP HW architecture and any IO busses between host CPU @@ -156,7 +151,8 @@ struct snd_sof_dsp_ops { int (*trace_trigger)(struct snd_sof_dev *sdev, int cmd); /* DAI ops */ - struct snd_sof_dai_drv *dai_drv; + struct snd_soc_dai_driver *drv; + int num_drv; }; /* DSP architecture specific callbacks for oops and stack dumps */ @@ -231,7 +227,7 @@ struct snd_sof_pcm { struct snd_soc_tplg_pcm pcm; struct snd_sof_pcm_stream stream[2]; u32 posn_offset[2]; - struct mutex mutex; + struct mutex mutex; /* access mutex */ struct list_head list; /* list in sdev pcm list */ }; @@ -246,7 +242,7 @@ struct snd_sof_control { enum sof_ipc_ctrl_cmd cmd; u32 *volume_table; /* volume table computed from tlv data*/ - struct mutex mutex; + struct mutex mutex; /* access mutex */ struct list_head list; /* list in sdev control list */ }; @@ -259,7 +255,7 @@ struct snd_sof_widget { int id; struct snd_soc_dapm_widget *widget; - struct mutex mutex; + struct mutex mutex; /* access mutex */ struct list_head list; /* list in sdev widget list */ void *private; /* core does not touch this */ @@ -349,6 +345,7 @@ struct snd_sof_dev { wait_queue_head_t trace_sleep; u32 host_offset; bool dtrace_is_enabled; + bool dtrace_error; void *private; /* core does not touch this */ }; diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index 143a191b381ad0..79071990fd221e 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -204,6 +204,10 @@ static enum sof_ipc_dai_type find_dai(const char *name) return SOF_DAI_INTEL_NONE; } +/* + * Supported Frame format types and lookup, add new ones to end of list. + */ + struct sof_frame_types { const char *name; enum sof_ipc_frame frame; @@ -265,6 +269,11 @@ static int sof_control_load_volume(struct snd_soc_component *scomp, return 0; } +/* + * Topology Token Parsing. + * New tokens should be added to headers and parsing tables below. + */ + struct sof_topology_token { u32 token; u32 type; @@ -1218,6 +1227,7 @@ static int sof_widget_load(struct snd_soc_component *scomp, int index, struct snd_soc_dapm_widget *w, struct snd_soc_tplg_dapm_widget *tw) { + /* nothing todo atm */ return 0; } @@ -1377,6 +1387,10 @@ static int sof_widget_unload(struct snd_soc_component *scomp, return 0; } +/* + * DAI HW configuration. + */ + /* FE DAI - used for any driver specific init */ static int sof_dai_load(struct snd_soc_component *scomp, int index, struct snd_soc_dai_driver *dai_drv, @@ -1491,7 +1505,8 @@ static int sof_link_ssp_load(struct snd_soc_component *scomp, int index, config->id, config->format, config->ssp.mclk_rate, config->ssp.bclk_rate, config->ssp.fsync_rate, config->ssp.sample_valid_bits, - config->ssp.tdm_slot_width, config->ssp.tdm_slots, config->ssp.mclk_id); + config->ssp.tdm_slot_width, config->ssp.tdm_slots, + config->ssp.mclk_id); /* send message to DSP */ ret = sof_ipc_tx_message(sdev->ipc, @@ -1860,6 +1875,7 @@ static int sof_route_load(struct snd_soc_component *scomp, int index, static int sof_route_unload(struct snd_soc_component *scomp, struct snd_soc_dobj *dobj) { + /* TODO: unload routes when topology is changed */ return 0; } @@ -1913,6 +1929,7 @@ static void sof_complete(struct snd_soc_component *scomp) static int sof_manifest(struct snd_soc_component *scomp, int index, struct snd_soc_tplg_manifest *man) { + /* not currently parsed */ return 0; } diff --git a/sound/soc/sof/trace.c b/sound/soc/sof/trace.c index d3aa6e4b46a5f7..04acd78f13be1a 100644 --- a/sound/soc/sof/trace.c +++ b/sound/soc/sof/trace.c @@ -26,10 +26,9 @@ #include "sof-priv.h" #include "ops.h" -static int sof_wait_trace_avail(struct snd_sof_dev *sdev, size_t *count, - loff_t pos, size_t size) +static size_t sof_wait_trace_avail(struct snd_sof_dev *sdev, + loff_t pos, size_t buffer_size) { - size_t avail; wait_queue_entry_t wait; /* @@ -37,14 +36,12 @@ static int sof_wait_trace_avail(struct snd_sof_dev *sdev, size_t *count, * host DMA buffer has been wrapped. We should output the trace data * at the end of host DMA buffer at first. */ - if (sdev->host_offset < pos) { - avail = size - pos; - goto _host_end; - } + if (sdev->host_offset < pos) + return buffer_size - pos; /* If there is available trace data now, it is unnecessary to wait. */ if (sdev->host_offset > pos) - goto _endcheck; + return sdev->host_offset - pos; /* wait for available trace data from FW */ init_waitqueue_entry(&wait, current); @@ -53,22 +50,19 @@ static int sof_wait_trace_avail(struct snd_sof_dev *sdev, size_t *count, if (signal_pending(current)) { remove_wait_queue(&sdev->trace_sleep, &wait); - goto _endcheck; + goto out; } /* set timeout to max value, no error code */ schedule_timeout(MAX_SCHEDULE_TIMEOUT); remove_wait_queue(&sdev->trace_sleep, &wait); -_endcheck: - /* calculate the available count */ - avail = sdev->host_offset - pos; - -_host_end: - /* return min value between available and request count */ - *count = avail < *count ? avail : *count; - - return 0; +out: + /* return bytes available for copy */ + if (sdev->host_offset < pos) + return buffer_size - pos; + else + return sdev->host_offset - pos; } static ssize_t sof_dfsentry_trace_read(struct file *file, char __user *buffer, @@ -76,49 +70,42 @@ static ssize_t sof_dfsentry_trace_read(struct file *file, char __user *buffer, { struct snd_sof_dfsentry_buf *dfse = file->private_data; struct snd_sof_dev *sdev = dfse->sdev; - int err; - loff_t pos = *ppos; - loff_t lpos = pos; - size_t ret, size; + unsigned long rem; + loff_t lpos = *ppos; + size_t avail, buffer_size = dfse->size; - size = dfse->size; + /* make sure we know about any failures on the DSP side */ + sdev->dtrace_error = false; /* check pos and count */ - if (pos < 0) + if (lpos < 0) return -EINVAL; if (!count) return 0; - /* - * If pos exceeds size, it means host DMA buffer has been wrapped. So - * local pos will be truncated from global pos. It is possible to wrap - * host DMA buffer multiply times when keep output long time, so we - * need one loop to process it. - */ - while (lpos >= size) - lpos -= size; - - if (count > size - lpos) - count = size - lpos; + /* check for buffer wrap and count overflow */ + lpos = lpos % buffer_size; + if (count > buffer_size - lpos) + count = buffer_size - lpos; /* get available count based on current host offset */ - err = sof_wait_trace_avail(sdev, &count, lpos, size); - if (err < 0) { - dev_err(sdev->dev, - "error: can't get more trace %d\n", err); - return 0; + avail = sof_wait_trace_avail(sdev, lpos, buffer_size); + if (sdev->dtrace_error) { + dev_err(sdev->dev, "error: trace IO error\n"); + return -EIO; } - /* copy available trace data to debugfs */ - ret = copy_to_user(buffer, dfse->buf + lpos, count); + /* make sure count is <= avail */ + count = avail > count ? count : avail; - if (ret == count) + /* copy available trace data to debugfs */ + rem = copy_to_user(buffer, dfse->buf + lpos, count); + if (rem == count) return -EFAULT; - count -= ret; - /* move debugfs reading position */ - *ppos = pos + count; + *ppos += count; + /* move debugfs reading position */ return count; } @@ -178,7 +165,7 @@ int snd_sof_init_trace(struct snd_sof_dev *sdev) DMA_BUF_SIZE_FOR_TRACE, &sdev->dmatb); if (ret < 0) { dev_err(sdev->dev, - "error: can't alloc buffer for trace%d\n", ret); + "error: can't alloc buffer for trace %d\n", ret); goto page_err; } @@ -258,10 +245,12 @@ int snd_sof_trace_update_pos(struct snd_sof_dev *sdev, return 0; } +/* an error has occurred within the DSP that prevents further trace */ void snd_sof_trace_notify_for_error(struct snd_sof_dev *sdev) { if (sdev->dtrace_is_enabled) { dev_err(sdev->dev, "error: waking up any trace sleepers\n"); + sdev->dtrace_error = true; wake_up(&sdev->trace_sleep); } } diff --git a/sound/soc/sof/utils.c b/sound/soc/sof/utils.c index 215ea84dfe7e68..91c8417500af8c 100644 --- a/sound/soc/sof/utils.c +++ b/sound/soc/sof/utils.c @@ -32,7 +32,7 @@ int sof_bes_setup(struct device *dev, struct snd_sof_dsp_ops *ops, links[i].id = i; links[i].no_pcm = 1; - links[i].cpu_dai_name = ops->dai_drv->drv[i].name; + links[i].cpu_dai_name = ops->drv[i].name; links[i].platform_name = "sof-audio"; links[i].codec_dai_name = "snd-soc-dummy-dai"; links[i].codec_name = "snd-soc-dummy";