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

Pull sound fixes from Takashi Iwai:
"This ended up with a larger set of fixes than wished, unfortunately.

As diffstat shows, the majority of changes are for various ASoC
drivers (Realtek, Wolfson codec drivers, etc), in addition to a couple
of HD-audio regression fixes. All these are reasonably small and
nothing to scare much"

* tag 'sound-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (29 commits)
ALSA: hda - Disable power_save_node for Thinkpads
ALSA: hda/tegra - async probe for avoiding module loading deadlock
ASoC: rt5645: Prevent the pop sound in case of playback and the jack is plugging
ASoC: rt5645: Increase the delay time to remove the pop sound
ASoC: rt5645: Use the type SOC_DAPM_SINGLE_AUTODISABLE to prevent the weird sound in runtime of power up
ASoC: pxa: pxa2xx-ac97: fix dma requestor lines
MAINTAINERS: Update website and git repo for Wolfson Microelectronics
ASoC: fsl_ssi: Fix checking of dai format for AC97 mode
ASoC: wm0010: fix error path
ASoC: wm0010: fix memory leak
ASoC: wm8960: correct the max register value of mic boost pga
ASoC: wm8962: remove 64k sample rate support
ASoC: davinci-mcasp: Fix devm_kasprintf format string
ASoC: fix broken pxa SoC support
ASoC: davinci-mcasp: Set .symmetric_rates = 1 in snd_soc_dai_driver
ASoC: au1x: psc-i2s: Fix unused variable 'ret' warning
ASoC: SPEAr: Make SND_SPEAR_SOC select SND_SOC_GENERIC_DMAENGINE_PCM
ASoC: mediatek: Increase periods_min in capture
ASoC: davinci-mcasp: Revise the FIFO threshold calculation
ASoC: wm8960: correct gain value for input PGA and add microphone PGA
...

