Loading sound/soc/generic/simple-card.c +5 −5 Original line number Diff line number Diff line Loading @@ -283,6 +283,11 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv, codec_dai = dai_props->codec_dai = &priv->dais[li->dais++]; ret = asoc_simple_parse_daifmt(dev, node, codec, prefix, &dai_link->dai_fmt); if (ret < 0) goto dai_link_of_err; simple_parse_mclk_fs(top, cpu, codec, dai_props, prefix); ret = asoc_simple_parse_cpu(cpu, dai_link, &single_cpu); Loading @@ -293,11 +298,6 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv, if (ret < 0) goto dai_link_of_err; ret = asoc_simple_parse_daifmt(dev, node, dai_link->codecs->of_node, prefix, &dai_link->dai_fmt); if (ret < 0) goto dai_link_of_err; ret = asoc_simple_parse_platform(plat, dai_link); if (ret < 0) goto dai_link_of_err; Loading sound/soc/soc-core.c +8 −1 Original line number Diff line number Diff line Loading @@ -228,7 +228,10 @@ static void soc_init_card_debugfs(struct snd_soc_card *card) static void soc_cleanup_card_debugfs(struct snd_soc_card *card) { if (!card->debugfs_card_root) return; debugfs_remove_recursive(card->debugfs_card_root); card->debugfs_card_root = NULL; } static void snd_soc_debugfs_init(void) Loading Loading @@ -1010,12 +1013,14 @@ static void soc_remove_link_components(struct snd_soc_card *card, struct snd_soc_component *component; struct snd_soc_rtdcom_list *rtdcom; mutex_lock(&client_mutex); for_each_rtdcom(rtd, rtdcom) { component = rtdcom->component; if (component->driver->remove_order == order) soc_remove_component(component); } mutex_unlock(&client_mutex); } static void soc_remove_dai_links(struct snd_soc_card *card) Loading Loading @@ -2035,8 +2040,10 @@ static void soc_check_tplg_fes(struct snd_soc_card *card) static int soc_cleanup_card_resources(struct snd_soc_card *card) { /* free the ALSA card at first; this syncs with pending operations */ if (card->snd_card) if (card->snd_card) { snd_card_free(card->snd_card); card->snd_card = NULL; } /* remove and free each DAI */ soc_remove_dai_links(card); Loading sound/soc/soc-dapm.c +3 −0 Original line number Diff line number Diff line Loading @@ -2194,7 +2194,10 @@ static void dapm_debugfs_add_widget(struct snd_soc_dapm_widget *w) static void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm) { if (!dapm->debugfs_dapm) return; debugfs_remove_recursive(dapm->debugfs_dapm); dapm->debugfs_dapm = NULL; } #else Loading sound/soc/sof/control.c +5 −4 Original line number Diff line number Diff line Loading @@ -349,6 +349,7 @@ int snd_sof_bytes_put(struct snd_kcontrol *kcontrol, struct snd_sof_dev *sdev = scontrol->sdev; struct sof_ipc_ctrl_data *cdata = scontrol->control_data; struct sof_abi_hdr *data = cdata->data; size_t size = data->size + sizeof(*data); int ret, err; if (be->max > sizeof(ucontrol->value.bytes.data)) { Loading @@ -358,10 +359,10 @@ int snd_sof_bytes_put(struct snd_kcontrol *kcontrol, return -EINVAL; } if (data->size > be->max) { if (size > be->max) { dev_err_ratelimited(sdev->dev, "error: size too big %d bytes max is %d\n", data->size, be->max); "error: size too big %zu bytes max is %d\n", size, be->max); return -EINVAL; } Loading @@ -375,7 +376,7 @@ int snd_sof_bytes_put(struct snd_kcontrol *kcontrol, } /* copy from kcontrol */ memcpy(data, ucontrol->value.bytes.data, data->size); memcpy(data, ucontrol->value.bytes.data, size); /* notify DSP of byte control updates */ snd_sof_ipc_set_get_comp_data(sdev->ipc, scontrol, Loading sound/soc/sof/core.c +25 −4 Original line number Diff line number Diff line Loading @@ -382,7 +382,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) if (IS_ERR(plat_data->pdev_mach)) { ret = PTR_ERR(plat_data->pdev_mach); goto comp_err; goto fw_run_err; } dev_dbg(sdev->dev, "created machine %s\n", Loading @@ -393,8 +393,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) return 0; comp_err: snd_soc_unregister_component(sdev->dev); #if !IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE) fw_run_err: snd_sof_fw_unload(sdev); fw_load_err: Loading @@ -403,6 +402,21 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) snd_sof_free_debug(sdev); dbg_err: snd_sof_remove(sdev); #else /* * when the probe_continue is handled in a work queue, the * probe does not fail so we don't release resources here. * They will be released with an explicit call to * snd_sof_device_remove() when the PCI/ACPI device is removed */ fw_run_err: fw_load_err: ipc_err: dbg_err: #endif return ret; } Loading Loading @@ -484,7 +498,6 @@ int snd_sof_device_remove(struct device *dev) snd_sof_ipc_free(sdev); snd_sof_free_debug(sdev); snd_sof_free_trace(sdev); snd_sof_remove(sdev); /* * Unregister machine driver. This will unbind the snd_card which Loading @@ -494,6 +507,14 @@ int snd_sof_device_remove(struct device *dev) if (!IS_ERR_OR_NULL(pdata->pdev_mach)) platform_device_unregister(pdata->pdev_mach); /* * Unregistering the machine driver results in unloading the topology. * Some widgets, ex: scheduler, attempt to power down the core they are * scheduled on, when they are unloaded. Therefore, the DSP must be * removed only after the topology has been unloaded. */ snd_sof_remove(sdev); /* release firmware */ release_firmware(pdata->fw); pdata->fw = NULL; Loading Loading
sound/soc/generic/simple-card.c +5 −5 Original line number Diff line number Diff line Loading @@ -283,6 +283,11 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv, codec_dai = dai_props->codec_dai = &priv->dais[li->dais++]; ret = asoc_simple_parse_daifmt(dev, node, codec, prefix, &dai_link->dai_fmt); if (ret < 0) goto dai_link_of_err; simple_parse_mclk_fs(top, cpu, codec, dai_props, prefix); ret = asoc_simple_parse_cpu(cpu, dai_link, &single_cpu); Loading @@ -293,11 +298,6 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv, if (ret < 0) goto dai_link_of_err; ret = asoc_simple_parse_daifmt(dev, node, dai_link->codecs->of_node, prefix, &dai_link->dai_fmt); if (ret < 0) goto dai_link_of_err; ret = asoc_simple_parse_platform(plat, dai_link); if (ret < 0) goto dai_link_of_err; Loading
sound/soc/soc-core.c +8 −1 Original line number Diff line number Diff line Loading @@ -228,7 +228,10 @@ static void soc_init_card_debugfs(struct snd_soc_card *card) static void soc_cleanup_card_debugfs(struct snd_soc_card *card) { if (!card->debugfs_card_root) return; debugfs_remove_recursive(card->debugfs_card_root); card->debugfs_card_root = NULL; } static void snd_soc_debugfs_init(void) Loading Loading @@ -1010,12 +1013,14 @@ static void soc_remove_link_components(struct snd_soc_card *card, struct snd_soc_component *component; struct snd_soc_rtdcom_list *rtdcom; mutex_lock(&client_mutex); for_each_rtdcom(rtd, rtdcom) { component = rtdcom->component; if (component->driver->remove_order == order) soc_remove_component(component); } mutex_unlock(&client_mutex); } static void soc_remove_dai_links(struct snd_soc_card *card) Loading Loading @@ -2035,8 +2040,10 @@ static void soc_check_tplg_fes(struct snd_soc_card *card) static int soc_cleanup_card_resources(struct snd_soc_card *card) { /* free the ALSA card at first; this syncs with pending operations */ if (card->snd_card) if (card->snd_card) { snd_card_free(card->snd_card); card->snd_card = NULL; } /* remove and free each DAI */ soc_remove_dai_links(card); Loading
sound/soc/soc-dapm.c +3 −0 Original line number Diff line number Diff line Loading @@ -2194,7 +2194,10 @@ static void dapm_debugfs_add_widget(struct snd_soc_dapm_widget *w) static void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm) { if (!dapm->debugfs_dapm) return; debugfs_remove_recursive(dapm->debugfs_dapm); dapm->debugfs_dapm = NULL; } #else Loading
sound/soc/sof/control.c +5 −4 Original line number Diff line number Diff line Loading @@ -349,6 +349,7 @@ int snd_sof_bytes_put(struct snd_kcontrol *kcontrol, struct snd_sof_dev *sdev = scontrol->sdev; struct sof_ipc_ctrl_data *cdata = scontrol->control_data; struct sof_abi_hdr *data = cdata->data; size_t size = data->size + sizeof(*data); int ret, err; if (be->max > sizeof(ucontrol->value.bytes.data)) { Loading @@ -358,10 +359,10 @@ int snd_sof_bytes_put(struct snd_kcontrol *kcontrol, return -EINVAL; } if (data->size > be->max) { if (size > be->max) { dev_err_ratelimited(sdev->dev, "error: size too big %d bytes max is %d\n", data->size, be->max); "error: size too big %zu bytes max is %d\n", size, be->max); return -EINVAL; } Loading @@ -375,7 +376,7 @@ int snd_sof_bytes_put(struct snd_kcontrol *kcontrol, } /* copy from kcontrol */ memcpy(data, ucontrol->value.bytes.data, data->size); memcpy(data, ucontrol->value.bytes.data, size); /* notify DSP of byte control updates */ snd_sof_ipc_set_get_comp_data(sdev->ipc, scontrol, Loading
sound/soc/sof/core.c +25 −4 Original line number Diff line number Diff line Loading @@ -382,7 +382,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) if (IS_ERR(plat_data->pdev_mach)) { ret = PTR_ERR(plat_data->pdev_mach); goto comp_err; goto fw_run_err; } dev_dbg(sdev->dev, "created machine %s\n", Loading @@ -393,8 +393,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) return 0; comp_err: snd_soc_unregister_component(sdev->dev); #if !IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE) fw_run_err: snd_sof_fw_unload(sdev); fw_load_err: Loading @@ -403,6 +402,21 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) snd_sof_free_debug(sdev); dbg_err: snd_sof_remove(sdev); #else /* * when the probe_continue is handled in a work queue, the * probe does not fail so we don't release resources here. * They will be released with an explicit call to * snd_sof_device_remove() when the PCI/ACPI device is removed */ fw_run_err: fw_load_err: ipc_err: dbg_err: #endif return ret; } Loading Loading @@ -484,7 +498,6 @@ int snd_sof_device_remove(struct device *dev) snd_sof_ipc_free(sdev); snd_sof_free_debug(sdev); snd_sof_free_trace(sdev); snd_sof_remove(sdev); /* * Unregister machine driver. This will unbind the snd_card which Loading @@ -494,6 +507,14 @@ int snd_sof_device_remove(struct device *dev) if (!IS_ERR_OR_NULL(pdata->pdev_mach)) platform_device_unregister(pdata->pdev_mach); /* * Unregistering the machine driver results in unloading the topology. * Some widgets, ex: scheduler, attempt to power down the core they are * scheduled on, when they are unloaded. Therefore, the DSP must be * removed only after the topology has been unloaded. */ snd_sof_remove(sdev); /* release firmware */ release_firmware(pdata->fw); pdata->fw = NULL; Loading