summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2018-01-16ASoC: uda1380: fix regression by adding back .read/.writeKuninori Morimoto
commit c001bf633a9 ("ASoC: use internal reg_cache on uda1380") removed .read/.write from driver, but it might breaks non-regmap driver, because ALSA SoC framework might call it. To fix this regression, this patch back .read/.write Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-16ASoC: tlv320dac33: fix regression by adding back .read/.writeKuninori Morimoto
commit c4305af43a8 ("ASoC: use internal reg_cache on tlv320dac33") removed .read/.write from driver, but it might breaks non-regmap driver, because ALSA SoC framework might call it. To fix this regression, this patch back .read/.write Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-16ALSA/dummy: Replace tasklet with softirq hrtimerThomas Gleixner
The tasklet is used to defer the execution of snd_pcm_period_elapsed() to the softirq context. Using the HRTIMER_MODE_SOFT mode invokes the timer callback in softirq context as well which renders the tasklet useless. [o-takashi: avoid stall due to a call of hrtimer_cancel() on a callback of hrtimer] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Jaroslav Kysela <perex@perex.cz> Cc: John Stultz <john.stultz@linaro.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Takashi Iwai <tiwai@suse.com> Cc: Takashi Sakamoto <o-takashi@sakamocchi.jp> Cc: alsa-devel@alsa-project.org Cc: keescook@chromium.org Link: http://lkml.kernel.org/r/20171221104205.7269-35-anna-maria@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-01-15ALSA: hda - Use IS_REACHABLE() for dependency on inputTakashi Iwai
The commit ffcd28d88e4f ("ALSA: hda - Select INPUT for Realtek HD-audio codec") introduced the reverse-selection of CONFIG_INPUT for Realtek codec in order to avoid the mess with dependency between built-in and modules. Later on, we obtained IS_REACHABLE() macro exactly for this kind of problems, and now we can remove th INPUT selection in Kconfig and put IS_REACHABLE(INPUT) to the appropriate places in the code, so that the driver doesn't need to select other subsystem forcibly. Fixes: ffcd28d88e4f ("ALSA: hda - Select INPUT for Realtek HD-audio codec") Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> # and build-tested Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-15ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read()Dan Carpenter
The loop timeout doesn't work because it's a post op and ends with "tmo" set to -1. I changed it from a post-op to a pre-op and I changed the initial the starting value from 5 to 6 so we still iterate 5 times. I left the other as it was because it's a large number. Fixes: b3c70c9ea62a ("ASoC: Alchemy AC97C/I2SC audio support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-15ALSA: seq: Process queue tempo/ppq change in a shotTakashi Iwai
The SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO ioctl sets the tempo and the ppq in a single call, while the current implementation updates each value one by one. This is a bit racy, and also suboptimal from the performance POV, as each call does re-acquire the lock and invokes the update of ALSA timer resolution. This patch reorganizes the code slightly so that we change both the tempo and the ppq in a shot. The skew value can be put into the same lock, but this is rather a rarely used feature and completely independent from the temp/ppq (it's evaluated only in the interrupt), so it's left as it was. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-15Merge branch 'for-linus' into for-nextTakashi Iwai
Back-merge to the development branch for further fixes of sequencer stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-15ALSA: usb-audio: Add a quirk for Nura's first gen headsetMartin Peres
The capture interface does not work, and the playback interface actually supports only 48kHz unlike what is advertised (44.1, 32, 22, 16, 8). The only unknown here is if there are other devices that use the same product ID, but given that this ID is currently unknown, I would assume it is specially allocated for the nura headset. Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-12ASoC: mxs-sgtl5000: add audio-routing supportChristian Fischer
Add dapm_widgets to machine-driver (from imx-sgtl5000). If the "audio-routing"-property is present at probing the dapm-widgets getting linked to the card. Signed-off-by: Christian Fischer <fischerc@swissphone.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-12ASoC: Intel - Convert to use acpi_dev_get_first_match_name()Andy Shevchenko
Instead of home grown snd_soc_acpi_find_name_from_hid() use acpi_dev_get_first_match_name(). Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-12Merge branch 'topic/hdac-hdmi' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
2018-01-12ASoC: cs42l73: Remove trailing semicolonLuis de Bethencourt
The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt <luisbg@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-12ASoC: acpi: remove hard-coded i2c-device name lengthPierre-Louis Bossart
Remove hard-codec [16] array size, replace with clearer description and dependency on ACPI_ID_LEN No functionality change Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-12ASoC: Intel: bytcht_es8316: fix HID handlingPierre-Louis Bossart
Same problem as with previous machine drivers, the codec dai uses a hard-coded name of "i2c-ESSX8316:00" but ACPI provides "i2c-ESSX8316:01" in some systems. Fix by overriding the hard-coded value with the codec name derived from the HID information Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189261 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-12Merge branch 'acpi-gpio' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm into asoc-intel
2018-01-12Merge tag 'asoc-v4.16-2' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v4.16 Some more updates for v4.16, the big things here are the ST DFSDM driver and the IIO patches required to support that and even more in the neverending series of code quality improvements for x86, including Pierre's work to improve the Kconfig. The unused SN95031 driver and associated board support are also removed, they haven't been buildable for a considerable time without anyone noticing.
2018-01-12Merge remote-tracking branches 'asoc/topic/wm8994', 'asoc/topic/wm8997' and ↵Mark Brown
'asoc/topic/wm8998' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/wm5102', 'asoc/topic/wm5110', ↵Mark Brown
'asoc/topic/wm8350', 'asoc/topic/wm8400' and 'asoc/topic/wm8903' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/uniphier', 'asoc/topic/utils', ↵Mark Brown
'asoc/topic/ux500', 'asoc/topic/wm0010' and 'asoc/topic/wm2000' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/tscs42xx', 'asoc/topic/twl4030', ↵Mark Brown
'asoc/topic/twl6040' and 'asoc/topic/uda1380' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/tlv320aic31xx', ↵Mark Brown
'asoc/topic/tlv320aic32x4', 'asoc/topic/tlv320aic3x', 'asoc/topic/tlv320dac33' and 'asoc/topic/ts3a227e' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/sunxi', 'asoc/topic/symmetry', ↵Mark Brown
'asoc/topic/tas5720', 'asoc/topic/tas6424' and 'asoc/topic/tfa9879' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/spdif', ↵Mark Brown
'asoc/topic/st-dfsdm', 'asoc/topic/stm32' and 'asoc/topic/sun4i-i2s' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5645', ↵Mark Brown
'asoc/topic/samsung' and 'asoc/topic/si476x' into asoc-next
2018-01-12Merge remote-tracking branch 'asoc/topic/rl6231' into asoc-nextMark Brown
2018-01-12Merge remote-tracking branches 'asoc/topic/mtk', 'asoc/topic/nau8540', ↵Mark Brown
'asoc/topic/nau8824', 'asoc/topic/nau8825' and 'asoc/topic/nuc900' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/max98926', 'asoc/topic/max98927', ↵Mark Brown
'asoc/topic/mc13783', 'asoc/topic/msm8916' and 'asoc/topic/mt8173' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/hdac_hdmi', ↵Mark Brown
'asoc/topic/hisilicon', 'asoc/topic/iio' and 'asoc/topic/max98373' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/eukrea-tlv320', 'asoc/topic/fsl', ↵Mark Brown
'asoc/topic/fsl-ssi' and 'asoc/topic/fsl_asrc' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/da7218', 'asoc/topic/dai-drv', ↵Mark Brown
'asoc/topic/davinci', 'asoc/topic/disconnect' and 'asoc/topic/ep93xx' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42l73', ↵Mark Brown
'asoc/topic/cs47l24', 'asoc/topic/cx20442' and 'asoc/topic/da7213' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/cq93vc', 'asoc/topic/cs35l32', ↵Mark Brown
'asoc/topic/cs35l34' and 'asoc/topic/cs42l52' into asoc-next
2018-01-12Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/amd', ↵Mark Brown
'asoc/topic/atmel', 'asoc/topic/codecs' and 'asoc/topic/compress' into asoc-next
2018-01-12Merge remote-tracking branch 'asoc/topic/rockchip' into asoc-nextMark Brown
2018-01-12Merge remote-tracking branch 'asoc/topic/rcar' into asoc-nextMark Brown
2018-01-12Merge remote-tracking branch 'asoc/topic/qcom' into asoc-nextMark Brown
2018-01-12Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown
2018-01-12Merge remote-tracking branch 'asoc/topic/pcm186x' into asoc-nextMark Brown
2018-01-12Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown
2018-01-12Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown
2018-01-12Merge remote-tracking branch 'asoc/fix/mtk' into asoc-linusMark Brown
2018-01-12Merge remote-tracking branch 'asoc/fix/rockchip' into asoc-linusMark Brown
2018-01-12Merge remote-tracking branch 'asoc/fix/intel' into asoc-linusMark Brown
2018-01-12ASoC: rt5645: add fallback case for jack detection supportPierre-Louis Bossart
Commit 78f5605c0329 ("ASoC: rt5645: cleanup DMI matching code") did a lot of useful cleanups. This patch adds a default case to enable jack detection if there is no pdata, device property or quirk. The chosen jd-mode3 is the most common and should limit the addition of new DMI-based quirks. Existing DMI quirks which only set this mode are left as is and not removed. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-11sound: Remove leftover msnd init declarationsTakashi Iwai
Some obsoleted functions are still declared in sound_core.c. Get rid of them. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-11sound: Remove unused register_sound_midi() and coTakashi Iwai
These helpers are no longer used after the removal of the legacy OSS drivers. Let's clean up. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-11ALSA: seq: Make ioctls race-freeTakashi Iwai
The ALSA sequencer ioctls have no protection against racy calls while the concurrent operations may lead to interfere with each other. As reported recently, for example, the concurrent calls of setting client pool with a combination of write calls may lead to either the unkillable dead-lock or UAF. As a slightly big hammer solution, this patch introduces the mutex to make each ioctl exclusive. Although this may reduce performance via parallel ioctl calls, usually it's not demanded for sequencer usages, hence it should be negligible. Reported-by: Luo Quan <a4651386@163.com> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-11ASoC: stm32: fix a typo in stm32_adfsdm_probe()Wei Yongjun
Fix a typo, we should return PTR_ERR(priv->iio_cb) instead of PTR_ERR(priv->iio_ch). Fixes: 55da094824c4 ("ASoC: stm32: add DFSDM DAI support") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-11ASoC: stm32: select IIO_BUFFERArnd Bergmann
The new stm32_adfsdm driver has incomplete dependencies as shown by Kconfig: warning: (SND_SOC_STM32_DFSDM && LMP91000) selects IIO_BUFFER_CB which has unmet direct dependencies (IIO && IIO_BUFFER) sound/soc/stm/stm32_adfsdm.o: In function `stm32_adfsdm_trigger': stm32_adfsdm.c:(.text+0x8c): undefined reference to `stm32_dfsdm_get_buff_cb' stm32_adfsdm.c:(.text+0x9c): undefined reference to `stm32_dfsdm_release_buff_cb' This makes the dependency on SND_SOC_STM32_DFSDM unconditional, so we can always resolve the stm32_dfsdm_get_buff_cb/stm32_dfsdm_release_buff_cb symbols and get the implied IIO_BUFFER dependency. compile-testing on other platforms is still possible as long as that IIO driver is there. Fixes: 55da094824c4 ("ASoC: stm32: add DFSDM DAI support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-11ALSA: pcm: Remove yet superfluous WARN_ON()Takashi Iwai
muldiv32() contains a snd_BUG_ON() (which is morphed as WARN_ON() with debug option) for checking the case of 0 / 0. This would be helpful if this happens only as a logical error; however, since the hw refine is performed with any data set provided by user, the inconsistent values that can trigger such a condition might be passed easily. Actually, syzbot caught this by passing some zero'ed old hw_params ioctl. So, having snd_BUG_ON() there is simply superfluous and rather harmful to give unnecessary confusions. Let's get rid of it. Reported-by: syzbot+7e6ee55011deeebce15d@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>