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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"The regular "bump-in-the-middle" updates, containing mostly ASoC-
related fixes at this time. All changes are reasonably small.

A few entries are for ASoC and ALSA core parts (DAPM, PCM, topology)
for followups of the recent changes and potential buffer overflow by
snprintf(), while the rest are (both new and old) device-specific
fixes for Intel, meson, tas2562, rt1015, as well as the usual HD-audio
quirks"

* tag 'sound-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits)
ALSA: sgio2audio: Remove usage of dropped hw_params/hw_free functions
ALSA: hda/realtek - Enable the headset of ASUS B9450FA with ALC294
ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master
ALSA: hda/realtek - Add Headset Button supported for ThinkPad X1
ALSA: hda/realtek - Add Headset Mic supported
ASoC: wm8741: Fix typo in Kconfig prompt
ASoC: stm32: sai: manage rebind issue
ASoC: SOF: Fix snd_sof_ipc_stream_posn()
ASoC: rt1015: modify pre-divider for sysclk
ASoC: rt1015: add operation callback function for rt1015_dai[]
ASoC: soc-component: tidyup snd_soc_pcm_component_sync_stop()
ASoC: dapm: Correct DAPM handling of active widgets during shutdown
ASoC: tas2562: Fix sample rate error message
ASoC: Intel: Skylake: Fix available clock counter incrementation
ASoC: soc-pcm/soc-compress: don't use snd_soc_dapm_stream_stop()
ASoC: meson: g12a: add tohdmitx reset
ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path
ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro
ASoC: topology: Fix memleak in soc_tplg_manifest_load()
ASoC: topology: Fix memleak in soc_tplg_link_elems_load()
...

