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-4.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Here are a bunch of fixes as you can see in diffstat.

One core change in ASoC is about the unexpected unbinding error, and
another about debugfs cleanup.

The rest are wide-spread driver-specific fixes: a series of LINE6 USB
fixes, a HD-audio quirk, and various ASoC fixes including OMAP boot
fixes and Intel SKL fixes"

* tag 'sound-4.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (22 commits)
ALSA: hda/realtek - fix headset mic detection for MSI MS-B120
ASoC: omap-mcpdm: Fix irq resource handling
ASoC: max98371: Add terminate entry for i2c_device_id tables
ALSA: line6: Fix POD sysfs attributes segfault
ALSA: line6: Give up on the lock while URBs are released.
ALSA: line6: Remove double line6_pcm_release() after failed acquire.
ASoC: omap-abe-twl6040: Correct dmic-codec device registration
ASoC: core: Clean up DAPM before the card debugfs
ASoC: omap-mcpdm: Drop pdmclk clock handling
ASoC: atmel_ssc_dai: Don't unconditionally reset SSC on stream startup
ASoC: compress: Fix leak of a widget list in soc_compr_open_fe
ASoC: Intel: Skylake: Fix error return code in skl_probe()
ASoC: wm2000: Fix return of uninitialised varible
ASoC: Fix leak of rtd in soc_bind_dai_link
ASoC: da7213: Default to 64 BCLKs per WCLK to support all formats
ASoC: nau8825: fix static check error about semaphone control
ASoC: nau8825: fix bug in playback when suspend
ASoC: samsung: Fix clock handling in S3C24XX_UDA134X card
ASoC: simple-card-utils: add missing MODULE_xxx()
ASoC: Intel: Skylake: Check list empty while getting module info
...