+166 -92
+3 -6
MAINTAINERS
··· 11249 11249 M: Liam Girdwood <lgirdwood@gmail.com> 11250 11250 M: Mark Brown <broonie@kernel.org> 11251 11251 L: linux-kernel@vger.kernel.org 11252 - W: http://opensource.wolfsonmicro.com/node/15 11253 11252 W: http://www.slimlogic.co.uk/?p=48 11254 11253 T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 11255 11254 S: Supported ··· 11377 11378 M: Mark Brown <broonie@kernel.org> 11378 11379 M: Liam Girdwood <lrg@slimlogic.co.uk> 11379 11380 L: linux-input@vger.kernel.org 11380 - T: git git://opensource.wolfsonmicro.com/linux-2.6-touch 11381 - W: http://opensource.wolfsonmicro.com/node/7 11381 + W: https://github.com/CirrusLogic/linux-drivers/wiki 11382 11382 S: Supported 11383 11383 F: drivers/input/touchscreen/*wm97* 11384 11384 F: include/linux/wm97xx.h 11385 11385 11386 11386 WOLFSON MICROELECTRONICS DRIVERS 11387 11387 L: patches@opensource.wolfsonmicro.com 11388 - T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc 11389 - T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus 11390 - W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices 11388 + T: git https://github.com/CirrusLogic/linux-drivers.git 11389 + W: https://github.com/CirrusLogic/linux-drivers/wiki 11391 11390 S: Supported 11392 11391 F: Documentation/hwmon/wm83?? 11393 11392 F: arch/arm/mach-s3c64xx/mach-crag6410*
+8 -7
sound/arm/Kconfig
··· 9 9 Drivers that are implemented on ASoC can be found in 10 10 "ALSA for SoC audio support" section. 11 11 12 + config SND_PXA2XX_LIB 13 + tristate 14 + select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97 15 + select SND_DMAENGINE_PCM 16 + 17 + config SND_PXA2XX_LIB_AC97 18 + bool 19 + 12 20 if SND_ARM 13 21 14 22 config SND_ARMAACI ··· 28 20 config SND_PXA2XX_PCM 29 21 tristate 30 22 select SND_PCM 31 - 32 - config SND_PXA2XX_LIB 33 - tristate 34 - select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97 35 - 36 - config SND_PXA2XX_LIB_AC97 37 - bool 38 23 39 24 config SND_PXA2XX_AC97 40 25 tristate "AC97 driver for the Intel PXA2xx chip"
+25 -5
sound/pci/hda/hda_tegra.c
··· 73 73 struct clk *hda2codec_2x_clk; 74 74 struct clk *hda2hdmi_clk; 75 75 void __iomem *regs; 76 + struct work_struct probe_work; 76 77 }; 77 78 78 79 #ifdef CONFIG_PM ··· 295 294 static int hda_tegra_dev_free(struct snd_device *device) 296 295 { 297 296 struct azx *chip = device->device_data; 297 + struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); 298 298 299 + cancel_work_sync(&hda->probe_work); 299 300 if (azx_bus(chip)->chip_init) { 300 301 azx_stop_all_streams(chip); 301 302 azx_stop_chip(chip); ··· 429 426 /* 430 427 * constructor 431 428 */ 429 + 430 + static void hda_tegra_probe_work(struct work_struct *work); 431 + 432 432 static int hda_tegra_create(struct snd_card *card, 433 433 unsigned int driver_caps, 434 434 struct hda_tegra *hda) ··· 457 451 458 452 chip->single_cmd = false; 459 453 chip->snoop = true; 454 + 455 + INIT_WORK(&hda->probe_work, hda_tegra_probe_work); 460 456 461 457 err = azx_bus_init(chip, NULL, &hda_tegra_io_ops); 462 458 if (err < 0) ··· 507 499 card->private_data = chip; 508 500 509 501 dev_set_drvdata(&pdev->dev, card); 502 + schedule_work(&hda->probe_work); 503 + 504 + return 0; 505 + 506 + out_free: 507 + snd_card_free(card); 508 + return err; 509 + } 510 + 511 + static void hda_tegra_probe_work(struct work_struct *work) 512 + { 513 + struct hda_tegra *hda = container_of(work, struct hda_tegra, probe_work); 514 + struct azx *chip = &hda->chip; 515 + struct platform_device *pdev = to_platform_device(hda->dev); 516 + int err; 510 517 511 518 err = hda_tegra_first_init(chip, pdev); 512 519 if (err < 0) ··· 543 520 chip->running = 1; 544 521 snd_hda_set_power_save(&chip->bus, power_save * 1000); 545 522 546 - return 0; 547 - 548 - out_free: 549 - snd_card_free(card); 550 - return err; 523 + out_free: 524 + return; /* no error return from async probe */ 551 525 } 552 526 553 527 static int hda_tegra_remove(struct platform_device *pdev)
+19 -12
sound/pci/hda/patch_realtek.c
··· 4188 4188 } 4189 4189 } 4190 4190 4191 + /* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */ 4192 + static void alc_fixup_tpt440_dock(struct hda_codec *codec, 4193 + const struct hda_fixup *fix, int action) 4194 + { 4195 + static const struct hda_pintbl pincfgs[] = { 4196 + { 0x16, 0x21211010 }, /* dock headphone */ 4197 + { 0x19, 0x21a11010 }, /* dock mic */ 4198 + { } 4199 + }; 4200 + struct alc_spec *spec = codec->spec; 4201 + 4202 + if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4203 + spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 4204 + codec->power_save_node = 0; /* avoid click noises */ 4205 + snd_hda_apply_pincfgs(codec, pincfgs); 4206 + } 4207 + } 4208 + 4191 4209 static void alc_shutup_dell_xps13(struct hda_codec *codec) 4192 4210 { 4193 4211 struct alc_spec *spec = codec->spec; ··· 4580 4562 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC, 4581 4563 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, 4582 4564 ALC292_FIXUP_TPT440_DOCK, 4583 - ALC292_FIXUP_TPT440_DOCK2, 4584 4565 ALC283_FIXUP_BXBT2807_MIC, 4585 4566 ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, 4586 4567 ALC282_FIXUP_ASPIRE_V5_PINS, ··· 5046 5029 }, 5047 5030 [ALC292_FIXUP_TPT440_DOCK] = { 5048 5031 .type = HDA_FIXUP_FUNC, 5049 - .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 5050 - .chained = true, 5051 - .chain_id = ALC292_FIXUP_TPT440_DOCK2 5052 - }, 5053 - [ALC292_FIXUP_TPT440_DOCK2] = { 5054 - .type = HDA_FIXUP_PINS, 5055 - .v.pins = (const struct hda_pintbl[]) { 5056 - { 0x16, 0x21211010 }, /* dock headphone */ 5057 - { 0x19, 0x21a11010 }, /* dock mic */ 5058 - { } 5059 - }, 5032 + .v.func = alc_fixup_tpt440_dock, 5060 5033 .chained = true, 5061 5034 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 5062 5035 },
-1
sound/soc/au1x/psc-i2s.c
··· 296 296 { 297 297 struct resource *iores, *dmares; 298 298 unsigned long sel; 299 - int ret; 300 299 struct au1xpsc_audio_data *wd; 301 300 302 301 wd = devm_kzalloc(&pdev->dev, sizeof(struct au1xpsc_audio_data),
+13 -9
sound/soc/codecs/rt5645.c
··· 732 732 static const struct snd_kcontrol_new rt5645_dac_l_mix[] = { 733 733 SOC_DAPM_SINGLE("Stereo ADC Switch", RT5645_AD_DA_MIXER, 734 734 RT5645_M_ADCMIX_L_SFT, 1, 1), 735 - SOC_DAPM_SINGLE("DAC1 Switch", RT5645_AD_DA_MIXER, 735 + SOC_DAPM_SINGLE_AUTODISABLE("DAC1 Switch", RT5645_AD_DA_MIXER, 736 736 RT5645_M_DAC1_L_SFT, 1, 1), 737 737 }; 738 738 739 739 static const struct snd_kcontrol_new rt5645_dac_r_mix[] = { 740 740 SOC_DAPM_SINGLE("Stereo ADC Switch", RT5645_AD_DA_MIXER, 741 741 RT5645_M_ADCMIX_R_SFT, 1, 1), 742 - SOC_DAPM_SINGLE("DAC1 Switch", RT5645_AD_DA_MIXER, 742 + SOC_DAPM_SINGLE_AUTODISABLE("DAC1 Switch", RT5645_AD_DA_MIXER, 743 743 RT5645_M_DAC1_R_SFT, 1, 1), 744 744 }; 745 745 ··· 1381 1381 regmap_write(rt5645->regmap, RT5645_PR_BASE + 1382 1382 RT5645_MAMP_INT_REG2, 0xfc00); 1383 1383 snd_soc_write(codec, RT5645_DEPOP_M2, 0x1140); 1384 - mdelay(5); 1384 + msleep(40); 1385 1385 rt5645->hp_on = true; 1386 1386 } else { 1387 1387 /* depop parameters */ ··· 2829 2829 snd_soc_dapm_sync(dapm); 2830 2830 rt5645->jack_type = SND_JACK_HEADPHONE; 2831 2831 } 2832 - 2833 - snd_soc_update_bits(codec, RT5645_CHARGE_PUMP, 0x0300, 0x0200); 2834 - snd_soc_write(codec, RT5645_DEPOP_M1, 0x001d); 2835 - snd_soc_write(codec, RT5645_DEPOP_M1, 0x0001); 2836 2832 } else { /* jack out */ 2837 2833 rt5645->jack_type = 0; 2838 2834 2835 + regmap_update_bits(rt5645->regmap, RT5645_HP_VOL, 2836 + RT5645_L_MUTE | RT5645_R_MUTE, 2837 + RT5645_L_MUTE | RT5645_R_MUTE); 2839 2838 regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL2, 2840 2839 RT5645_CBJ_MN_JD, RT5645_CBJ_MN_JD); 2841 2840 regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL1, ··· 2879 2880 rt5645->en_button_func = true; 2880 2881 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, 2881 2882 RT5645_GP1_PIN_IRQ, RT5645_GP1_PIN_IRQ); 2882 - regmap_update_bits(rt5645->regmap, RT5645_DEPOP_M1, 2883 - RT5645_HP_CB_MASK, RT5645_HP_CB_PU); 2884 2883 regmap_update_bits(rt5645->regmap, RT5645_GEN_CTRL1, 2885 2884 RT5645_DIG_GATE_CTRL, RT5645_DIG_GATE_CTRL); 2886 2885 } ··· 3200 3203 .callback = strago_quirk_cb, 3201 3204 .matches = { 3202 3205 DMI_MATCH(DMI_PRODUCT_NAME, "Celes"), 3206 + }, 3207 + }, 3208 + { 3209 + .ident = "Google Ultima", 3210 + .callback = strago_quirk_cb, 3211 + .matches = { 3212 + DMI_MATCH(DMI_PRODUCT_NAME, "Ultima"), 3203 3213 }, 3204 3214 }, 3205 3215 { }
+9 -14
sound/soc/codecs/wm0010.c
··· 577 577 struct wm0010_priv *wm0010 = snd_soc_codec_get_drvdata(codec); 578 578 unsigned long flags; 579 579 int ret; 580 - const struct firmware *fw; 581 580 struct spi_message m; 582 581 struct spi_transfer t; 583 582 struct dfw_pllrec pll_rec; ··· 622 623 wm0010->state = WM0010_OUT_OF_RESET; 623 624 spin_unlock_irqrestore(&wm0010->irq_lock, flags); 624 625 625 - /* First the bootloader */ 626 - ret = request_firmware(&fw, "wm0010_stage2.bin", codec->dev); 627 - if (ret != 0) { 628 - dev_err(codec->dev, "Failed to request stage2 loader: %d\n", 629 - ret); 630 - goto abort; 631 - } 632 - 633 626 if (!wait_for_completion_timeout(&wm0010->boot_completion, 634 627 msecs_to_jiffies(20))) 635 628 dev_err(codec->dev, "Failed to get interrupt from DSP\n"); ··· 664 673 665 674 img_swap = kzalloc(len, GFP_KERNEL | GFP_DMA); 666 675 if (!img_swap) 667 - goto abort; 676 + goto abort_out; 668 677 669 678 /* We need to re-order for 0010 */ 670 679 byte_swap_64((u64 *)&pll_rec, img_swap, len); ··· 679 688 spi_message_add_tail(&t, &m); 680 689 681 690 ret = spi_sync(spi, &m); 682 - if (ret != 0) { 691 + if (ret) { 683 692 dev_err(codec->dev, "First PLL write failed: %d\n", ret); 684 - goto abort; 693 + goto abort_swap; 685 694 } 686 695 687 696 /* Use a second send of the message to get the return status */ 688 697 ret = spi_sync(spi, &m); 689 - if (ret != 0) { 698 + if (ret) { 690 699 dev_err(codec->dev, "Second PLL write failed: %d\n", ret); 691 - goto abort; 700 + goto abort_swap; 692 701 } 693 702 694 703 p = (u32 *)out; ··· 721 730 722 731 return 0; 723 732 733 + abort_swap: 734 + kfree(img_swap); 735 + abort_out: 736 + kfree(out); 724 737 abort: 725 738 /* Put the chip back into reset */ 726 739 wm0010_halt(codec);
+18 -8
sound/soc/codecs/wm8960.c
··· 211 211 return wm8960_set_deemph(codec); 212 212 } 213 213 214 - static const DECLARE_TLV_DB_SCALE(adc_tlv, -9700, 50, 0); 215 - static const DECLARE_TLV_DB_SCALE(dac_tlv, -12700, 50, 1); 214 + static const DECLARE_TLV_DB_SCALE(adc_tlv, -9750, 50, 1); 215 + static const DECLARE_TLV_DB_SCALE(inpga_tlv, -1725, 75, 0); 216 + static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1); 216 217 static const DECLARE_TLV_DB_SCALE(bypass_tlv, -2100, 300, 0); 217 218 static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1); 218 - static const DECLARE_TLV_DB_SCALE(boost_tlv, -1200, 300, 1); 219 + static const DECLARE_TLV_DB_SCALE(lineinboost_tlv, -1500, 300, 1); 220 + static const unsigned int micboost_tlv[] = { 221 + TLV_DB_RANGE_HEAD(2), 222 + 0, 1, TLV_DB_SCALE_ITEM(0, 1300, 0), 223 + 2, 3, TLV_DB_SCALE_ITEM(2000, 900, 0), 224 + }; 219 225 220 226 static const struct snd_kcontrol_new wm8960_snd_controls[] = { 221 227 SOC_DOUBLE_R_TLV("Capture Volume", WM8960_LINVOL, WM8960_RINVOL, 222 - 0, 63, 0, adc_tlv), 228 + 0, 63, 0, inpga_tlv), 223 229 SOC_DOUBLE_R("Capture Volume ZC Switch", WM8960_LINVOL, WM8960_RINVOL, 224 230 6, 1, 0), 225 231 SOC_DOUBLE_R("Capture Switch", WM8960_LINVOL, WM8960_RINVOL, 226 232 7, 1, 0), 227 233 228 234 SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT3 Volume", 229 - WM8960_INBMIX1, 4, 7, 0, boost_tlv), 235 + WM8960_INBMIX1, 4, 7, 0, lineinboost_tlv), 230 236 SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT2 Volume", 231 - WM8960_INBMIX1, 1, 7, 0, boost_tlv), 237 + WM8960_INBMIX1, 1, 7, 0, lineinboost_tlv), 232 238 SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT3 Volume", 233 - WM8960_INBMIX2, 4, 7, 0, boost_tlv), 239 + WM8960_INBMIX2, 4, 7, 0, lineinboost_tlv), 234 240 SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT2 Volume", 235 - WM8960_INBMIX2, 1, 7, 0, boost_tlv), 241 + WM8960_INBMIX2, 1, 7, 0, lineinboost_tlv), 242 + SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT1 Volume", 243 + WM8960_RINPATH, 4, 3, 0, micboost_tlv), 244 + SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT1 Volume", 245 + WM8960_LINPATH, 4, 3, 0, micboost_tlv), 236 246 237 247 SOC_DOUBLE_R_TLV("Playback Volume", WM8960_LDAC, WM8960_RDAC, 238 248 0, 255, 0, dac_tlv),
+2 -1
sound/soc/codecs/wm8962.c
··· 2944 2944 WM8962_DAC_MUTE, val); 2945 2945 } 2946 2946 2947 - #define WM8962_RATES SNDRV_PCM_RATE_8000_96000 2947 + #define WM8962_RATES (SNDRV_PCM_RATE_8000_48000 |\ 2948 + SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) 2948 2949 2949 2950 #define WM8962_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 2950 2951 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
+7 -7
sound/soc/davinci/davinci-mcasp.c
··· 663 663 u8 rx_ser = 0; 664 664 u8 slots = mcasp->tdm_slots; 665 665 u8 max_active_serializers = (channels + slots - 1) / slots; 666 - int active_serializers, numevt, n; 666 + int active_serializers, numevt; 667 667 u32 reg; 668 668 /* Default configuration */ 669 669 if (mcasp->version < MCASP_VERSION_3) ··· 745 745 * The number of words for numevt need to be in steps of active 746 746 * serializers. 747 747 */ 748 - n = numevt % active_serializers; 749 - if (n) 750 - numevt += (active_serializers - n); 748 + numevt = (numevt / active_serializers) * active_serializers; 749 + 751 750 while (period_words % numevt && numevt > 0) 752 751 numevt -= active_serializers; 753 752 if (numevt <= 0) ··· 1298 1299 .ops = &davinci_mcasp_dai_ops, 1299 1300 1300 1301 .symmetric_samplebits = 1, 1302 + .symmetric_rates = 1, 1301 1303 }, 1302 1304 { 1303 1305 .name = "davinci-mcasp.1", ··· 1685 1685 1686 1686 irq = platform_get_irq_byname(pdev, "common"); 1687 1687 if (irq >= 0) { 1688 - irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_common\n", 1688 + irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_common", 1689 1689 dev_name(&pdev->dev)); 1690 1690 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, 1691 1691 davinci_mcasp_common_irq_handler, ··· 1702 1702 1703 1703 irq = platform_get_irq_byname(pdev, "rx"); 1704 1704 if (irq >= 0) { 1705 - irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_rx\n", 1705 + irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_rx", 1706 1706 dev_name(&pdev->dev)); 1707 1707 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, 1708 1708 davinci_mcasp_rx_irq_handler, ··· 1717 1717 1718 1718 irq = platform_get_irq_byname(pdev, "tx"); 1719 1719 if (irq >= 0) { 1720 - irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_tx\n", 1720 + irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_tx", 1721 1721 dev_name(&pdev->dev)); 1722 1722 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, 1723 1723 davinci_mcasp_tx_irq_handler,
+2 -1
sound/soc/fsl/fsl-asoc-card.c
··· 488 488 priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM; 489 489 } else { 490 490 dev_err(&pdev->dev, "unknown Device Tree compatible\n"); 491 - return -EINVAL; 491 + ret = -EINVAL; 492 + goto asrc_fail; 492 493 } 493 494 494 495 /* Common settings for corresponding Freescale CPU DAI driver */
+3 -2
sound/soc/fsl/fsl_ssi.c
··· 249 249 250 250 static bool fsl_ssi_is_ac97(struct fsl_ssi_private *ssi_private) 251 251 { 252 - return !!(ssi_private->dai_fmt & SND_SOC_DAIFMT_AC97); 252 + return (ssi_private->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) == 253 + SND_SOC_DAIFMT_AC97; 253 254 } 254 255 255 256 static bool fsl_ssi_is_i2s_master(struct fsl_ssi_private *ssi_private) ··· 948 947 CCSR_SSI_SCR_TCH_EN); 949 948 } 950 949 951 - if (fmt & SND_SOC_DAIFMT_AC97) 950 + if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_AC97) 952 951 fsl_ssi_setup_ac97(ssi_private); 953 952 954 953 return 0;
+12 -8
sound/soc/intel/haswell/sst-haswell-ipc.c
··· 302 302 struct sst_hsw_ipc_dx_reply dx; 303 303 void *dx_context; 304 304 dma_addr_t dx_context_paddr; 305 + enum sst_hsw_device_id dx_dev; 306 + enum sst_hsw_device_mclk dx_mclk; 307 + enum sst_hsw_device_mode dx_mode; 308 + u32 dx_clock_divider; 305 309 306 310 /* boot */ 307 311 wait_queue_head_t boot_wait; ··· 1404 1400 1405 1401 trace_ipc_request("set device config", dev); 1406 1402 1407 - config.ssp_interface = dev; 1408 - config.clock_frequency = mclk; 1409 - config.mode = mode; 1410 - config.clock_divider = clock_divider; 1403 + hsw->dx_dev = config.ssp_interface = dev; 1404 + hsw->dx_mclk = config.clock_frequency = mclk; 1405 + hsw->dx_mode = config.mode = mode; 1406 + hsw->dx_clock_divider = config.clock_divider = clock_divider; 1411 1407 if (mode == SST_HSW_DEVICE_TDM_CLOCK_MASTER) 1412 1408 config.channels = 4; 1413 1409 else ··· 1708 1704 return -EIO; 1709 1705 } 1710 1706 1711 - /* Set ADSP SSP port settings */ 1712 - ret = sst_hsw_device_set_config(hsw, SST_HSW_DEVICE_SSP_0, 1713 - SST_HSW_DEVICE_MCLK_FREQ_24_MHZ, 1714 - SST_HSW_DEVICE_CLOCK_MASTER, 9); 1707 + /* Set ADSP SSP port settings - sadly the FW does not store SSP port 1708 + settings as part of the PM context. */ 1709 + ret = sst_hsw_device_set_config(hsw, hsw->dx_dev, hsw->dx_mclk, 1710 + hsw->dx_mode, hsw->dx_clock_divider); 1715 1711 if (ret < 0) 1716 1712 dev_err(dev, "error: SSP re-initialization failed\n"); 1717 1713
+17
sound/soc/mediatek/mtk-afe-pcm.c
··· 549 549 memif->substream = substream; 550 550 551 551 snd_soc_set_runtime_hwparams(substream, &mtk_afe_hardware); 552 + 553 + /* 554 + * Capture cannot use ping-pong buffer since hw_ptr at IRQ may be 555 + * smaller than period_size due to AFE's internal buffer. 556 + * This easily leads to overrun when avail_min is period_size. 557 + * One more period can hold the possible unread buffer. 558 + */ 559 + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { 560 + ret = snd_pcm_hw_constraint_minmax(runtime, 561 + SNDRV_PCM_HW_PARAM_PERIODS, 562 + 3, 563 + mtk_afe_hardware.periods_max); 564 + if (ret < 0) { 565 + dev_err(afe->dev, "hw_constraint_minmax failed\n"); 566 + return ret; 567 + } 568 + } 552 569 ret = snd_pcm_hw_constraint_integer(runtime, 553 570 SNDRV_PCM_HW_PARAM_PERIODS); 554 571 if (ret < 0)
-2
sound/soc/pxa/Kconfig
··· 1 1 config SND_PXA2XX_SOC 2 2 tristate "SoC Audio for the Intel PXA2xx chip" 3 3 depends on ARCH_PXA 4 - select SND_ARM 5 4 select SND_PXA2XX_LIB 6 5 help 7 6 Say Y or M if you want to add support for codecs attached to ··· 24 25 config SND_PXA2XX_SOC_AC97 25 26 tristate 26 27 select AC97_BUS 27 - select SND_ARM 28 28 select SND_PXA2XX_LIB_AC97 29 29 select SND_SOC_AC97_BUS 30 30
+2 -2
sound/soc/pxa/pxa2xx-ac97.c
··· 49 49 .reset = pxa2xx_ac97_cold_reset, 50 50 }; 51 51 52 - static unsigned long pxa2xx_ac97_pcm_stereo_in_req = 12; 52 + static unsigned long pxa2xx_ac97_pcm_stereo_in_req = 11; 53 53 static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_in = { 54 54 .addr = __PREG(PCDR), 55 55 .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, ··· 57 57 .filter_data = &pxa2xx_ac97_pcm_stereo_in_req, 58 58 }; 59 59 60 - static unsigned long pxa2xx_ac97_pcm_stereo_out_req = 11; 60 + static unsigned long pxa2xx_ac97_pcm_stereo_out_req = 12; 61 61 static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_out = { 62 62 .addr = __PREG(PCDR), 63 63 .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
+1 -1
sound/soc/soc-dapm.c
··· 3501 3501 3502 3502 default: 3503 3503 WARN(1, "Unknown event %d\n", event); 3504 - return -EINVAL; 3504 + ret = -EINVAL; 3505 3505 } 3506 3506 3507 3507 out:
+9
sound/soc/soc-utils.c
··· 101 101 SNDRV_PCM_FMTBIT_S32_LE | \ 102 102 SNDRV_PCM_FMTBIT_U32_LE | \ 103 103 SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) 104 + /* 105 + * The dummy CODEC is only meant to be used in situations where there is no 106 + * actual hardware. 107 + * 108 + * If there is actual hardware even if it does not have a control bus 109 + * the hardware will still have constraints like supported samplerates, etc. 110 + * which should be modelled. And the data flow graph also should be modelled 111 + * using DAPM. 112 + */ 104 113 static struct snd_soc_dai_driver dummy_dai = { 105 114 .name = "snd-soc-dummy-dai", 106 115 .playback = {
+1 -1
sound/soc/spear/Kconfig
··· 1 1 config SND_SPEAR_SOC 2 2 tristate 3 - select SND_DMAENGINE_PCM 3 + select SND_SOC_GENERIC_DMAENGINE_PCM 4 4 5 5 config SND_SPEAR_SPDIF_OUT 6 6 tristate
+10 -4
sound/soc/sti/uniperif_player.c
··· 989 989 if (!info) 990 990 return -ENOMEM; 991 991 992 - of_property_read_u32(pnode, "version", &player->ver); 993 - if (player->ver == SND_ST_UNIPERIF_VERSION_UNKNOWN) { 992 + if (of_property_read_u32(pnode, "version", &player->ver) || 993 + player->ver == SND_ST_UNIPERIF_VERSION_UNKNOWN) { 994 994 dev_err(dev, "Unknown uniperipheral version "); 995 995 return -EINVAL; 996 996 } ··· 998 998 if (player->ver >= SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0) 999 999 info->underflow_enabled = 1; 1000 1000 1001 - of_property_read_u32(pnode, "uniperiph-id", &info->id); 1001 + if (of_property_read_u32(pnode, "uniperiph-id", &info->id)) { 1002 + dev_err(dev, "uniperipheral id not defined"); 1003 + return -EINVAL; 1004 + } 1002 1005 1003 1006 /* Read the device mode property */ 1004 - of_property_read_string(pnode, "mode", &mode); 1007 + if (of_property_read_string(pnode, "mode", &mode)) { 1008 + dev_err(dev, "uniperipheral mode not defined"); 1009 + return -EINVAL; 1010 + } 1005 1011 1006 1012 if (strcasecmp(mode, "hdmi") == 0) 1007 1013 info->player_type = SND_ST_UNIPERIF_PLAYER_TYPE_HDMI;
+5 -1
sound/soc/sti/uniperif_reader.c
··· 316 316 if (!info) 317 317 return -ENOMEM; 318 318 319 - of_property_read_u32(node, "version", &reader->ver); 319 + if (of_property_read_u32(node, "version", &reader->ver) || 320 + reader->ver == SND_ST_UNIPERIF_VERSION_UNKNOWN) { 321 + dev_err(&pdev->dev, "Unknown uniperipheral version "); 322 + return -EINVAL; 323 + } 320 324 321 325 /* Save the info structure */ 322 326 reader->info = info;