Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7

+140 -84
+13 -2
MAINTAINERS
··· 4021 4021 F: sound/soc/codecs/cros_ec_codec.* 4022 4022 4023 4023 CIRRUS LOGIC AUDIO CODEC DRIVERS 4024 - M: Brian Austin <brian.austin@cirrus.com> 4025 - M: Paul Handrigan <Paul.Handrigan@cirrus.com> 4024 + M: James Schulman <james.schulman@cirrus.com> 4025 + M: David Rhodes <david.rhodes@cirrus.com> 4026 4026 L: alsa-devel@alsa-project.org (moderated for non-subscribers) 4027 4027 S: Maintained 4028 4028 F: sound/soc/codecs/cs* ··· 15614 15614 F: sound/soc/ 15615 15615 F: include/dt-bindings/sound/ 15616 15616 F: include/sound/soc* 15617 + 15618 + SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS 15619 + M: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> 15620 + M: Liam Girdwood <lgirdwood@gmail.com> 15621 + M: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> 15622 + M: Kai Vehmanen <kai.vehmanen@linux.intel.com> 15623 + M: Daniel Baluta <daniel.baluta@nxp.com> 15624 + L: sound-open-firmware@alsa-project.org (moderated for non-subscribers) 15625 + W: https://github.com/thesofproject/linux/ 15626 + S: Supported 15627 + F: sound/soc/sof/ 15617 15628 15618 15629 SOUNDWIRE SUBSYSTEM 15619 15630 M: Vinod Koul <vkoul@kernel.org>
+1
include/sound/soc.h
··· 1066 1066 const struct snd_soc_dapm_route *of_dapm_routes; 1067 1067 int num_of_dapm_routes; 1068 1068 bool fully_routed; 1069 + bool disable_route_checks; 1069 1070 1070 1071 /* lists of probed devices belonging to this card */ 1071 1072 struct list_head component_dev_list;
+1
sound/soc/codecs/max98357a.c
··· 133 133 #ifdef CONFIG_ACPI 134 134 static const struct acpi_device_id max98357a_acpi_match[] = { 135 135 { "MX98357A", 0 }, 136 + { "MX98360A", 0 }, 136 137 {}, 137 138 }; 138 139 MODULE_DEVICE_TABLE(acpi, max98357a_acpi_match);
+1 -1
sound/soc/codecs/rt5682.c
··· 1166 1166 static const struct snd_kcontrol_new rt5682_snd_controls[] = { 1167 1167 /* DAC Digital Volume */ 1168 1168 SOC_DOUBLE_TLV("DAC1 Playback Volume", RT5682_DAC1_DIG_VOL, 1169 - RT5682_L_VOL_SFT + 1, RT5682_R_VOL_SFT + 1, 86, 0, dac_vol_tlv), 1169 + RT5682_L_VOL_SFT + 1, RT5682_R_VOL_SFT + 1, 87, 0, dac_vol_tlv), 1170 1170 1171 1171 /* IN Boost Volume */ 1172 1172 SOC_SINGLE_TLV("CBJ Boost Volume", RT5682_CBJ_BST_CTRL,
+9 -9
sound/soc/codecs/wcd9335.c
··· 4926 4926 .name = "WCD9335", 4927 4927 .range_min = 0x0, 4928 4928 .range_max = WCD9335_MAX_REGISTER, 4929 - .selector_reg = WCD9335_REG(0x0, 0), 4929 + .selector_reg = WCD9335_SEL_REGISTER, 4930 4930 .selector_mask = 0xff, 4931 4931 .selector_shift = 0, 4932 - .window_start = 0x0, 4933 - .window_len = 0x1000, 4932 + .window_start = 0x800, 4933 + .window_len = 0x100, 4934 4934 }, 4935 4935 }; 4936 4936 ··· 4968 4968 { 4969 4969 .name = "WCD9335-IFC-DEV", 4970 4970 .range_min = 0x0, 4971 - .range_max = WCD9335_REG(0, 0x7ff), 4972 - .selector_reg = WCD9335_REG(0, 0x0), 4973 - .selector_mask = 0xff, 4971 + .range_max = WCD9335_MAX_REGISTER, 4972 + .selector_reg = WCD9335_SEL_REGISTER, 4973 + .selector_mask = 0xfff, 4974 4974 .selector_shift = 0, 4975 - .window_start = 0x0, 4976 - .window_len = 0x1000, 4975 + .window_start = 0x800, 4976 + .window_len = 0x400, 4977 4977 }, 4978 4978 }; 4979 4979 ··· 4981 4981 .reg_bits = 16, 4982 4982 .val_bits = 8, 4983 4983 .can_multi_write = true, 4984 - .max_register = WCD9335_REG(0, 0x7FF), 4984 + .max_register = WCD9335_MAX_REGISTER, 4985 4985 .ranges = wcd9335_ifc_ranges, 4986 4986 .num_ranges = ARRAY_SIZE(wcd9335_ifc_ranges), 4987 4987 };
+4 -3
sound/soc/codecs/wcd9335.h
··· 8 8 * in slimbus mode the reg base starts from 0x800 9 9 * in i2s/i2c mode the reg base is 0x0 10 10 */ 11 - #define WCD9335_REG(pg, r) ((pg << 12) | (r) | 0x800) 11 + #define WCD9335_REG(pg, r) ((pg << 8) | (r)) 12 12 #define WCD9335_REG_OFFSET(r) (r & 0xFF) 13 - #define WCD9335_PAGE_OFFSET(r) ((r >> 12) & 0xFF) 13 + #define WCD9335_PAGE_OFFSET(r) ((r >> 8) & 0xFF) 14 14 15 15 /* Page-0 Registers */ 16 16 #define WCD9335_PAGE0_PAGE_REGISTER WCD9335_REG(0x00, 0x000) ··· 600 600 #define WCD9335_CDC_CLK_RST_CTRL_FS_CNT_ENABLE BIT(0) 601 601 #define WCD9335_CDC_CLK_RST_CTRL_FS_CNT_DISABLE 0 602 602 #define WCD9335_CDC_TOP_TOP_CFG1 WCD9335_REG(0x0d, 0x082) 603 - #define WCD9335_MAX_REGISTER WCD9335_REG(0x80, 0x0FF) 603 + #define WCD9335_MAX_REGISTER 0xffff 604 + #define WCD9335_SEL_REGISTER 0x800 604 605 605 606 /* SLIMBUS Slave Registers */ 606 607 #define WCD9335_SLIM_PGD_PORT_INT_EN0 WCD9335_REG(0, 0x30)
+2 -2
sound/soc/codecs/wm_adsp.c
··· 1436 1436 subname = NULL; /* don't append subname */ 1437 1437 break; 1438 1438 case 2: 1439 - ret = snprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, 1439 + ret = scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, 1440 1440 "%s%c %.12s %x", dsp->name, *region_name, 1441 1441 wm_adsp_fw_text[dsp->fw], alg_region->alg); 1442 1442 break; 1443 1443 default: 1444 - ret = snprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, 1444 + ret = scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, 1445 1445 "%s %.12s %x", dsp->name, 1446 1446 wm_adsp_fw_text[dsp->fw], alg_region->alg); 1447 1447 break;
+1
sound/soc/intel/boards/skl_nau88l25_ssm4567.c
··· 686 686 .codec_conf = ssm4567_codec_conf, 687 687 .num_configs = ARRAY_SIZE(ssm4567_codec_conf), 688 688 .fully_routed = true, 689 + .disable_route_checks = true, 689 690 .late_probe = skylake_card_late_probe, 690 691 }; 691 692
-3
sound/soc/intel/skylake/bxt-sst.c
··· 17 17 #include "skl.h" 18 18 19 19 #define BXT_BASEFW_TIMEOUT 3000 20 - #define BXT_INIT_TIMEOUT 300 21 20 #define BXT_ROM_INIT_TIMEOUT 70 22 21 #define BXT_IPC_PURGE_FW 0x01004000 23 22 ··· 36 37 37 38 /* Delay before scheduling D0i3 entry */ 38 39 #define BXT_D0I3_DELAY 5000 39 - 40 - #define BXT_FW_ROM_INIT_RETRY 3 41 40 42 41 static unsigned int bxt_get_errorcode(struct sst_dsp *ctx) 43 42 {
+28 -7
sound/soc/intel/skylake/cnl-sst.c
··· 57 57 ctx->dsp_ops.stream_tag = stream_tag; 58 58 memcpy(ctx->dmab.area, fwdata, fwsize); 59 59 60 + ret = skl_dsp_core_power_up(ctx, SKL_DSP_CORE0_MASK); 61 + if (ret < 0) { 62 + dev_err(ctx->dev, "dsp core0 power up failed\n"); 63 + ret = -EIO; 64 + goto base_fw_load_failed; 65 + } 66 + 60 67 /* purge FW request */ 61 68 sst_dsp_shim_write(ctx, CNL_ADSP_REG_HIPCIDR, 62 69 CNL_ADSP_REG_HIPCIDR_BUSY | (CNL_IPC_PURGE | 63 70 ((stream_tag - 1) << CNL_ROM_CTRL_DMA_ID))); 64 71 65 - ret = cnl_dsp_enable_core(ctx, SKL_DSP_CORE0_MASK); 72 + ret = skl_dsp_start_core(ctx, SKL_DSP_CORE0_MASK); 66 73 if (ret < 0) { 67 - dev_err(ctx->dev, "dsp boot core failed ret: %d\n", ret); 74 + dev_err(ctx->dev, "Start dsp core failed ret: %d\n", ret); 68 75 ret = -EIO; 76 + goto base_fw_load_failed; 77 + } 78 + 79 + ret = sst_dsp_register_poll(ctx, CNL_ADSP_REG_HIPCIDA, 80 + CNL_ADSP_REG_HIPCIDA_DONE, 81 + CNL_ADSP_REG_HIPCIDA_DONE, 82 + BXT_INIT_TIMEOUT, "HIPCIDA Done"); 83 + if (ret < 0) { 84 + dev_err(ctx->dev, "timeout for purge request: %d\n", ret); 69 85 goto base_fw_load_failed; 70 86 } 71 87 ··· 125 109 { 126 110 struct firmware stripped_fw; 127 111 struct skl_dev *cnl = ctx->thread_context; 128 - int ret; 112 + int ret, i; 129 113 130 114 if (!ctx->fw) { 131 115 ret = request_firmware(&ctx->fw, ctx->fw_name, ctx->dev); ··· 147 131 stripped_fw.size = ctx->fw->size; 148 132 skl_dsp_strip_extended_manifest(&stripped_fw); 149 133 150 - ret = cnl_prepare_fw(ctx, stripped_fw.data, stripped_fw.size); 151 - if (ret < 0) { 152 - dev_err(ctx->dev, "prepare firmware failed: %d\n", ret); 153 - goto cnl_load_base_firmware_failed; 134 + for (i = 0; i < BXT_FW_ROM_INIT_RETRY; i++) { 135 + ret = cnl_prepare_fw(ctx, stripped_fw.data, stripped_fw.size); 136 + if (!ret) 137 + break; 138 + dev_dbg(ctx->dev, "prepare firmware failed: %d\n", ret); 154 139 } 140 + 141 + if (ret < 0) 142 + goto cnl_load_base_firmware_failed; 155 143 156 144 ret = sst_transfer_fw_host_dma(ctx); 157 145 if (ret < 0) { ··· 178 158 return 0; 179 159 180 160 cnl_load_base_firmware_failed: 161 + dev_err(ctx->dev, "firmware load failed: %d\n", ret); 181 162 release_firmware(ctx->fw); 182 163 ctx->fw = NULL; 183 164
+2 -1
sound/soc/intel/skylake/skl-nhlt.c
··· 182 182 { 183 183 struct device *dev = &skl->pci->dev; 184 184 185 - sysfs_remove_file(&dev->kobj, &dev_attr_platform_id.attr); 185 + if (skl->nhlt) 186 + sysfs_remove_file(&dev->kobj, &dev_attr_platform_id.attr); 186 187 } 187 188 188 189 /*
+2
sound/soc/intel/skylake/skl-sst-dsp.h
··· 67 67 68 68 #define SKL_FW_INIT 0x1 69 69 #define SKL_FW_RFW_START 0xf 70 + #define BXT_FW_ROM_INIT_RETRY 3 71 + #define BXT_INIT_TIMEOUT 300 70 72 71 73 #define SKL_ADSPIC_IPC 1 72 74 #define SKL_ADSPIS_IPC 1
+13 -16
sound/soc/intel/skylake/skl.c
··· 130 130 struct hdac_ext_link *hlink; 131 131 int ret; 132 132 133 + snd_hdac_set_codec_wakeup(bus, true); 133 134 skl_enable_miscbdcge(bus->dev, false); 134 135 ret = snd_hdac_bus_init_chip(bus, full_reset); 135 136 ··· 139 138 writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV); 140 139 141 140 skl_enable_miscbdcge(bus->dev, true); 141 + snd_hdac_set_codec_wakeup(bus, false); 142 142 143 143 return ret; 144 144 } ··· 483 481 static struct snd_soc_acpi_mach *skl_find_hda_machine(struct skl_dev *skl, 484 482 struct snd_soc_acpi_mach *machines) 485 483 { 486 - struct hdac_bus *bus = skl_to_bus(skl); 487 484 struct snd_soc_acpi_mach *mach; 488 - 489 - /* check if we have any codecs detected on bus */ 490 - if (bus->codec_mask == 0) 491 - return NULL; 492 485 493 486 /* point to common table */ 494 487 mach = snd_soc_acpi_intel_hda_machines; ··· 632 635 { 633 636 struct platform_device_info pdevinfo = {NULL}; 634 637 struct skl_clk_pdata *clk_pdata; 638 + 639 + if (!skl->nhlt) 640 + return 0; 635 641 636 642 clk_pdata = devm_kzalloc(&skl->pci->dev, sizeof(*clk_pdata), 637 643 GFP_KERNEL); ··· 803 803 return; 804 804 } 805 805 806 + skl_init_pci(skl); 807 + skl_dum_set(bus); 808 + 806 809 err = skl_init_chip(bus, true); 807 810 if (err < 0) { 808 811 dev_err(bus->dev, "Init chip failed with err: %d\n", err); ··· 921 918 return -ENXIO; 922 919 } 923 920 924 - snd_hdac_bus_reset_link(bus, true); 925 - 926 921 snd_hdac_bus_parse_capabilities(bus); 927 922 928 923 /* check if PPCAP exists */ ··· 968 967 if (err < 0) 969 968 return err; 970 969 971 - /* initialize chip */ 972 - skl_init_pci(skl); 973 - skl_dum_set(bus); 974 - 975 - return skl_init_chip(bus, true); 970 + return 0; 976 971 } 977 972 978 973 static int skl_probe(struct pci_dev *pci, ··· 1061 1064 if (bus->mlcap) 1062 1065 snd_hdac_ext_bus_get_ml_capabilities(bus); 1063 1066 1064 - snd_hdac_bus_stop_chip(bus); 1065 - 1066 1067 /* create device for soc dmic */ 1067 1068 err = skl_dmic_device_register(skl); 1068 1069 if (err < 0) { ··· 1077 1082 out_clk_free: 1078 1083 skl_clock_device_unregister(skl); 1079 1084 out_nhlt_free: 1080 - intel_nhlt_free(skl->nhlt); 1085 + if (skl->nhlt) 1086 + intel_nhlt_free(skl->nhlt); 1081 1087 out_free: 1082 1088 skl_free(bus); 1083 1089 ··· 1127 1131 skl_dmic_device_unregister(skl); 1128 1132 skl_clock_device_unregister(skl); 1129 1133 skl_nhlt_remove_sysfs(skl); 1130 - intel_nhlt_free(skl->nhlt); 1134 + if (skl->nhlt) 1135 + intel_nhlt_free(skl->nhlt); 1131 1136 skl_free(bus); 1132 1137 dev_set_drvdata(&pci->dev, NULL); 1133 1138 }
+1 -1
sound/soc/jz4740/jz4740-i2s.c
··· 83 83 #define JZ_AIC_I2S_STATUS_BUSY BIT(2) 84 84 85 85 #define JZ_AIC_CLK_DIV_MASK 0xf 86 - #define I2SDIV_DV_SHIFT 8 86 + #define I2SDIV_DV_SHIFT 0 87 87 #define I2SDIV_DV_MASK (0xf << I2SDIV_DV_SHIFT) 88 88 #define I2SDIV_IDV_SHIFT 8 89 89 #define I2SDIV_IDV_MASK (0xf << I2SDIV_IDV_SHIFT)
+23 -7
sound/soc/qcom/qdsp6/q6asm-dai.c
··· 69 69 }; 70 70 71 71 struct q6asm_dai_data { 72 + struct snd_soc_dai_driver *dais; 73 + int num_dais; 72 74 long long int sid; 73 75 }; 74 76 ··· 891 889 .compr_ops = &q6asm_dai_compr_ops, 892 890 }; 893 891 894 - static struct snd_soc_dai_driver q6asm_fe_dais[] = { 892 + static struct snd_soc_dai_driver q6asm_fe_dais_template[] = { 895 893 Q6ASM_FEDAI_DRIVER(1), 896 894 Q6ASM_FEDAI_DRIVER(2), 897 895 Q6ASM_FEDAI_DRIVER(3), ··· 905 903 static int of_q6asm_parse_dai_data(struct device *dev, 906 904 struct q6asm_dai_data *pdata) 907 905 { 908 - static struct snd_soc_dai_driver *dai_drv; 906 + struct snd_soc_dai_driver *dai_drv; 909 907 struct snd_soc_pcm_stream empty_stream; 910 908 struct device_node *node; 911 - int ret, id, dir; 909 + int ret, id, dir, idx = 0; 910 + 911 + 912 + pdata->num_dais = of_get_child_count(dev->of_node); 913 + if (!pdata->num_dais) { 914 + dev_err(dev, "No dais found in DT\n"); 915 + return -EINVAL; 916 + } 917 + 918 + pdata->dais = devm_kcalloc(dev, pdata->num_dais, sizeof(*dai_drv), 919 + GFP_KERNEL); 920 + if (!pdata->dais) 921 + return -ENOMEM; 912 922 913 923 memset(&empty_stream, 0, sizeof(empty_stream)); 914 924 ··· 931 917 continue; 932 918 } 933 919 934 - dai_drv = &q6asm_fe_dais[id]; 920 + dai_drv = &pdata->dais[idx++]; 921 + *dai_drv = q6asm_fe_dais_template[id]; 935 922 936 923 ret = of_property_read_u32(node, "direction", &dir); 937 924 if (ret) ··· 970 955 971 956 dev_set_drvdata(dev, pdata); 972 957 973 - of_q6asm_parse_dai_data(dev, pdata); 958 + rc = of_q6asm_parse_dai_data(dev, pdata); 959 + if (rc) 960 + return rc; 974 961 975 962 return devm_snd_soc_register_component(dev, &q6asm_fe_dai_component, 976 - q6asm_fe_dais, 977 - ARRAY_SIZE(q6asm_fe_dais)); 963 + pdata->dais, pdata->num_dais); 978 964 } 979 965 980 966 static const struct of_device_id q6asm_dai_device_id[] = {
-19
sound/soc/qcom/qdsp6/q6routing.c
··· 918 918 {"MM_UL6", NULL, "MultiMedia6 Mixer"}, 919 919 {"MM_UL7", NULL, "MultiMedia7 Mixer"}, 920 920 {"MM_UL8", NULL, "MultiMedia8 Mixer"}, 921 - 922 - {"MM_DL1", NULL, "MultiMedia1 Playback" }, 923 - {"MM_DL2", NULL, "MultiMedia2 Playback" }, 924 - {"MM_DL3", NULL, "MultiMedia3 Playback" }, 925 - {"MM_DL4", NULL, "MultiMedia4 Playback" }, 926 - {"MM_DL5", NULL, "MultiMedia5 Playback" }, 927 - {"MM_DL6", NULL, "MultiMedia6 Playback" }, 928 - {"MM_DL7", NULL, "MultiMedia7 Playback" }, 929 - {"MM_DL8", NULL, "MultiMedia8 Playback" }, 930 - 931 - {"MultiMedia1 Capture", NULL, "MM_UL1"}, 932 - {"MultiMedia2 Capture", NULL, "MM_UL2"}, 933 - {"MultiMedia3 Capture", NULL, "MM_UL3"}, 934 - {"MultiMedia4 Capture", NULL, "MM_UL4"}, 935 - {"MultiMedia5 Capture", NULL, "MM_UL5"}, 936 - {"MultiMedia6 Capture", NULL, "MM_UL6"}, 937 - {"MultiMedia7 Capture", NULL, "MM_UL7"}, 938 - {"MultiMedia8 Capture", NULL, "MM_UL8"}, 939 - 940 921 }; 941 922 942 923 static int routing_hw_params(struct snd_soc_component *component,
+24 -4
sound/soc/soc-core.c
··· 1260 1260 ret = snd_soc_dapm_add_routes(dapm, 1261 1261 component->driver->dapm_routes, 1262 1262 component->driver->num_dapm_routes); 1263 - if (ret < 0) 1264 - goto err_probe; 1263 + if (ret < 0) { 1264 + if (card->disable_route_checks) { 1265 + dev_info(card->dev, 1266 + "%s: disable_route_checks set, ignoring errors on add_routes\n", 1267 + __func__); 1268 + } else { 1269 + dev_err(card->dev, 1270 + "%s: snd_soc_dapm_add_routes failed: %d\n", 1271 + __func__, ret); 1272 + goto err_probe; 1273 + } 1274 + } 1265 1275 1266 1276 /* see for_each_card_components */ 1267 1277 list_add(&component->card_list, &card->component_dev_list); ··· 1958 1948 1959 1949 ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes, 1960 1950 card->num_dapm_routes); 1961 - if (ret < 0) 1962 - goto probe_end; 1951 + if (ret < 0) { 1952 + if (card->disable_route_checks) { 1953 + dev_info(card->dev, 1954 + "%s: disable_route_checks set, ignoring errors on add_routes\n", 1955 + __func__); 1956 + } else { 1957 + dev_err(card->dev, 1958 + "%s: snd_soc_dapm_add_routes failed: %d\n", 1959 + __func__, ret); 1960 + goto probe_end; 1961 + } 1962 + } 1963 1963 1964 1964 ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes, 1965 1965 card->num_of_dapm_routes);
+13 -9
sound/soc/soc-topology.c
··· 251 251 { 252 252 int ret = 0; 253 253 254 - if (tplg->comp && tplg->ops && tplg->ops->vendor_load) 254 + if (tplg->ops && tplg->ops->vendor_load) 255 255 ret = tplg->ops->vendor_load(tplg->comp, tplg->index, hdr); 256 256 else { 257 257 dev_err(tplg->dev, "ASoC: no vendor load callback for ID %d\n", ··· 283 283 static int soc_tplg_widget_load(struct soc_tplg *tplg, 284 284 struct snd_soc_dapm_widget *w, struct snd_soc_tplg_dapm_widget *tplg_w) 285 285 { 286 - if (tplg->comp && tplg->ops && tplg->ops->widget_load) 286 + if (tplg->ops && tplg->ops->widget_load) 287 287 return tplg->ops->widget_load(tplg->comp, tplg->index, w, 288 288 tplg_w); 289 289 ··· 295 295 static int soc_tplg_widget_ready(struct soc_tplg *tplg, 296 296 struct snd_soc_dapm_widget *w, struct snd_soc_tplg_dapm_widget *tplg_w) 297 297 { 298 - if (tplg->comp && tplg->ops && tplg->ops->widget_ready) 298 + if (tplg->ops && tplg->ops->widget_ready) 299 299 return tplg->ops->widget_ready(tplg->comp, tplg->index, w, 300 300 tplg_w); 301 301 ··· 307 307 struct snd_soc_dai_driver *dai_drv, 308 308 struct snd_soc_tplg_pcm *pcm, struct snd_soc_dai *dai) 309 309 { 310 - if (tplg->comp && tplg->ops && tplg->ops->dai_load) 310 + if (tplg->ops && tplg->ops->dai_load) 311 311 return tplg->ops->dai_load(tplg->comp, tplg->index, dai_drv, 312 312 pcm, dai); 313 313 ··· 318 318 static int soc_tplg_dai_link_load(struct soc_tplg *tplg, 319 319 struct snd_soc_dai_link *link, struct snd_soc_tplg_link_config *cfg) 320 320 { 321 - if (tplg->comp && tplg->ops && tplg->ops->link_load) 321 + if (tplg->ops && tplg->ops->link_load) 322 322 return tplg->ops->link_load(tplg->comp, tplg->index, link, cfg); 323 323 324 324 return 0; ··· 327 327 /* tell the component driver that all firmware has been loaded in this request */ 328 328 static void soc_tplg_complete(struct soc_tplg *tplg) 329 329 { 330 - if (tplg->comp && tplg->ops && tplg->ops->complete) 330 + if (tplg->ops && tplg->ops->complete) 331 331 tplg->ops->complete(tplg->comp); 332 332 } 333 333 ··· 684 684 static int soc_tplg_init_kcontrol(struct soc_tplg *tplg, 685 685 struct snd_kcontrol_new *k, struct snd_soc_tplg_ctl_hdr *hdr) 686 686 { 687 - if (tplg->comp && tplg->ops && tplg->ops->control_load) 687 + if (tplg->ops && tplg->ops->control_load) 688 688 return tplg->ops->control_load(tplg->comp, tplg->index, k, 689 689 hdr); 690 690 ··· 1174 1174 static int soc_tplg_add_route(struct soc_tplg *tplg, 1175 1175 struct snd_soc_dapm_route *route) 1176 1176 { 1177 - if (tplg->comp && tplg->ops && tplg->ops->dapm_route_load) 1177 + if (tplg->ops && tplg->ops->dapm_route_load) 1178 1178 return tplg->ops->dapm_route_load(tplg->comp, tplg->index, 1179 1179 route); 1180 1180 ··· 2564 2564 } 2565 2565 2566 2566 /* pass control to component driver for optional further init */ 2567 - if (tplg->comp && tplg->ops && tplg->ops->manifest) 2567 + if (tplg->ops && tplg->ops->manifest) 2568 2568 ret = tplg->ops->manifest(tplg->comp, tplg->index, _manifest); 2569 2569 2570 2570 if (!abi_match) /* free the duplicated one */ ··· 2735 2735 { 2736 2736 struct soc_tplg tplg; 2737 2737 int ret; 2738 + 2739 + /* component needs to exist to keep and reference data while parsing */ 2740 + if (!comp) 2741 + return -EINVAL; 2738 2742 2739 2743 /* setup parsing context */ 2740 2744 memset(&tplg, 0, sizeof(tplg));
+2
sound/soc/sof/intel/hda-stream.c
··· 547 547 SOF_HDA_REG_PP_PPCTL, mask, 0); 548 548 spin_unlock_irq(&bus->reg_lock); 549 549 550 + stream->substream = NULL; 551 + 550 552 return 0; 551 553 } 552 554