+98 -62
+1 -1
include/sound/soc.h
··· 1157 1157 ((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]); \ 1158 1158 (i)++) 1159 1159 #define for_each_rtd_codec_dai_rollback(rtd, i, dai) \ 1160 - for (; ((--i) >= 0) && ((dai) = rtd->codec_dais[i]);) 1160 + for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);) 1161 1161 1162 1162 void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd); 1163 1163
-6
sound/mips/sgio2audio.c
··· 649 649 static const struct snd_pcm_ops snd_sgio2audio_playback1_ops = { 650 650 .open = snd_sgio2audio_playback1_open, 651 651 .close = snd_sgio2audio_pcm_close, 652 - .hw_params = snd_sgio2audio_pcm_hw_params, 653 - .hw_free = snd_sgio2audio_pcm_hw_free, 654 652 .prepare = snd_sgio2audio_pcm_prepare, 655 653 .trigger = snd_sgio2audio_pcm_trigger, 656 654 .pointer = snd_sgio2audio_pcm_pointer, ··· 657 659 static const struct snd_pcm_ops snd_sgio2audio_playback2_ops = { 658 660 .open = snd_sgio2audio_playback2_open, 659 661 .close = snd_sgio2audio_pcm_close, 660 - .hw_params = snd_sgio2audio_pcm_hw_params, 661 - .hw_free = snd_sgio2audio_pcm_hw_free, 662 662 .prepare = snd_sgio2audio_pcm_prepare, 663 663 .trigger = snd_sgio2audio_pcm_trigger, 664 664 .pointer = snd_sgio2audio_pcm_pointer, ··· 665 669 static const struct snd_pcm_ops snd_sgio2audio_capture_ops = { 666 670 .open = snd_sgio2audio_capture_open, 667 671 .close = snd_sgio2audio_pcm_close, 668 - .hw_params = snd_sgio2audio_pcm_hw_params, 669 - .hw_free = snd_sgio2audio_pcm_hw_free, 670 672 .prepare = snd_sgio2audio_pcm_prepare, 671 673 .trigger = snd_sgio2audio_pcm_trigger, 672 674 .pointer = snd_sgio2audio_pcm_pointer,
+27 -4
sound/pci/hda/patch_realtek.c
··· 2447 2447 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), 2448 2448 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE), 2449 2449 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), 2450 + SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_CLEVO_P950), 2450 2451 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950), 2451 2452 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950), 2452 2453 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950), ··· 5921 5920 ALC289_FIXUP_DUAL_SPK, 5922 5921 ALC294_FIXUP_SPK2_TO_DAC1, 5923 5922 ALC294_FIXUP_ASUS_DUAL_SPK, 5924 - 5923 + ALC285_FIXUP_THINKPAD_HEADSET_JACK, 5924 + ALC294_FIXUP_ASUS_HPE, 5925 5925 }; 5926 5926 5927 5927 static const struct hda_fixup alc269_fixups[] = { ··· 6686 6684 [ALC285_FIXUP_SPEAKER2_TO_DAC1] = { 6687 6685 .type = HDA_FIXUP_FUNC, 6688 6686 .v.func = alc285_fixup_speaker2_to_dac1, 6687 + .chained = true, 6688 + .chain_id = ALC269_FIXUP_THINKPAD_ACPI 6689 6689 }, 6690 6690 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER] = { 6691 6691 .type = HDA_FIXUP_PINS, ··· 7044 7040 .chained = true, 7045 7041 .chain_id = ALC294_FIXUP_SPK2_TO_DAC1 7046 7042 }, 7047 - 7043 + [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = { 7044 + .type = HDA_FIXUP_FUNC, 7045 + .v.func = alc_fixup_headset_jack, 7046 + .chained = true, 7047 + .chain_id = ALC285_FIXUP_SPEAKER2_TO_DAC1 7048 + }, 7049 + [ALC294_FIXUP_ASUS_HPE] = { 7050 + .type = HDA_FIXUP_VERBS, 7051 + .v.verbs = (const struct hda_verb[]) { 7052 + /* Set EAPD high */ 7053 + { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f }, 7054 + { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 }, 7055 + { } 7056 + }, 7057 + .chained = true, 7058 + .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 7059 + }, 7048 7060 }; 7049 7061 7050 7062 static const struct snd_pci_quirk alc269_fixup_tbl[] = { ··· 7135 7115 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 7136 7116 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK), 7137 7117 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK), 7118 + SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE), 7119 + SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE), 7138 7120 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 7139 7121 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 7140 7122 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), ··· 7226 7204 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), 7227 7205 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), 7228 7206 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), 7207 + SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE), 7229 7208 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), 7230 7209 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC), 7231 7210 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), ··· 7297 7274 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 7298 7275 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 7299 7276 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 7300 - SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Yoga 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1), 7301 - SND_PCI_QUIRK(0x17aa, 0x2293, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1), 7277 + SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Yoga 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), 7278 + SND_PCI_QUIRK(0x17aa, 0x2293, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), 7302 7279 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 7303 7280 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 7304 7281 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
+1 -1
sound/soc/codecs/Kconfig
··· 1406 1406 depends on SND_SOC_I2C_AND_SPI 1407 1407 1408 1408 config SND_SOC_WM8741 1409 - tristate "Wolfson Microelectronics WM8737 DAC" 1409 + tristate "Wolfson Microelectronics WM8741 DAC" 1410 1410 depends on SND_SOC_I2C_AND_SPI 1411 1411 1412 1412 config SND_SOC_WM8750
+5 -3
sound/soc/codecs/pcm512x.c
··· 1564 1564 } 1565 1565 1566 1566 pcm512x->sclk = devm_clk_get(dev, NULL); 1567 - if (PTR_ERR(pcm512x->sclk) == -EPROBE_DEFER) 1568 - return -EPROBE_DEFER; 1567 + if (PTR_ERR(pcm512x->sclk) == -EPROBE_DEFER) { 1568 + ret = -EPROBE_DEFER; 1569 + goto err; 1570 + } 1569 1571 if (!IS_ERR(pcm512x->sclk)) { 1570 1572 ret = clk_prepare_enable(pcm512x->sclk); 1571 1573 if (ret != 0) { 1572 1574 dev_err(dev, "Failed to enable SCLK: %d\n", ret); 1573 - return ret; 1575 + goto err; 1574 1576 } 1575 1577 } 1576 1578
+2 -1
sound/soc/codecs/rt1015.c
··· 664 664 snd_soc_component_update_bits(component, RT1015_TDM_MASTER, 665 665 RT1015_I2S_DL_MASK, val_len); 666 666 snd_soc_component_update_bits(component, RT1015_CLK2, 667 - RT1015_FS_PD_MASK, pre_div); 667 + RT1015_FS_PD_MASK, pre_div << RT1015_FS_PD_SFT); 668 668 669 669 return 0; 670 670 } ··· 857 857 .rates = RT1015_STEREO_RATES, 858 858 .formats = RT1015_FORMATS, 859 859 }, 860 + .ops = &rt1015_aif_dai_ops, 860 861 } 861 862 }; 862 863
+3 -2
sound/soc/codecs/tas2562.c
··· 215 215 break; 216 216 217 217 default: 218 - dev_info(tas2562->dev, "Not supported params format\n"); 218 + dev_info(tas2562->dev, "Unsupported bitwidth format\n"); 219 + return -EINVAL; 219 220 } 220 221 221 222 ret = snd_soc_component_update_bits(tas2562->component, ··· 252 251 253 252 ret = tas2562_set_samplerate(tas2562, params_rate(params)); 254 253 if (ret) 255 - dev_err(tas2562->dev, "set bitwidth failed, %d\n", ret); 254 + dev_err(tas2562->dev, "set sample rate failed, %d\n", ret); 256 255 257 256 return ret; 258 257 }
+17 -15
sound/soc/intel/skylake/skl-debug.c
··· 34 34 int i; 35 35 ssize_t ret = 0; 36 36 37 - for (i = 0; i < max_pin; i++) 38 - ret += snprintf(buf + size, MOD_BUF - size, 37 + for (i = 0; i < max_pin; i++) { 38 + ret += scnprintf(buf + size, MOD_BUF - size, 39 39 "%s %d\n\tModule %d\n\tInstance %d\n\t" 40 40 "In-used %s\n\tType %s\n" 41 41 "\tState %d\n\tIndex %d\n", ··· 45 45 m_pin[i].in_use ? "Used" : "Unused", 46 46 m_pin[i].is_dynamic ? "Dynamic" : "Static", 47 47 m_pin[i].pin_state, i); 48 + size += ret; 49 + } 48 50 return ret; 49 51 } 50 52 51 53 static ssize_t skl_print_fmt(struct skl_module_fmt *fmt, char *buf, 52 54 ssize_t size, bool direction) 53 55 { 54 - return snprintf(buf + size, MOD_BUF - size, 56 + return scnprintf(buf + size, MOD_BUF - size, 55 57 "%s\n\tCh %d\n\tFreq %d\n\tBit depth %d\n\t" 56 58 "Valid bit depth %d\n\tCh config %#x\n\tInterleaving %d\n\t" 57 59 "Sample Type %d\n\tCh Map %#x\n", ··· 77 75 if (!buf) 78 76 return -ENOMEM; 79 77 80 - ret = snprintf(buf, MOD_BUF, "Module:\n\tUUID %pUL\n\tModule id %d\n" 78 + ret = scnprintf(buf, MOD_BUF, "Module:\n\tUUID %pUL\n\tModule id %d\n" 81 79 "\tInstance id %d\n\tPvt_id %d\n", mconfig->guid, 82 80 mconfig->id.module_id, mconfig->id.instance_id, 83 81 mconfig->id.pvt_id); 84 82 85 - ret += snprintf(buf + ret, MOD_BUF - ret, 83 + ret += scnprintf(buf + ret, MOD_BUF - ret, 86 84 "Resources:\n\tCPC %#x\n\tIBS %#x\n\tOBS %#x\t\n", 87 85 res->cpc, res->ibs, res->obs); 88 86 89 - ret += snprintf(buf + ret, MOD_BUF - ret, 87 + ret += scnprintf(buf + ret, MOD_BUF - ret, 90 88 "Module data:\n\tCore %d\n\tIn queue %d\n\t" 91 89 "Out queue %d\n\tType %s\n", 92 90 mconfig->core_id, mconfig->max_in_queue, ··· 96 94 ret += skl_print_fmt(mconfig->in_fmt, buf, ret, true); 97 95 ret += skl_print_fmt(mconfig->out_fmt, buf, ret, false); 98 96 99 - ret += snprintf(buf + ret, MOD_BUF - ret, 97 + ret += scnprintf(buf + ret, MOD_BUF - ret, 100 98 "Fixup:\n\tParams %#x\n\tConverter %#x\n", 101 99 mconfig->params_fixup, mconfig->converter); 102 100 103 - ret += snprintf(buf + ret, MOD_BUF - ret, 101 + ret += scnprintf(buf + ret, MOD_BUF - ret, 104 102 "Module Gateway:\n\tType %#x\n\tVbus %#x\n\tHW conn %#x\n\tSlot %#x\n", 105 103 mconfig->dev_type, mconfig->vbus_id, 106 104 mconfig->hw_conn_type, mconfig->time_slot); 107 105 108 - ret += snprintf(buf + ret, MOD_BUF - ret, 106 + ret += scnprintf(buf + ret, MOD_BUF - ret, 109 107 "Pipeline:\n\tID %d\n\tPriority %d\n\tConn Type %d\n\t" 110 108 "Pages %#x\n", mconfig->pipe->ppl_id, 111 109 mconfig->pipe->pipe_priority, mconfig->pipe->conn_type, 112 110 mconfig->pipe->memory_pages); 113 111 114 - ret += snprintf(buf + ret, MOD_BUF - ret, 112 + ret += scnprintf(buf + ret, MOD_BUF - ret, 115 113 "\tParams:\n\t\tHost DMA %d\n\t\tLink DMA %d\n", 116 114 mconfig->pipe->p_params->host_dma_id, 117 115 mconfig->pipe->p_params->link_dma_id); 118 116 119 - ret += snprintf(buf + ret, MOD_BUF - ret, 117 + ret += scnprintf(buf + ret, MOD_BUF - ret, 120 118 "\tPCM params:\n\t\tCh %d\n\t\tFreq %d\n\t\tFormat %d\n", 121 119 mconfig->pipe->p_params->ch, 122 120 mconfig->pipe->p_params->s_freq, 123 121 mconfig->pipe->p_params->s_fmt); 124 122 125 - ret += snprintf(buf + ret, MOD_BUF - ret, 123 + ret += scnprintf(buf + ret, MOD_BUF - ret, 126 124 "\tLink %#x\n\tStream %#x\n", 127 125 mconfig->pipe->p_params->linktype, 128 126 mconfig->pipe->p_params->stream); 129 127 130 - ret += snprintf(buf + ret, MOD_BUF - ret, 128 + ret += scnprintf(buf + ret, MOD_BUF - ret, 131 129 "\tState %d\n\tPassthru %s\n", 132 130 mconfig->pipe->state, 133 131 mconfig->pipe->passthru ? "true" : "false"); ··· 137 135 ret += skl_print_pins(mconfig->m_out_pin, buf, 138 136 mconfig->max_out_queue, ret, false); 139 137 140 - ret += snprintf(buf + ret, MOD_BUF - ret, 138 + ret += scnprintf(buf + ret, MOD_BUF - ret, 141 139 "Other:\n\tDomain %d\n\tHomogeneous Input %s\n\t" 142 140 "Homogeneous Output %s\n\tIn Queue Mask %d\n\t" 143 141 "Out Queue Mask %d\n\tDMA ID %d\n\tMem Pages %d\n\t" ··· 193 191 __ioread32_copy(d->fw_read_buff, fw_reg_addr, w0_stat_sz >> 2); 194 192 195 193 for (offset = 0; offset < FW_REG_SIZE; offset += 16) { 196 - ret += snprintf(tmp + ret, FW_REG_BUF - ret, "%#.4x: ", offset); 194 + ret += scnprintf(tmp + ret, FW_REG_BUF - ret, "%#.4x: ", offset); 197 195 hex_dump_to_buffer(d->fw_read_buff + offset, 16, 16, 4, 198 196 tmp + ret, FW_REG_BUF - ret, 0); 199 197 ret += strlen(tmp + ret);
+3 -1
sound/soc/intel/skylake/skl-ssp-clk.c
··· 384 384 &clks[i], clk_pdata, i); 385 385 386 386 if (IS_ERR(data->clk[data->avail_clk_cnt])) { 387 - ret = PTR_ERR(data->clk[data->avail_clk_cnt++]); 387 + ret = PTR_ERR(data->clk[data->avail_clk_cnt]); 388 388 goto err_unreg_skl_clk; 389 389 } 390 + 391 + data->avail_clk_cnt++; 390 392 } 391 393 392 394 platform_set_drvdata(pdev, data);
+6
sound/soc/meson/g12a-tohdmitx.c
··· 8 8 #include <linux/module.h> 9 9 #include <sound/pcm_params.h> 10 10 #include <linux/regmap.h> 11 + #include <linux/reset.h> 11 12 #include <sound/soc.h> 12 13 #include <sound/soc-dai.h> 13 14 ··· 379 378 struct device *dev = &pdev->dev; 380 379 void __iomem *regs; 381 380 struct regmap *map; 381 + int ret; 382 + 383 + ret = device_reset(dev); 384 + if (ret) 385 + return ret; 382 386 383 387 regs = devm_platform_ioremap_resource(pdev, 0); 384 388 if (IS_ERR(regs))
+1 -1
sound/soc/soc-component.c
··· 451 451 int i, ret; 452 452 453 453 for_each_rtd_components(rtd, i, component) { 454 - if (component->driver->ioctl) { 454 + if (component->driver->sync_stop) { 455 455 ret = component->driver->sync_stop(component, 456 456 substream); 457 457 if (ret < 0)
+1 -1
sound/soc/soc-compress.c
··· 299 299 for_each_dpcm_be(fe, stream, dpcm) 300 300 dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE; 301 301 302 - snd_soc_dapm_stream_stop(fe, stream); 302 + dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); 303 303 304 304 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; 305 305 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
+1 -1
sound/soc/soc-dapm.c
··· 4772 4772 continue; 4773 4773 if (w->power) { 4774 4774 dapm_seq_insert(w, &down_list, false); 4775 - w->power = 0; 4775 + w->new_power = 0; 4776 4776 powerdown = 1; 4777 4777 } 4778 4778 }
+9 -9
sound/soc/soc-pcm.c
··· 2006 2006 soc_pcm_close(substream); 2007 2007 2008 2008 /* run the stream event for each BE */ 2009 - snd_soc_dapm_stream_stop(fe, stream); 2009 + dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); 2010 2010 2011 2011 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; 2012 2012 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); ··· 3171 3171 unsigned long flags; 3172 3172 3173 3173 /* FE state */ 3174 - offset += snprintf(buf + offset, size - offset, 3174 + offset += scnprintf(buf + offset, size - offset, 3175 3175 "[%s - %s]\n", fe->dai_link->name, 3176 3176 stream ? "Capture" : "Playback"); 3177 3177 3178 - offset += snprintf(buf + offset, size - offset, "State: %s\n", 3178 + offset += scnprintf(buf + offset, size - offset, "State: %s\n", 3179 3179 dpcm_state_string(fe->dpcm[stream].state)); 3180 3180 3181 3181 if ((fe->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) && 3182 3182 (fe->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP)) 3183 - offset += snprintf(buf + offset, size - offset, 3183 + offset += scnprintf(buf + offset, size - offset, 3184 3184 "Hardware Params: " 3185 3185 "Format = %s, Channels = %d, Rate = %d\n", 3186 3186 snd_pcm_format_name(params_format(params)), ··· 3188 3188 params_rate(params)); 3189 3189 3190 3190 /* BEs state */ 3191 - offset += snprintf(buf + offset, size - offset, "Backends:\n"); 3191 + offset += scnprintf(buf + offset, size - offset, "Backends:\n"); 3192 3192 3193 3193 if (list_empty(&fe->dpcm[stream].be_clients)) { 3194 - offset += snprintf(buf + offset, size - offset, 3194 + offset += scnprintf(buf + offset, size - offset, 3195 3195 " No active DSP links\n"); 3196 3196 goto out; 3197 3197 } ··· 3201 3201 struct snd_soc_pcm_runtime *be = dpcm->be; 3202 3202 params = &dpcm->hw_params; 3203 3203 3204 - offset += snprintf(buf + offset, size - offset, 3204 + offset += scnprintf(buf + offset, size - offset, 3205 3205 "- %s\n", be->dai_link->name); 3206 3206 3207 - offset += snprintf(buf + offset, size - offset, 3207 + offset += scnprintf(buf + offset, size - offset, 3208 3208 " State: %s\n", 3209 3209 dpcm_state_string(be->dpcm[stream].state)); 3210 3210 3211 3211 if ((be->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) && 3212 3212 (be->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP)) 3213 - offset += snprintf(buf + offset, size - offset, 3213 + offset += scnprintf(buf + offset, size - offset, 3214 3214 " Hardware Params: " 3215 3215 "Format = %s, Channels = %d, Rate = %d\n", 3216 3216 snd_pcm_format_name(params_format(params)),
+10 -7
sound/soc/soc-topology.c
··· 2377 2377 } 2378 2378 2379 2379 ret = soc_tplg_link_config(tplg, _link); 2380 - if (ret < 0) 2380 + if (ret < 0) { 2381 + if (!abi_match) 2382 + kfree(_link); 2381 2383 return ret; 2384 + } 2382 2385 2383 2386 /* offset by version-specific struct size and 2384 2387 * real priv data size ··· 2545 2542 { 2546 2543 struct snd_soc_tplg_manifest *manifest, *_manifest; 2547 2544 bool abi_match; 2548 - int err; 2545 + int ret = 0; 2549 2546 2550 2547 if (tplg->pass != SOC_TPLG_PASS_MANIFEST) 2551 2548 return 0; ··· 2558 2555 _manifest = manifest; 2559 2556 } else { 2560 2557 abi_match = false; 2561 - err = manifest_new_ver(tplg, manifest, &_manifest); 2562 - if (err < 0) 2563 - return err; 2558 + ret = manifest_new_ver(tplg, manifest, &_manifest); 2559 + if (ret < 0) 2560 + return ret; 2564 2561 } 2565 2562 2566 2563 /* pass control to component driver for optional further init */ 2567 2564 if (tplg->comp && tplg->ops && tplg->ops->manifest) 2568 - return tplg->ops->manifest(tplg->comp, tplg->index, _manifest); 2565 + ret = tplg->ops->manifest(tplg->comp, tplg->index, _manifest); 2569 2566 2570 2567 if (!abi_match) /* free the duplicated one */ 2571 2568 kfree(_manifest); 2572 2569 2573 - return 0; 2570 + return ret; 2574 2571 } 2575 2572 2576 2573 /* validate header magic, size and type */
+1 -1
sound/soc/sof/ipc.c
··· 499 499 500 500 /* send IPC to the DSP */ 501 501 err = sof_ipc_tx_message(sdev->ipc, 502 - stream.hdr.cmd, &stream, sizeof(stream), &posn, 502 + stream.hdr.cmd, &stream, sizeof(stream), posn, 503 503 sizeof(*posn)); 504 504 if (err < 0) { 505 505 dev_err(sdev->dev, "error: failed to get stream %d position\n",
+10 -8
sound/soc/stm/stm32_sai_sub.c
··· 1543 1543 return ret; 1544 1544 } 1545 1545 1546 - ret = devm_snd_soc_register_component(&pdev->dev, &stm32_component, 1547 - &sai->cpu_dai_drv, 1); 1546 + ret = snd_dmaengine_pcm_register(&pdev->dev, conf, 0); 1547 + if (ret) { 1548 + dev_err(&pdev->dev, "Could not register pcm dma\n"); 1549 + return ret; 1550 + } 1551 + 1552 + ret = snd_soc_register_component(&pdev->dev, &stm32_component, 1553 + &sai->cpu_dai_drv, 1); 1548 1554 if (ret) 1549 1555 return ret; 1550 1556 1551 1557 if (STM_SAI_PROTOCOL_IS_SPDIF(sai)) 1552 1558 conf = &stm32_sai_pcm_config_spdif; 1553 - 1554 - ret = devm_snd_dmaengine_pcm_register(&pdev->dev, conf, 0); 1555 - if (ret) { 1556 - dev_err(&pdev->dev, "Could not register pcm dma\n"); 1557 - return ret; 1558 - } 1559 1559 1560 1560 return 0; 1561 1561 } ··· 1565 1565 struct stm32_sai_sub_data *sai = dev_get_drvdata(&pdev->dev); 1566 1566 1567 1567 clk_unprepare(sai->pdata->pclk); 1568 + snd_dmaengine_pcm_unregister(&pdev->dev); 1569 + snd_soc_unregister_component(&pdev->dev); 1568 1570 1569 1571 return 0; 1570 1572 }