+127 -131
-10
Documentation/devicetree/bindings/sound/omap-mcpdm.txt
··· 8 8 - interrupts: Interrupt number for McPDM 9 9 - interrupt-parent: The parent interrupt controller 10 10 - ti,hwmods: Name of the hwmod associated to the McPDM 11 - - clocks: phandle for the pdmclk provider, likely <&twl6040> 12 - - clock-names: Must be "pdmclk" 13 11 14 12 Example: 15 13 ··· 18 20 interrupts = <0 112 0x4>; 19 21 interrupt-parent = <&gic>; 20 22 ti,hwmods = "mcpdm"; 21 - }; 22 - 23 - In board DTS file the pdmclk needs to be added: 24 - 25 - &mcpdm { 26 - clocks = <&twl6040>; 27 - clock-names = "pdmclk"; 28 - status = "okay"; 29 23 };
+4 -3
sound/pci/hda/patch_realtek.c
··· 4828 4828 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, 4829 4829 ALC292_FIXUP_TPT440_DOCK, 4830 4830 ALC292_FIXUP_TPT440, 4831 - ALC283_FIXUP_BXBT2807_MIC, 4831 + ALC283_FIXUP_HEADSET_MIC, 4832 4832 ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, 4833 4833 ALC282_FIXUP_ASPIRE_V5_PINS, 4834 4834 ALC280_FIXUP_HP_GPIO4, ··· 5321 5321 .chained = true, 5322 5322 .chain_id = ALC292_FIXUP_TPT440_DOCK, 5323 5323 }, 5324 - [ALC283_FIXUP_BXBT2807_MIC] = { 5324 + [ALC283_FIXUP_HEADSET_MIC] = { 5325 5325 .type = HDA_FIXUP_PINS, 5326 5326 .v.pins = (const struct hda_pintbl[]) { 5327 5327 { 0x19, 0x04a110f0 }, ··· 5651 5651 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), 5652 5652 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), 5653 5653 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), 5654 - SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC), 5654 + SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), 5655 + SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC), 5655 5656 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), 5656 5657 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), 5657 5658 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
+3 -2
sound/soc/atmel/atmel_ssc_dai.c
··· 299 299 clk_enable(ssc_p->ssc->clk); 300 300 ssc_p->mck_rate = clk_get_rate(ssc_p->ssc->clk); 301 301 302 - /* Reset the SSC to keep it at a clean status */ 303 - ssc_writel(ssc_p->ssc->regs, CR, SSC_BIT(CR_SWRST)); 302 + /* Reset the SSC unless initialized to keep it in a clean state */ 303 + if (!ssc_p->initialized) 304 + ssc_writel(ssc_p->ssc->regs, CR, SSC_BIT(CR_SWRST)); 304 305 305 306 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 306 307 dir = 0;
+2 -2
sound/soc/codecs/da7213.c
··· 1247 1247 return -EINVAL; 1248 1248 } 1249 1249 1250 - /* By default only 32 BCLK per WCLK is supported */ 1251 - dai_clk_mode |= DA7213_DAI_BCLKS_PER_WCLK_32; 1250 + /* By default only 64 BCLK per WCLK is supported */ 1251 + dai_clk_mode |= DA7213_DAI_BCLKS_PER_WCLK_64; 1252 1252 1253 1253 snd_soc_write(codec, DA7213_DAI_CLK_MODE, dai_clk_mode); 1254 1254 snd_soc_update_bits(codec, DA7213_DAI_CTRL, DA7213_DAI_FORMAT_MASK,
+1
sound/soc/codecs/max98371.c
··· 412 412 413 413 static const struct i2c_device_id max98371_i2c_id[] = { 414 414 { "max98371", 0 }, 415 + { } 415 416 }; 416 417 417 418 MODULE_DEVICE_TABLE(i2c, max98371_i2c_id);
+32 -46
sound/soc/codecs/nau8825.c
··· 212 212 0xfa2f, 0xfaea, 0xfba5, 0xfc60, 0xfd1a, 0xfdd4, 0xfe8e, 0xff47 213 213 }; 214 214 215 - static struct snd_soc_dai *nau8825_get_codec_dai(struct nau8825 *nau8825) 216 - { 217 - struct snd_soc_codec *codec = snd_soc_dapm_to_codec(nau8825->dapm); 218 - struct snd_soc_component *component = &codec->component; 219 - struct snd_soc_dai *codec_dai, *_dai; 220 - 221 - list_for_each_entry_safe(codec_dai, _dai, &component->dai_list, list) { 222 - if (!strncmp(codec_dai->name, NUVOTON_CODEC_DAI, 223 - strlen(NUVOTON_CODEC_DAI))) 224 - return codec_dai; 225 - } 226 - return NULL; 227 - } 228 - 229 - static bool nau8825_dai_is_active(struct nau8825 *nau8825) 230 - { 231 - struct snd_soc_dai *codec_dai = nau8825_get_codec_dai(nau8825); 232 - 233 - if (codec_dai) { 234 - if (codec_dai->playback_active || codec_dai->capture_active) 235 - return true; 236 - } 237 - return false; 238 - } 239 - 240 215 /** 241 216 * nau8825_sema_acquire - acquire the semaphore of nau88l25 242 217 * @nau8825: component to register the codec private data with ··· 225 250 * Acquires the semaphore without jiffies. If no more tasks are allowed 226 251 * to acquire the semaphore, calling this function will put the task to 227 252 * sleep until the semaphore is released. 228 - * It returns if the semaphore was acquired. 253 + * If the semaphore is not released within the specified number of jiffies, 254 + * this function returns -ETIME. 255 + * If the sleep is interrupted by a signal, this function will return -EINTR. 256 + * It returns 0 if the semaphore was acquired successfully. 229 257 */ 230 - static void nau8825_sema_acquire(struct nau8825 *nau8825, long timeout) 258 + static int nau8825_sema_acquire(struct nau8825 *nau8825, long timeout) 231 259 { 232 260 int ret; 233 261 234 - if (timeout) 262 + if (timeout) { 235 263 ret = down_timeout(&nau8825->xtalk_sem, timeout); 236 - else 264 + if (ret < 0) 265 + dev_warn(nau8825->dev, "Acquire semaphone timeout\n"); 266 + } else { 237 267 ret = down_interruptible(&nau8825->xtalk_sem); 268 + if (ret < 0) 269 + dev_warn(nau8825->dev, "Acquire semaphone fail\n"); 270 + } 238 271 239 - if (ret < 0) 240 - dev_warn(nau8825->dev, "Acquire semaphone fail\n"); 272 + return ret; 241 273 } 242 274 243 275 /** ··· 1187 1205 struct nau8825 *nau8825 = snd_soc_codec_get_drvdata(codec); 1188 1206 unsigned int val_len = 0; 1189 1207 1208 + nau8825_sema_acquire(nau8825, 2 * HZ); 1209 + 1190 1210 switch (params_width(params)) { 1191 1211 case 16: 1192 1212 val_len |= NAU8825_I2S_DL_16; ··· 1209 1225 regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL1, 1210 1226 NAU8825_I2S_DL_MASK, val_len); 1211 1227 1228 + /* Release the semaphone. */ 1229 + nau8825_sema_release(nau8825); 1230 + 1212 1231 return 0; 1213 1232 } 1214 1233 ··· 1220 1233 struct snd_soc_codec *codec = codec_dai->codec; 1221 1234 struct nau8825 *nau8825 = snd_soc_codec_get_drvdata(codec); 1222 1235 unsigned int ctrl1_val = 0, ctrl2_val = 0; 1236 + 1237 + nau8825_sema_acquire(nau8825, 2 * HZ); 1223 1238 1224 1239 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { 1225 1240 case SND_SOC_DAIFMT_CBM_CFM: ··· 1270 1281 ctrl1_val); 1271 1282 regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, 1272 1283 NAU8825_I2S_MS_MASK, ctrl2_val); 1284 + 1285 + /* Release the semaphone. */ 1286 + nau8825_sema_release(nau8825); 1273 1287 1274 1288 return 0; 1275 1289 } ··· 1603 1611 * cess and restore changes if process 1604 1612 * is ongoing when ejection. 1605 1613 */ 1614 + int ret; 1606 1615 nau8825->xtalk_protect = true; 1607 - nau8825_sema_acquire(nau8825, 0); 1616 + ret = nau8825_sema_acquire(nau8825, 0); 1617 + if (ret < 0) 1618 + nau8825->xtalk_protect = false; 1608 1619 } 1609 1620 /* Startup cross talk detection process */ 1610 1621 nau8825->xtalk_state = NAU8825_XTALK_PREPARE; ··· 2233 2238 static int __maybe_unused nau8825_resume(struct snd_soc_codec *codec) 2234 2239 { 2235 2240 struct nau8825 *nau8825 = snd_soc_codec_get_drvdata(codec); 2241 + int ret; 2236 2242 2237 2243 regcache_cache_only(nau8825->regmap, false); 2238 2244 regcache_sync(nau8825->regmap); 2239 - if (nau8825_is_jack_inserted(nau8825->regmap)) { 2240 - /* If the jack is inserted, we need to check whether the play- 2241 - * back is active before suspend. If active, the driver has to 2242 - * raise the protection for cross talk function to avoid the 2243 - * playback recovers before cross talk process finish. Other- 2244 - * wise, the playback will be interfered by cross talk func- 2245 - * tion. It is better to apply hardware related parameters 2246 - * before starting playback or record. 2247 - */ 2248 - if (nau8825_dai_is_active(nau8825)) { 2249 - nau8825->xtalk_protect = true; 2250 - nau8825_sema_acquire(nau8825, 0); 2251 - } 2252 - } 2245 + nau8825->xtalk_protect = true; 2246 + ret = nau8825_sema_acquire(nau8825, 0); 2247 + if (ret < 0) 2248 + nau8825->xtalk_protect = false; 2253 2249 enable_irq(nau8825->irq); 2254 2250 2255 2251 return 0;
+1 -1
sound/soc/codecs/wm2000.c
··· 581 581 if (anc_transitions[i].dest == ANC_OFF) 582 582 clk_disable_unprepare(wm2000->mclk); 583 583 584 - return ret; 584 + return 0; 585 585 } 586 586 587 587 static int wm2000_anc_set_mode(struct wm2000_priv *wm2000)
+3 -3
sound/soc/generic/Makefile
··· 1 - obj-$(CONFIG_SND_SIMPLE_CARD_UTILS) := simple-card-utils.o 2 - 1 + snd-soc-simple-card-utils-objs := simple-card-utils.o 3 2 snd-soc-simple-card-objs := simple-card.o 4 3 5 - obj-$(CONFIG_SND_SIMPLE_CARD) += snd-soc-simple-card.o 4 + obj-$(CONFIG_SND_SIMPLE_CARD_UTILS) += snd-soc-simple-card-utils.o 5 + obj-$(CONFIG_SND_SIMPLE_CARD) += snd-soc-simple-card.o
+6
sound/soc/generic/simple-card-utils.c
··· 7 7 * it under the terms of the GNU General Public License version 2 as 8 8 * published by the Free Software Foundation. 9 9 */ 10 + #include <linux/module.h> 10 11 #include <linux/of.h> 11 12 #include <sound/simple_card_utils.h> 12 13 ··· 96 95 return 0; 97 96 } 98 97 EXPORT_SYMBOL_GPL(asoc_simple_card_parse_card_name); 98 + 99 + /* Module information */ 100 + MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>"); 101 + MODULE_DESCRIPTION("ALSA SoC Simple Card Utils"); 102 + MODULE_LICENSE("GPL v2");
+5
sound/soc/intel/skylake/skl-sst-utils.c
··· 123 123 124 124 uuid_mod = (uuid_le *)uuid; 125 125 126 + if (list_empty(&ctx->uuid_list)) { 127 + dev_err(ctx->dev, "Module list is empty\n"); 128 + return -EINVAL; 129 + } 130 + 126 131 list_for_each_entry(module, &ctx->uuid_list, list) { 127 132 if (uuid_le_cmp(*uuid_mod, module->uuid) == 0) { 128 133 dfw_config->module_id = module->id;
+3 -1
sound/soc/intel/skylake/skl.c
··· 672 672 673 673 skl->nhlt = skl_nhlt_init(bus->dev); 674 674 675 - if (skl->nhlt == NULL) 675 + if (skl->nhlt == NULL) { 676 + err = -ENODEV; 676 677 goto out_free; 678 + } 677 679 678 680 skl_nhlt_update_topology_bin(skl); 679 681
+32 -29
sound/soc/omap/omap-abe-twl6040.c
··· 38 38 struct abe_twl6040 { 39 39 int jack_detection; /* board can detect jack events */ 40 40 int mclk_freq; /* MCLK frequency speed for twl6040 */ 41 - 42 - struct platform_device *dmic_codec_dev; 43 41 }; 42 + 43 + struct platform_device *dmic_codec_dev; 44 44 45 45 static int omap_abe_hw_params(struct snd_pcm_substream *substream, 46 46 struct snd_pcm_hw_params *params) ··· 258 258 if (priv == NULL) 259 259 return -ENOMEM; 260 260 261 - priv->dmic_codec_dev = ERR_PTR(-EINVAL); 262 - 263 261 if (snd_soc_of_parse_card_name(card, "ti,model")) { 264 262 dev_err(&pdev->dev, "Card name is not provided\n"); 265 263 return -ENODEV; ··· 282 284 num_links = 2; 283 285 abe_twl6040_dai_links[1].cpu_of_node = dai_node; 284 286 abe_twl6040_dai_links[1].platform_of_node = dai_node; 285 - 286 - priv->dmic_codec_dev = platform_device_register_simple( 287 - "dmic-codec", -1, NULL, 0); 288 - if (IS_ERR(priv->dmic_codec_dev)) { 289 - dev_err(&pdev->dev, "Can't instantiate dmic-codec\n"); 290 - return PTR_ERR(priv->dmic_codec_dev); 291 - } 292 287 } else { 293 288 num_links = 1; 294 289 } ··· 290 299 of_property_read_u32(node, "ti,mclk-freq", &priv->mclk_freq); 291 300 if (!priv->mclk_freq) { 292 301 dev_err(&pdev->dev, "MCLK frequency not provided\n"); 293 - ret = -EINVAL; 294 - goto err_unregister; 302 + return -EINVAL; 295 303 } 296 304 297 305 card->fully_routed = 1; 298 306 299 307 if (!priv->mclk_freq) { 300 308 dev_err(&pdev->dev, "MCLK frequency missing\n"); 301 - ret = -ENODEV; 302 - goto err_unregister; 309 + return -ENODEV; 303 310 } 304 311 305 312 card->dai_link = abe_twl6040_dai_links; ··· 306 317 snd_soc_card_set_drvdata(card, priv); 307 318 308 319 ret = snd_soc_register_card(card); 309 - if (ret) { 320 + if (ret) 310 321 dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", 311 322 ret); 312 - goto err_unregister; 313 - } 314 - 315 - return 0; 316 - 317 - err_unregister: 318 - if (!IS_ERR(priv->dmic_codec_dev)) 319 - platform_device_unregister(priv->dmic_codec_dev); 320 323 321 324 return ret; 322 325 } ··· 316 335 static int omap_abe_remove(struct platform_device *pdev) 317 336 { 318 337 struct snd_soc_card *card = platform_get_drvdata(pdev); 319 - struct abe_twl6040 *priv = snd_soc_card_get_drvdata(card); 320 338 321 339 snd_soc_unregister_card(card); 322 - 323 - if (!IS_ERR(priv->dmic_codec_dev)) 324 - platform_device_unregister(priv->dmic_codec_dev); 325 340 326 341 return 0; 327 342 } ··· 338 361 .remove = omap_abe_remove, 339 362 }; 340 363 341 - module_platform_driver(omap_abe_driver); 364 + static int __init omap_abe_init(void) 365 + { 366 + int ret; 367 + 368 + dmic_codec_dev = platform_device_register_simple("dmic-codec", -1, NULL, 369 + 0); 370 + if (IS_ERR(dmic_codec_dev)) { 371 + pr_err("%s: dmic-codec device registration failed\n", __func__); 372 + return PTR_ERR(dmic_codec_dev); 373 + } 374 + 375 + ret = platform_driver_register(&omap_abe_driver); 376 + if (ret) { 377 + pr_err("%s: platform driver registration failed\n", __func__); 378 + platform_device_unregister(dmic_codec_dev); 379 + } 380 + 381 + return ret; 382 + } 383 + module_init(omap_abe_init); 384 + 385 + static void __exit omap_abe_exit(void) 386 + { 387 + platform_driver_unregister(&omap_abe_driver); 388 + platform_device_unregister(dmic_codec_dev); 389 + } 390 + module_exit(omap_abe_exit); 342 391 343 392 MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>"); 344 393 MODULE_DESCRIPTION("ALSA SoC for OMAP boards with ABE and twl6040 codec");
+3 -19
sound/soc/omap/omap-mcpdm.c
··· 31 31 #include <linux/err.h> 32 32 #include <linux/io.h> 33 33 #include <linux/irq.h> 34 - #include <linux/clk.h> 35 34 #include <linux/slab.h> 36 35 #include <linux/pm_runtime.h> 37 36 #include <linux/of_device.h> ··· 54 55 unsigned long phys_base; 55 56 void __iomem *io_base; 56 57 int irq; 57 - struct clk *pdmclk; 58 58 59 59 struct mutex mutex; 60 60 ··· 388 390 struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai); 389 391 int ret; 390 392 391 - clk_prepare_enable(mcpdm->pdmclk); 392 393 pm_runtime_enable(mcpdm->dev); 393 394 394 395 /* Disable lines while request is ongoing */ 395 396 pm_runtime_get_sync(mcpdm->dev); 396 397 omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, 0x00); 397 398 398 - ret = devm_request_irq(mcpdm->dev, mcpdm->irq, omap_mcpdm_irq_handler, 399 - 0, "McPDM", (void *)mcpdm); 399 + ret = request_irq(mcpdm->irq, omap_mcpdm_irq_handler, 0, "McPDM", 400 + (void *)mcpdm); 400 401 401 402 pm_runtime_put_sync(mcpdm->dev); 402 403 ··· 420 423 { 421 424 struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai); 422 425 426 + free_irq(mcpdm->irq, (void *)mcpdm); 423 427 pm_runtime_disable(mcpdm->dev); 424 428 425 - clk_disable_unprepare(mcpdm->pdmclk); 426 429 return 0; 427 430 } 428 431 ··· 442 445 mcpdm->pm_active_count++; 443 446 } 444 447 445 - clk_disable_unprepare(mcpdm->pdmclk); 446 - 447 448 return 0; 448 449 } 449 450 450 451 static int omap_mcpdm_resume(struct snd_soc_dai *dai) 451 452 { 452 453 struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai); 453 - 454 - clk_prepare_enable(mcpdm->pdmclk); 455 454 456 455 if (mcpdm->pm_active_count) { 457 456 while (mcpdm->pm_active_count--) ··· 541 548 return mcpdm->irq; 542 549 543 550 mcpdm->dev = &pdev->dev; 544 - 545 - mcpdm->pdmclk = devm_clk_get(&pdev->dev, "pdmclk"); 546 - if (IS_ERR(mcpdm->pdmclk)) { 547 - if (PTR_ERR(mcpdm->pdmclk) == -EPROBE_DEFER) 548 - return -EPROBE_DEFER; 549 - dev_warn(&pdev->dev, "Error getting pdmclk (%ld)!\n", 550 - PTR_ERR(mcpdm->pdmclk)); 551 - mcpdm->pdmclk = NULL; 552 - } 553 551 554 552 ret = devm_snd_soc_register_component(&pdev->dev, 555 553 &omap_mcpdm_component,
+4 -3
sound/soc/samsung/s3c24xx_uda134x.c
··· 58 58 59 59 static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) 60 60 { 61 - int ret = 0; 61 + struct snd_soc_pcm_runtime *rtd = substream->private_data; 62 + struct snd_soc_dai *cpu_dai = rtd->cpu_dai; 62 63 #ifdef ENFORCE_RATES 63 64 struct snd_pcm_runtime *runtime = substream->runtime; 64 65 #endif 66 + int ret = 0; 65 67 66 68 mutex_lock(&clk_lock); 67 69 pr_debug("%s %d\n", __func__, clk_users); ··· 73 71 printk(KERN_ERR "%s cannot get xtal\n", __func__); 74 72 ret = PTR_ERR(xtal); 75 73 } else { 76 - pclk = clk_get(&s3c24xx_uda134x_snd_device->dev, 77 - "pclk"); 74 + pclk = clk_get(cpu_dai->dev, "iis"); 78 75 if (IS_ERR(pclk)) { 79 76 printk(KERN_ERR "%s cannot get pclk\n", 80 77 __func__);
+5 -1
sound/soc/sh/rcar/src.c
··· 226 226 ifscr = 0; 227 227 fsrate = 0; 228 228 if (fin != fout) { 229 + u64 n; 230 + 229 231 ifscr = 1; 230 - fsrate = 0x0400000 / fout * fin; 232 + n = (u64)0x0400000 * fin; 233 + do_div(n, fout); 234 + fsrate = n; 231 235 } 232 236 233 237 /*
+3 -1
sound/soc/soc-compress.c
··· 121 121 122 122 dpcm_be_disconnect(fe, stream); 123 123 fe->dpcm[stream].runtime = NULL; 124 - goto fe_err; 124 + goto path_err; 125 125 } 126 126 127 127 dpcm_clear_pending_state(fe, stream); ··· 136 136 137 137 return 0; 138 138 139 + path_err: 140 + dpcm_path_put(&list); 139 141 fe_err: 140 142 if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->shutdown) 141 143 fe->dai_link->compr_ops->shutdown(cstream);
+2 -3
sound/soc/soc-core.c
··· 1056 1056 if (!rtd->platform) { 1057 1057 dev_err(card->dev, "ASoC: platform %s not registered\n", 1058 1058 dai_link->platform_name); 1059 - return -EPROBE_DEFER; 1059 + goto _err_defer; 1060 1060 } 1061 1061 1062 1062 soc_add_pcm_runtime(card, rtd); ··· 2083 2083 /* remove auxiliary devices */ 2084 2084 soc_remove_aux_devices(card); 2085 2085 2086 + snd_soc_dapm_free(&card->dapm); 2086 2087 soc_cleanup_card_debugfs(card); 2087 2088 2088 2089 /* remove the card */ 2089 2090 if (card->remove) 2090 2091 card->remove(card); 2091 - 2092 - snd_soc_dapm_free(&card->dapm); 2093 2092 2094 2093 snd_card_free(card->snd_card); 2095 2094 return 0;
+10
sound/soc/soc-dapm.c
··· 3493 3493 const struct snd_soc_pcm_stream *config = w->params + w->params_select; 3494 3494 struct snd_pcm_substream substream; 3495 3495 struct snd_pcm_hw_params *params = NULL; 3496 + struct snd_pcm_runtime *runtime = NULL; 3496 3497 u64 fmt; 3497 3498 int ret; 3498 3499 ··· 3541 3540 = config->channels_max; 3542 3541 3543 3542 memset(&substream, 0, sizeof(substream)); 3543 + 3544 + /* Allocate a dummy snd_pcm_runtime for startup() and other ops() */ 3545 + runtime = kzalloc(sizeof(*runtime), GFP_KERNEL); 3546 + if (!runtime) { 3547 + ret = -ENOMEM; 3548 + goto out; 3549 + } 3550 + substream.runtime = runtime; 3544 3551 3545 3552 switch (event) { 3546 3553 case SND_SOC_DAPM_PRE_PMU: ··· 3615 3606 } 3616 3607 3617 3608 out: 3609 + kfree(runtime); 3618 3610 kfree(params); 3619 3611 return ret; 3620 3612 }
+2 -1
sound/usb/line6/pcm.c
··· 55 55 err = line6_pcm_acquire(line6pcm, LINE6_STREAM_IMPULSE); 56 56 if (err < 0) { 57 57 line6pcm->impulse_volume = 0; 58 - line6_pcm_release(line6pcm, LINE6_STREAM_IMPULSE); 59 58 return err; 60 59 } 61 60 } else { ··· 210 211 spin_lock_irqsave(&pstr->lock, flags); 211 212 clear_bit(type, &pstr->running); 212 213 if (!pstr->running) { 214 + spin_unlock_irqrestore(&pstr->lock, flags); 213 215 line6_unlink_audio_urbs(line6pcm, pstr); 216 + spin_lock_irqsave(&pstr->lock, flags); 214 217 if (direction == SNDRV_PCM_STREAM_CAPTURE) { 215 218 line6pcm->prev_fbuf = NULL; 216 219 line6pcm->prev_fsize = 0;
+6 -6
sound/usb/line6/pod.c
··· 244 244 static ssize_t serial_number_show(struct device *dev, 245 245 struct device_attribute *attr, char *buf) 246 246 { 247 - struct usb_interface *interface = to_usb_interface(dev); 248 - struct usb_line6_pod *pod = usb_get_intfdata(interface); 247 + struct snd_card *card = dev_to_snd_card(dev); 248 + struct usb_line6_pod *pod = card->private_data; 249 249 250 250 return sprintf(buf, "%u\n", pod->serial_number); 251 251 } ··· 256 256 static ssize_t firmware_version_show(struct device *dev, 257 257 struct device_attribute *attr, char *buf) 258 258 { 259 - struct usb_interface *interface = to_usb_interface(dev); 260 - struct usb_line6_pod *pod = usb_get_intfdata(interface); 259 + struct snd_card *card = dev_to_snd_card(dev); 260 + struct usb_line6_pod *pod = card->private_data; 261 261 262 262 return sprintf(buf, "%d.%02d\n", pod->firmware_version / 100, 263 263 pod->firmware_version % 100); ··· 269 269 static ssize_t device_id_show(struct device *dev, 270 270 struct device_attribute *attr, char *buf) 271 271 { 272 - struct usb_interface *interface = to_usb_interface(dev); 273 - struct usb_line6_pod *pod = usb_get_intfdata(interface); 272 + struct snd_card *card = dev_to_snd_card(dev); 273 + struct usb_line6_pod *pod = card->private_data; 274 274 275 275 return sprintf(buf, "%d\n", pod->device_id); 276 276 }