summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2019-03-20ASoC: sgtl5000: Use normal VAG ramp to reduce pop noiseKlaus Goger
The slow downed ramp causes a higher voltage level at the turn off time generating an audible pop noise. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
2019-01-25ASoC: rockchip: cdndp: use spdif for dp outputJianhui Wang
Change-Id: I23b3e58ad361ad026e836dc19e1f727c350046f1 Signed-off-by: Jianhui Wang <wjh@rock-chips.com>
2019-01-25ASoC: rockchip: cdndp: add support for 176.4k & 192kJianhui Wang
Change-Id: I5881829fe29729784d1f16d918f932062664b961 Signed-off-by: Jianhui Wang <wjh@rock-chips.com>
2019-01-24ASoC: rk3308_codec: handle micbias and optimize codec powerXing Zheng
Change-Id: I0e21dac2b89230250b70de217afc28447501a906 Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-01-15ASoC: rk3308_codec: fix some skip grps errorsXing Zheng
If we use the channels which are less than en_always_grps_num, we don't need to set the flag to skip_grps which are not used. And, the skip grps need to refer to mapped_grps For example, if: rockchip,en-always-grps = <1 2 3>; rockchip,adc-grps-route = <2 1 3 0>; The DUT startup and capture 2ch at first, we just open grp2 and set skip_grp[2]=1. Then, if we capture 4ch, we just skip grp2, open grp1, and set skip_grp[1]=1. To capture 6ch: we skip grp2/grp1, open grp3 and set skip_grp[3]=1. To capture 8ch: we skip grp2/grp1/grp3 and open grp0. Change-Id: I88c0b220ce0e714abafda1be3c895ad1c5c9ddca Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-12-28ASoC: rockchip: rk817-codec: Add support S32_LELeo Wen
Change-Id: I850fb7a2745320ff4e325905cdf2cab625419977 Signed-off-by: Leo Wen <leo.wen@rock-chips.com>
2018-12-21ASoC: rockchip: spdif: fix some coding style issuesSugar Zhang
Change-Id: Ibe8edc413df2944464848ba81afdc447edbd405e Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-21ASoC: rockchip: spdif: Simplify the mclk calculationSugar Zhang
This patch simplifies the mclk calculation to 128fs, which is generally required in some receivers. Change-Id: I2914ab57453ee5f764885fa8fa9dacd44a67e775 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-19Merge branch 'linux-linaro-lsk-v4.4-android' of ↵Tao Huang
git://git.linaro.org/kernel/linux-linaro-stable.git * linux-linaro-lsk-v4.4-android: (812 commits) Linux 4.4.167 mac80211: ignore NullFunc frames in the duplicate detection mac80211: fix reordering of buffered broadcast packets mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext mac80211: Clear beacon_int in ieee80211_do_stop mac80211_hwsim: Timer should be initialized before device registered kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var() tty: serial: 8250_mtk: always resume the device in probe. cifs: Fix separator when building path from dentry Staging: lustre: remove two build warnings xhci: Prevent U1/U2 link pm states if exit latency is too long SUNRPC: Fix leak of krb5p encode pages virtio/s390: fix race in ccw_io_helper() virtio/s390: avoid race on vcdev->config ALSA: pcm: Fix interval evaluation with openmin/max ALSA: pcm: Call snd_pcm_unlink() conditionally at closing ALSA: pcm: Fix starvation on down_write_nonblock() ALSA: hda: Add support for AMD Stoney Ridge ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c USB: check usb_get_extra_descriptor for proper size ... Conflicts: drivers/gpu/drm/rockchip/rockchip_drm_drv.c drivers/usb/host/xhci-ring.c Change-Id: I4304b0875908403a7d88a0d77da52cea04563c11
2018-12-13ALSA: pcm: Call snd_pcm_unlink() conditionally at closingTakashi Iwai
commit b51abed8355e5556886623b2772fa6b7598d2282 upstream. Currently the PCM core calls snd_pcm_unlink() always unconditionally at closing a stream. However, since snd_pcm_unlink() invokes the global rwsem down, the lock can be easily contended. More badly, when a thread runs in a high priority RT-FIFO, it may stall at spinning. Basically the call of snd_pcm_unlink() is required only for the linked streams that are already rare occasion. For normal use cases, this code path is fairly superfluous. As an optimization (and also as a workaround for the RT problem above in normal situations without linked streams), this patch adds a check before calling snd_pcm_unlink() and calls it only when needed. Reported-by: Chanho Min <chanho.min@lge.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13ALSA: pcm: Fix starvation on down_write_nonblock()Chanho Min
commit b888a5f713e4d17faaaff24316585a4eb07f35b7 upstream. Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream") fixes deadlock for non-atomic PCM stream. But, This patch causes antother stuck. If writer is RT thread and reader is a normal thread, the reader thread will be difficult to get scheduled. It may not give chance to release readlocks and writer gets stuck for a long time if they are pinned to single cpu. The deadlock described in the previous commit is because the linux rwsem queues like a FIFO. So, we might need non-FIFO writelock, not non-block one. My suggestion is that the writer gives reader a chance to be scheduled by using the minimum msleep() instaed of spinning without blocking by writer. Also, The *_nonblock may be changed to *_nonfifo appropriately to this concept. In terms of performance, when trylock is failed, this minimum periodic msleep will have the same performance as the tick-based schedule()/wake_up_q(). [ Although this has a fairly high performance penalty, the relevant code path became already rare due to the previous commit ("ALSA: pcm: Call snd_pcm_unlink() conditionally at closing"). That is, now this unconditional msleep appears only when using linked streams, and this must be a rare case. So we accept this as a quick workaround until finding a more suitable one -- tiwai ] Fixes: 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream") Suggested-by: Wonmin Jung <wonmin.jung@lge.com> Signed-off-by: Chanho Min <chanho.min@lge.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13ALSA: hda: Add support for AMD Stoney RidgeKai-Heng Feng
commit 3deef52ce10514ccdebba8e8ab85f9cebd0eb3f7 upstream. It's similar to other AMD audio devices, it also supports D3, which can save some power drain. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.cHui Peng
commit 5f8cf712582617d523120df67d392059eaf2fc4b upstream. If a USB sound card reports 0 interfaces, an error condition is triggered and the function usb_audio_probe errors out. In the error path, there was a use-after-free vulnerability where the memory object of the card was first freed, followed by a decrement of the number of active chips. Moving the decrement above the atomic_dec fixes the UAF. [ The original problem was introduced in 3.1 kernel, while it was developed in a different form. The Fixes tag below indicates the original commit but it doesn't mean that the patch is applicable cleanly. -- tiwai ] Fixes: 362e4e49abe5 ("ALSA: usb-audio - clear chip->probing on error exit") Reported-by: Hui Peng <benquike@gmail.com> Reported-by: Mathias Payer <mathias.payer@nebelwelt.net> Signed-off-by: Hui Peng <benquike@gmail.com> Signed-off-by: Mathias Payer <mathias.payer@nebelwelt.net> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13ALSA: trident: Suppress gcc string warningTakashi Iwai
commit d6b340d7cb33c816ef4abe8143764ec5ab14a5cc upstream. The meddlesome gcc warns about the possible shortname string in trident driver code: sound/pci/trident/trident.c: In function ‘snd_trident_probe’: sound/pci/trident/trident.c:126:2: warning: ‘strcat’ accessing 17 or more bytes at offsets 36 and 20 may overlap 1 byte at offset 36 [-Wrestrict] strcat(card->shortname, card->driver); It happens since gcc calculates the possible string size from card->driver, but this can't be true since we did set the string just before that, and they are much shorter. For shutting it up, use the exactly same string set to card->driver for strcat() to card->shortname, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13ALSA: sparc: Fix invalid snd_free_pages() at error pathTakashi Iwai
commit 9a20332ab373b1f8f947e0a9c923652b32dab031 upstream. Some spurious calls of snd_free_pages() have been overlooked and remain in the error paths of sparc cs4231 driver code. Since runtime->dma_area is managed by the PCM core helper, we shouldn't release manually. Drop the superfluous calls. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13ALSA: control: Fix race between adding and removing a user elementTakashi Iwai
commit e1a7bfe3807974e66f971f2589d4e0197ec0fced upstream. The procedure for adding a user control element has some window opened for race against the concurrent removal of a user element. This was caught by syzkaller, hitting a KASAN use-after-free error. This patch addresses the bug by wrapping the whole procedure to add a user control element with the card->controls_rwsem, instead of only around the increment of card->user_ctl_count. This required a slight code refactoring, too. The function snd_ctl_add() is split to two parts: a core function to add the control element and a part calling it. The former is called from the function for adding a user control element inside the controls_rwsem. One change to be noted is that snd_ctl_notify() for adding a control element gets called inside the controls_rwsem as well while it was called outside the rwsem. But this should be OK, as snd_ctl_notify() takes another (finer) rwlock instead of rwsem, and the call of snd_ctl_notify() inside rwsem is already done in another code path. Reported-by: syzbot+dc09047bce3820621ba2@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13ALSA: ac97: Fix incorrect bit shift at AC97-SPSA control writeTakashi Iwai
commit 7194eda1ba0872d917faf3b322540b4f57f11ba5 upstream. The function snd_ac97_put_spsa() gets the bit shift value from the associated private_value, but it extracts too much; the current code extracts 8 bit values in bits 8-15, but this is a combination of two nibbles (bits 8-11 and bits 12-15) for left and right shifts. Due to the incorrect bits extraction, the actual shift may go beyond the 32bit value, as spotted recently by UBSAN check: UBSAN: Undefined behaviour in sound/pci/ac97/ac97_codec.c:836:7 shift exponent 68 is too large for 32-bit type 'int' This patch fixes the shift value extraction by masking the properly with 0x0f instead of 0xff. Reported-and-tested-by: Meelis Roos <mroos@linux.ee> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13ALSA: wss: Fix invalid snd_free_pages() at error pathTakashi Iwai
commit 7b69154171b407844c273ab4c10b5f0ddcd6aa29 upstream. Some spurious calls of snd_free_pages() have been overlooked and remain in the error paths of wss driver code. Since runtime->dma_area is managed by the PCM core helper, we shouldn't release manually. Drop the superfluous calls. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05ASoC: rockchip: pdm: Correct PDM_CTRL0 reg valueSugar Zhang
This patch fix the wrong reg value for rk322x/rk322xh, cuz there is no STORE JUSTIFIED MODE on it. on rk322x/rk322xh, the same bit means PDM_MODE/RESERVED, if the bit is set to RESERVED, the controller will not work. Change-Id: I9bfc055e792d73a66f51c78c7c2ff5c4cba620ae Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-05ASoC: rockchip: pdm: Mark RXFIFO_DATA as volatile and preciousSugar Zhang
This patch marks RXFIFO_DATA as precious to avoid being read outside a call from the driver, such as regmap debugfs Change-Id: Id94a3d6f4ea382fc09547241dabc6ab84ca74139 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-05ASoC: rockchip: spdifrx: Mark SPDIFRX_SMPDR as volatile and preciousSugar Zhang
This patch marks SPDIFRX_SMPDR as precious to avoid being read outside a call from the driver, such as regmap debugfs. Change-Id: Icc5398e0e192b86e191770b9ebd1251f97e6a048 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-05ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatileSugar Zhang
This patch marks SPDIF_SMPDR as volatile to make it resaonable, which also requires marking it as readable, even though it isn't. Change-Id: Ia59136a4d7a9a3984d4f4b2518f835ead7419aec Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-05ASoC: rockchip: i2s_tdm: Add grf configurationSugar Zhang
This patch adds grf configs to fix the clk paths when used in tx/rx only slave mode. Change-Id: I704687d86f1e8c25181d1e87e00107560c9e36fe Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-05ASoC: rockchip: i2s_tdm: Correct some regmap configSugar Zhang
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 with 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 readable, 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. Change-Id: Id91d3f54f3fda0e9140c9da162b0dff2c3df067b Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-05UPSTREAM: ASoC: rockchip: i2s: fix playback after runtime resumeJohn Keeping
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 readable, 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. Change-Id: I47e67b51f8251486bb5e937619fdec89fc055f14 Fixes: f0447f6cbb20 ("ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle", 2016-09-07) Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> (cherry picked from commit c66234cfedfc3e6e3b62563a5f2c1562be09a35d)
2018-12-05ASoC: rockchip: i2s: Add reset mechanismSugar Zhang
This patch brings i2s back to normal by resetting i2s m/h logic if i2s' clear operation is failed. Change-Id: I2fd47039b522ac89499b4a2912d5ffb7a469e75e Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-05ASoC: rockchip: i2s_tdm: Add reset mechanismSugar Zhang
This patch brings i2s back to normal by resetting i2s tx/rx relative logic if i2s' clear operation is failed. Change-Id: I52e4713d26f781962278802bd1f9bbce3fe4b751 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-11-27ASoC: rockchip: i2s-tdm: add supports i2s RX/TX route mapXing Zheng
Change-Id: I4a6834a95bf34a8fd75613296488517134321c9d Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-11-21ALSA: hda: Check the non-cached stream buffers more explicitlyTakashi Iwai
[ Upstream commit 78c9be61c3a5cd9e2439fd27a5ffad73a81958c7 ] Introduce a new flag, uc_buffer, to indicate that the controller requires the non-cached pages for stream buffers, either as a chip-specific requirement or specified via snoop=0 option. This improves the code-readability. Also, this patch fixes the incorrect behavior for C-Media chip where the stream buffers were never handled as non-cached due to the check of driver_type even if you pass snoop=0 option. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21ALSA: ca0106: Disable IZD on SB0570 DAC to fix audio popsAlex Stanoev
commit ac237c28d5ac1b241d58b1b7b4b9fa10efb22fb5 upstream. The Creative Audigy SE (SB0570) card currently exhibits an audible pop whenever playback is stopped or resumed, or during silent periods of an audio stream. Initialise the IZD bit to the 0 to eliminate these pops. The Infinite Zero Detection (IZD) feature on the DAC causes the output to be shunted to Vcap after 2048 samples of silence. This discharges the AC coupling capacitor through the output and causes the aforementioned pop/click noise. The behaviour of the IZD bit is described on page 15 of the WM8768GEDS datasheet: "With IZD=1, applying MUTE for 1024 consecutive input samples will cause all outputs to be connected directly to VCAP. This also happens if 2048 consecutive zero input samples are applied to all 6 channels, and IZD=0. It will be removed as soon as any channel receives a non-zero input". I believe the second sentence might be referring to IZD=1 instead of IZD=0 given the observed behaviour of the card. This change should make the DAC initialisation consistent with Creative's Windows driver, as this popping persists when initialising the card in Linux and soft rebooting into Windows, but is not present on a cold boot to Windows. Signed-off-by: Alex Stanoev <alex@astanoev.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21ALSA: hda - Add mic quirk for the Lenovo G50-30 (17aa:3905)Jeremy Cline
commit e7bb6ad5685f05685dd8a6a5eda7bfcd14d5f95b upstream. The Lenovo G50-30, like other G50 models, has a Conexant codec that requires a quirk for its inverted stereo dmic. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1249364 Reported-by: Alexander Ploumistos <alex.ploumistos@gmail.com> Tested-by: Alexander Ploumistos <alex.ploumistos@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Jeremy Cline <jcline@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-15ASoC: rockchip: multi_dais: add support for tdm slot setSugar Zhang
Change-Id: I6867569d9dd9dd1a5137cded4f6aa21b802a53d7 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-11-13ASoC: rk3308_codec: reset HPMIX and recover their gainsXing Zheng
Change-Id: I25b50b8bfe8255e2bf99124334323845a1a24705 Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-11-12ALSA: aloop: fix clear capture buf at wrong timeXing Zheng
We need to use uniform current jiffies to avoid the delta_capt too fast and the playback data is cleared. Change-Id: I15e46a3857d76ca37b01a4af4c4d331ec41febfc Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-11-10ASoC: spear: fix error return code in spdif_in_probe()Gustavo A. R. Silva
[ Upstream commit 27d30400c448264c1ac9434cb836de0c230af213 ] platform_get_irq() returns an error code, but the spdif_in driver ignores it and always returns -EINVAL. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Notice that platform_get_irq() no longer returns 0 on error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print error message and propagate the return value of platform_get_irq on failure. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-10ALSA: timer: Fix zero-division by continue of uninitialized instanceTakashi Iwai
[ Upstream commit 9f8a7658bcafb2a7853f7a2eae8a94e87e6e695b ] When a user timer instance is continued without the explicit start beforehand, the system gets eventually zero-division error like: divide error: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN CPU: 1 PID: 27320 Comm: syz-executor Not tainted 4.8.0-rc3-next-20160825+ #8 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff88003c9b2280 task.stack: ffff880027280000 RIP: 0010:[<ffffffff858e1a6c>] [< inline >] ktime_divns include/linux/ktime.h:195 RIP: 0010:[<ffffffff858e1a6c>] [<ffffffff858e1a6c>] snd_hrtimer_callback+0x1bc/0x3c0 sound/core/hrtimer.c:62 Call Trace: <IRQ> [< inline >] __run_hrtimer kernel/time/hrtimer.c:1238 [<ffffffff81504335>] __hrtimer_run_queues+0x325/0xe70 kernel/time/hrtimer.c:1302 [<ffffffff81506ceb>] hrtimer_interrupt+0x18b/0x420 kernel/time/hrtimer.c:1336 [<ffffffff8126d8df>] local_apic_timer_interrupt+0x6f/0xe0 arch/x86/kernel/apic/apic.c:933 [<ffffffff86e13056>] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:957 [<ffffffff86e1210c>] apic_timer_interrupt+0x8c/0xa0 arch/x86/entry/entry_64.S:487 <EOI> ..... Although a similar issue was spotted and a fix patch was merged in commit [6b760bb2c63a: ALSA: timer: fix division by zero after SNDRV_TIMER_IOCTL_CONTINUE], it seems covering only a part of iceberg. In this patch, we fix the issue a bit more drastically. Basically the continue of an uninitialized timer is supposed to be a fresh start, so we do it for user timers. For the direct snd_timer_continue() call, there is no way to pass the initial tick value, so we kick out for the uninitialized case. Reported-by: Dmitry Vyukov <dvyukov@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-10ASoC: wm8940: Enable cache usage to fix crashes on resumeGeert Uytterhoeven
[ Upstream commit 50c7a0ef2d97e56c7ce2f1ea5fe1d8e25aadc1bb ] The wm8940 driver is using a regmap cache sync to restore the configuration of the chip when switching from OFF to STANDBY, but does not actually define a register cache which means that the restore is never going to work and we trigger asserts in regmap. Fix this by enabling caching. Based on commit d3030d11961a8c10 ("ASoC: ak4642: Enable cache usage to fix crashes on resume") by Mark Brown <broonie@kernel.org>. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-10ASoC: ak4613: Enable cache usage to fix crashes on resumeGeert Uytterhoeven
[ Upstream commit dcd2d1f78664fdc75eadaaf65257834e24383d01 ] During system resume: kernel BUG at drivers/base/regmap/regcache.c:347! ... PC is at regcache_sync+0x1c/0x128 LR is at ak4613_resume+0x28/0x34 The ak4613 driver is using a regmap cache sync to restore the configuration of the chip on resume but does not actually define a register cache which means that the resume is never going to work and we trigger asserts in regmap. Fix this by enabling caching. Based on commit d3030d11961a8c10 ("ASoC: ak4642: Enable cache usage to fix crashes on resume") by Mark Brown <broonie@kernel.org>. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-05ASoC: rk3308_codec: remove useless HPF cut-off freqsXing Zheng
For compatibility, this patch remove some useless cut-off freqs for HPF. Change-Id: I143901adb49c3ac387f0eab8bde4c72f65b8309b Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-11-05ASoC: rk3308_codec: fix LINEOUT VCM POP dues to >0.9VXing Zheng
Isolate HPMIX and LINEOUT when disable DAC. Change-Id: I337b77a418a764cc4edb3fc0c3c4696db107cbb8 Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-11-05ASoC: rk3308_codec: fix and update codec driverXing Zheng
This patch fix some coding style, and update some processes for version B. Also, keep the coding compatible with version A and version B. Change-Id: I0d110ffaf18eac9b8b0218b979bc0b38ac1ff42e Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-11-05drivers/mfd: remove unused tlv320aic3xxx driverTao Huang
Change-Id: Iff5ded9be8f23566e9b04c8a34affd65f9099a74 Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-11-02ASoC: remove unused rk-rt5640 codecTao Huang
Change-Id: I7ceded247de4d7734eebc294542d3a59b70282cb Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-31ASoC: codecs: rockchip_rt5651_tc358749x: add HDMIIN widget for complete ↵Meiyou Chen
audio path Change-Id: I9750a05ffe242c5946389b2e90902f22cfdf18e8 Signed-off-by: Meiyou Chen <cmy@rock-chips.com>
2018-10-25ALSA: aloop: using raw cycles and jiffiesXing Zheng
The system tick may be modified by NTP when we connect with network, then jiffies have an offset compared to the local clock, it will cause the irq_pos / delta_play / delta_capt also be inaccurate. Therefore, we need a way to get raw jiffies which follows local raw clocks. Change-Id: I9be1790dfd98e430982dad6f03b04532889279a6 Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-10-23ASoC: rockchip: rk817-codec: fix mic_in_differential as loopback fail issueBinyuan Lan
Change-Id: I6e69ec61a380f7a0ffc234aafcfdfb8e38654461 Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-10-22ASoC: rockchip: pdm: adjust waterlevel in frame unitSugar Zhang
This patch make the waterlevel more reasonable, because the pdm controller share the single FIFO(128 entries) with each channel. adjust waterlevel in frame to meet the vad or dma frames request. Change-Id: I9b5808e55025347d435f47889f39ba34ac07ea1c Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-10-22ASoC: rockchip: vad: sort audio buffer data for rk1808Sugar Zhang
Change-Id: Id367202b6434a6dab07a0185392efc5a1e447990 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-10-20sound: enable interrupt after dma buffer initializationYu Zhao
[ Upstream commit b61749a89f826eb61fc59794d9e4697bd246eb61 ] In snd_hdac_bus_init_chip(), we enable interrupt before snd_hdac_bus_init_cmd_io() initializing dma buffers. If irq has been acquired and irq handler uses the dma buffer, kernel may crash when interrupt comes in. Fix the problem by postponing enabling irq after dma buffer initialization. And warn once on null dma buffer pointer during the initialization. Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Yu Zhao <yuzhao@google.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-20ASoC: sigmadsp: safeload should not have lower byte limitDanny Smith
[ Upstream commit 5ea752c6efdf5aa8a57aed816d453a8f479f1b0a ] Fixed range in safeload conditional to allow safeload to up to 20 bytes, without a lower limit. Signed-off-by: Danny Smith <dannys@axis.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>