aboutsummaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2018-01-08ASoC: Intel: kconfig: add some comments for if symbolsVinod Koul1-5/+5
Help in finding matching "if" endings by commenting the "endif". Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: boards: align/fix SKL/BXT/KBL KconfigsPierre-Louis Bossart1-9/+8
No reason why SND_SOC_INTEL_SST should be set here. Also make sure same dependencies are used everywhere (only last one has SPI in addition). Replace X86_INTEL_LPSS by MFD_INTEL_LPSS since the former makes no sense for Skylake+ devices Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: boards: align Kconfig configurations for HiFi2Pierre-Louis Bossart1-14/+19
Make sure all the configs are aligned Also add the missing dependencies on SOC_ACPI stuff used to fix DAI names based on HID and fix a couple of indentation issues Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: boards: align Kconfig dependencies for Haswell/BroadwellPierre-Louis Bossart1-1/+1
Make sure that the same I2C/I2C_DESIGNWARE_PLATFORM are selected. The latter might actually need to be moved to the SOC side of things, it really has no place in a machine driver dependency Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: Fix nested/unnecessary Kconfig dependenciesPierre-Louis Bossart1-3/+3
This patch fixes a number of issues: 1. IOSF_MBI is only needed for byt-cr detection, which is only supported on Baytrail/Cherrytrail, move to HiFi2 config 2. SND_SOC_INTEL_SST should not select SND_SOC_INTEL_SST_ACPI, the latter config is only valid for Haswell/Baytrail legacy but not needed by Skylake 3. SND_SST_IPC_ACPI, used only by the atom/sst driver, should not select SND_SOC_INTEL_SST, none of the code under common/sst*.c is used This nesting of configs really makes no sense, it's easier to maintain if for each platform one can control what is strictly required. Compiled-tested with each of Haswell, Baytrail legacy, HiFi2, SKL cases selected independently. 0-day and explicit randconfig tests did not report additional issues and no functionality loss was observed in Intel tests on HIFI2 and SKYLAKE platforms Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: document what Kconfig options doPierre-Louis Bossart1-3/+14
Document in comments what the options are supposed to mean, before clean-up in next patch. No functionality change here. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: Kconfig: Simplify-clarify ACPI/PCI dependenciesPierre-Louis Bossart2-14/+27
PCI/ACPI selections should not happen in Kconfig for machine drivers, move to SOC selections. Add distinction between PCI and ACPI HiFi2 platforms and help text. There should be no functionality change. The PCI-based platforms may be removed at some point since Medfield is not really supported by anyone, and with Edison now defunct support for Merrifield/Edison is to be determined. The dependency on SND_DMA_SGBUF for Haswell is not clear at this point and may have to be further updated. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: Fix Kconfig with top-level selectorPierre-Louis Bossart3-65/+97
Follow network example suggested by Linus, move Intel definitions in if/endif block and clarify in help text which options distro configurations should enable - everything except legacy Baytrail stuff and NOCODEC (test only) To avoid user confusion, machine drivers are handled with a submenu made dependent on this top-level selector. There should be no functionality change - except that sound capabilities are restored when using older configs without any user selection. Note that the SND_SOC_ACPI_INTEL_MATCH config is currently filtered out by the top-level selector. This will change in the near future to allow for this option to be selected by both SST and SOF drivers (simplification with submenu for machine drivers by Vinod Koul) Fixes: f6a118a800e3 ("ASoC: Intel: clarify Kconfig dependencies") Reported-by: Linus Torvalds <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: rockchip: i2s: fix playback after runtime resumeJohn Keeping1-0/+6
When restoring registers during runtime resume, we must not write to I2S_TXDR which is the transmit FIFO as this queues up a sample to be output and pushes all of the output channels down by one. This can be demonstrated with the speaker-test utility: for i in a b c; do speaker-test -c 2 -s 1; done which should play a test through the left speaker three times but if the I2S hardware starts runtime suspended the first sample will be played through the right speaker. Fix this by marking I2S_TXDR as volatile (which also requires marking it as readble, even though it technically isn't). This seems to be the most robust fix, the alternative of giving I2S_TXDR a default value is more fragile since it does not prevent regcache writing to the register in all circumstances. While here, also fix the configuration of I2S_RXDR and I2S_FIFOLR; these are not writable so they do not suffer from the same problem as I2S_TXDR but reading from I2S_RXDR does suffer from a similar problem. Fixes: f0447f6cbb20 ("ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle", 2016-09-07) Signed-off-by: John Keeping <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2018-01-08ASoC: Intel: bytcr-rt5651: add support for Line InPierre-Louis Bossart1-0/+6
Add the DAPM widgets and routes. Tested with MinnowMax Turbot + rt5651 eval board with Speaker (LineOut) -> LineIn loopback Thanks to Bard Liao @ Realtek for providing the 0dB settings "IN Capture Volume" = 23 "ADC Capture Volume" = 47 "OUT Playback Volume" = 31 "DAC1 Playback Volume" = 175 Signed-off-by: Pierre-Louis Bossart <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirksPierre-Louis Bossart1-0/+9
Define DMI quirk for rt5651 eval board connected to MinnowBoard Turbot. The only difference with a MinnowBoard MAX is that the MCLK pin is enabled on the LSE connector Signed-off-by: Pierre-Louis Bossart <[email protected]> Tested-by: Keqiao.Zhang <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be usedKeyon Jie1-2/+14
On Minnowboard Max with Realtek rt5651 eval board, the IN3P is connected to Headset Mic. Here add and select it for Minnowboard Max. Signed-off-by: Keyon Jie <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirkPierre-Louis Bossart1-1/+2
The current code doesn't enable the MCLK which reduces audio quality (PLL driven from BLCK), fix the quirk Tested-by: Carlo Caione <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: sst: Fix some styleChristophe JAILLET1-3/+3
This patch fixes 3 small issues: - missing 2nd '*' at the beginning of a doxygen comment - extra space after a '\n' in a dev_dbg message - extra tab before a 'return" statement Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Intel: sst: Fix the return value of 'sst_send_byte_stream_mrfld()'Christophe JAILLET1-1/+1
In some error handling paths, an error code is assiegned to 'ret'. However, the function always return 0. Fix it and return the error code if such an error paths is taken. Fixes: 3d9ff34622ba ("ASoC: Intel: sst: add stream operations") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_presentJeremy Cline1-30/+2
Replace snd_soc_acpi_check_hid() with the generic acpi_dev_present() and remove the now unused snd_soc_acpi_check_hid function. This should have no functional change. Signed-off-by: Jeremy Cline <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08Merge branch 'fix/intel' of ↵Mark Brown462-38015/+6756
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
2018-01-08ALSA: pcm: Allow aborting mutex lock at OSS read/write loopsTakashi Iwai1-15/+21
PCM OSS read/write loops keep taking the mutex lock for the whole read/write, and this might take very long when the exceptionally high amount of data is given. Also, since it invokes with mutex_lock(), the concurrent read/write becomes unbreakable. This patch tries to address these issues by replacing mutex_lock() with mutex_lock_interruptible(), and also splits / re-takes the lock at each read/write period chunk, so that it can switch the context more finely if requested. Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2018-01-08ALSA: pcm: Abort properly at pending signal in OSS read/write loopsTakashi Iwai1-0/+8
The loops for read and write in PCM OSS emulation have no proper check of pending signals, and they keep processing even after user tries to break. This results in a very long delay, often seen as RCU stall when a huge unprocessed bytes remain queued. The bug could be easily triggered by syzkaller. As a simple workaround, this patch adds the proper check of pending signals and aborts the loop appropriately. Reported-by: [email protected] Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2018-01-08ASoC: acpi: fix machine driver selection based on quirkPierre-Louis Bossart1-5/+3
The ACPI/machine-driver code refactoring introduced in 4.13 introduced a regression for cases where we need a DMI-based quirk to select the machine driver (the BIOS reports an invalid HID). The fix is just to make sure the results of the quirk are actually used. Fixes: 54746dabf770 ('ASoC: Improve machine driver selection based on quirk data') Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691 Tested-by: Nicole Færber <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2018-01-08ASoC: rockchip: i2s: Support mono captureMatthias Kaehlcke1-2/+3
The Rockchip I2S controller only allows to configure even numbers of capture channels. It is still possible to capture monophonic audio by using dual-channel mode and ignoring the 'data' from the second channel. Signed-off-by: Matthias Kaehlcke <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: mediatek: mt2701: fix return value check in mt2701_afe_pcm_dev_probe()Wei Yongjun1-2/+2
In case of error, the function syscon_node_to_regmap() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: dfa3cbb83e09 ("ASoC: mediatek: modify MT2701 AFE driver to adapt mfd device") Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ASoC: fsl_ssi: Fix build errorGuenter Roeck1-2/+2
powerpc:mpc85xx_defconfig fails to build with the following errors. sound/soc/fsl/fsl_dma.c: In function 'fsl_soc_dma_probe': sound/soc/fsl/fsl_dma.c:916:34: error: 'CCSR_SSI_STX0' undeclared sound/soc/fsl/fsl_dma.c:917:34: error: 'CCSR_SSI_SRX0' undeclared Fixes: a818aa5f967b ("ASoC: fsl_ssi: Rename registers and fields macros") Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Nicolin Chen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08ALSA: hda/realtek - update ALC225 depop optimizeKailang Yang1-0/+101
Add ALC225 its own depop functions for alc_init and alc_shutup. Add depop optimize step for headset mode functions. Signed-off-by: Kailang Yang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2018-01-05Merge tag 'asoc-v4.16' of ↵Takashi Iwai128-3153/+11527
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v4.16 Quite a big update here, mostly in new device support and some big updates for older drivers too. The main core work continues to be Morimoto-san's efforts on modernising drivers to use the component layer. - Lots more updates from Morimoto-san to move more things into the component level. - Large cleanups of some of the TI CODEC drivers from Andrew F. Davis. - Even more quirks and cleanups of quirks for x86 systems. - Refactoring of the Freescale SSI driver from Nicolin Chen in preparation for some more substantive improvements which are currently in review. - New drivers for Allwinner A83T, Maxim MAX89373, SocioNext UiniPhier EVEA Tempo Semiconductor TSCS42xx and TI PCM816x, TAS5722 and TAS6424 devices.
2018-01-05ALSA: aloop: Fix racy hw constraints adjustmentTakashi Iwai1-30/+21
The aloop driver tries to update the hw constraints of the connected target on the cable of the opened PCM substream. This is done by adding the extra hw constraints rules referring to the substream runtime->hw fields, while the other substream may update the runtime hw of another side on the fly. This is, however, racy and may result in the inconsistent values when both PCM streams perform the prepare concurrently. One of the reason is that it overwrites the other's runtime->hw field; which is not only racy but also broken when it's called before the open of another side finishes. And, since the reference to runtime->hw isn't protected, the concurrent write may give the partial value update and become inconsistent. This patch is an attempt to fix and clean up: - The prepare doesn't change the runtime->hw of other side any longer, but only update the cable->hw that is referred commonly. - The extra rules refer to the loopback_pcm object instead of the runtime->hw. The actual hw is deduced from cable->hw. - The extra rules take the cable_lock to protect against the race. Fixes: b1c73fc8e697 ("ALSA: snd-aloop: Fix hw_params restrictions and checking") Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2018-01-05ALSA: aloop: Fix inconsistent format due to incomplete ruleTakashi Iwai1-7/+6
The extra hw constraint rule for the formats the aloop driver introduced has a slight flaw, where it doesn't return a positive value when the mask got changed. It came from the fact that it's basically a copy&paste from snd_hw_constraint_mask64(). The original code is supposed to be a single-shot and it modifies the mask bits only once and never after, while what we need for aloop is the dynamic hw rule that limits the mask bits. This difference results in the inconsistent state, as the hw_refine doesn't apply the dependencies fully. The worse and surprisingly result is that it causes a crash in OSS emulation when multiple full-duplex reads/writes are performed concurrently (I leave why it triggers Oops to readers as a homework). For fixing this, replace a few open-codes with the standard snd_mask_*() macros. Reported-by: [email protected] Fixes: b1c73fc8e697 ("ALSA: snd-aloop: Fix hw_params restrictions and checking") Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2018-01-05ALSA: aloop: Release cable upon open error pathTakashi Iwai1-13/+25
The aloop runtime object and its assignment in the cable are left even when opening a substream fails. This doesn't mean any memory leak, but it still keeps the invalid pointer that may be referred by the another side of the cable spontaneously, which is a potential Oops cause. Clean up the cable assignment and the empty cable upon the error path properly. Fixes: 597603d615d2 ("ALSA: introduce the snd-aloop module for the PCM loopback") Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2018-01-05ALSA: pcm: Workaround for weird PulseAudio behavior on rewind errorTakashi Iwai1-2/+7
The commit 9027c4639ef1 ("ALSA: pcm: Call ack() whenever appl_ptr is updated") introduced the possible error code returned from the PCM rewind ioctl. Basically the change was for handling the indirect PCM more correctly, but ironically, it caused rather a side-effect: PulseAudio gets pissed off when receiving an error from rewind, throws everything away and stops processing further, resulting in the silence. It's clearly a failure in the application side, so the best would be to fix that bug in PA. OTOH, PA is mostly the only user of the rewind feature, so it's not good to slap the sole customer. This patch tries to mitigate the situation: instead of returning an error, now the rewind ioctl returns zero when the driver can't rewind. It indicates that no rewind was performed, so the behavior is consistent, at least. Fixes: 9027c4639ef1 ("ALSA: pcm: Call ack() whenever appl_ptr is updated") Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2018-01-05Merge remote-tracking branches 'asoc/topic/wm8997' and 'asoc/topic/wm8998' ↵Mark Brown2-17/+6
into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/wm5110', 'asoc/topic/wm8350', ↵Mark Brown5-41/+12
'asoc/topic/wm8400', 'asoc/topic/wm8903' and 'asoc/topic/wm8994' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/uniphier', 'asoc/topic/utils', ↵Mark Brown9-17/+598
'asoc/topic/wm0010', 'asoc/topic/wm2000' and 'asoc/topic/wm5102' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/ts3a227e', 'asoc/topic/tsc42xx', ↵Mark Brown8-39/+4197
'asoc/topic/twl4030', 'asoc/topic/twl6040' and 'asoc/topic/uda1380' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/tfa9879', ↵Mark Brown8-600/+600
'asoc/topic/tlv320aic31xx', 'asoc/topic/tlv320aic32x4', 'asoc/topic/tlv320aic3x' and 'asoc/topic/tlv320dac33' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/sun4i-i2s', 'asoc/topic/sunxi', ↵Mark Brown9-26/+1022
'asoc/topic/symmetry', 'asoc/topic/tas5720' and 'asoc/topic/tas6424' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/si476x', ↵Mark Brown5-119/+54
'asoc/topic/simple', 'asoc/topic/spdif' and 'asoc/topic/stm32' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/rl6231', 'asoc/topic/rt5514' and ↵Mark Brown7-104/+285
'asoc/topic/rt5645' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/nau8824', 'asoc/topic/nau8825' ↵Mark Brown4-50/+83
and 'asoc/topic/nuc900' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/mc13783', 'asoc/topic/msm8916', ↵Mark Brown10-642/+379
'asoc/topic/mt8173', 'asoc/topic/mtk' and 'asoc/topic/nau8540' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/hisilicon', ↵Mark Brown7-3/+1191
'asoc/topic/max98373', 'asoc/topic/max98926' and 'asoc/topic/max98927' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-ssi', ↵Mark Brown7-946/+934
'asoc/topic/fsl_asrc' and 'asoc/topic/hdac_hdmi' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/dai-drv', 'asoc/topic/davinci', ↵Mark Brown6-190/+209
'asoc/topic/disconnect', 'asoc/topic/ep93xx' and 'asoc/topic/eukrea-tlv320' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/cs47l24', ↵Mark Brown6-61/+28
'asoc/topic/cx20442', 'asoc/topic/da7213' and 'asoc/topic/da7218' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/cq93vc', 'asoc/topic/cs35l32', ↵Mark Brown5-46/+27
'asoc/topic/cs35l34', 'asoc/topic/cs42l52' and 'asoc/topic/cs42l56' into asoc-next
2018-01-05Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/amd', ↵Mark Brown4-21/+33
'asoc/topic/atmel' and 'asoc/topic/compress' into asoc-next
2018-01-05Merge remote-tracking branch 'asoc/topic/rcar' into asoc-nextMark Brown6-168/+184
2018-01-05Merge remote-tracking branch 'asoc/topic/qcom' into asoc-nextMark Brown1-5/+5
2018-01-05Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown1-0/+4
2018-01-05Merge remote-tracking branch 'asoc/topic/pcm186x' into asoc-nextMark Brown6-0/+1100
2018-01-05Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown21-37/+572