summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2018-01-12ASoC: 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>
2017-12-26ASoC: codecs: rk3328: add capture supportXinhuang Li
Change-Id: I275c50d9ba1faf15d8276c0415ac7a7aaff98b92 Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-12-20ASoC: Add support for cx20810 codecWenping Zhang
Change-Id: I659ab6c426304ca1ebb1b0469984d821c9fa276d Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-12-19ASoC: rockchip: pdm: change dma burst to 8Sugar Zhang
This patch is to avoid fifo xrun in some timing case. Change-Id: I511ebc4c443f1c3369fff1c4b4eb5faf145d5ae5 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-12-19ASoC: rockchip: i2s: change dma burst to 8Sugar Zhang
This patch is to avoid fifo xrun in some timing case. Change-Id: I0231030d054e4d3cb861dce8702898decc8ea0af Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-12-12ASoC: support ES8328 I2C driverChris Zhong
Change-Id: I7bc2d9a1796443dc61cf80498c1c016cea698a7a Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-12ASoC: es8328: Enabling support for 12Mhz sysclkChris Zhong
Change-Id: If9dea6039ab562023c81c2394c9286b7adc4a8c5 Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Remove some unused definesLars-Peter Clausen
The es8328 drivers seems to have used the wm8753 driver as a template. Its header file contains a few defines that are copied verbatim from the wm8753 header that do not really apply to this driver and are unused. So remove those defines. This seems safe as they deal with PLL and clock divider settings and the es8328 driver neither implements a set_pll() nor a set_clkdiv() callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 0f40132) Change-Id: I1c4c93dd3335678942c19693b0844d9152c7197b Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Enabling support for 192kRomain Perier
The master and slave modes don't share the same table for MCLK/LRCLK ratios. The slaves mode has bigger ratios that allow to use BCLK that matche sampling frequency of 192khz. This commit enables this rate only for slave mode, i.e it does not declare this frequency in sysclk_contraints, resulting to an error in master mode (not supported CLK). Signed-off-by: Romain Perier <romain.perier@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 404785f) Change-Id: I6bee5d4605a7612eac0a955c52bf80c500adbc5b Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Simplify rates definitionRomain Perier
Currently most of the standard rates are supported by this driver. Instead of defining each supported rate one by one, we use the SND macro SNDRV_PCM_RATE_8000_48000. Also adds support for 88.2khz as the codec supports it and the sys clocks are already supported. Signed-off-by: Romain Perier <romain.perier@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit c7ad841) Change-Id: I8b98cb6fc4aef7a3eb6e22310872668c2046ba46 Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Let device auto detect ratios in slave modeRomain Perier
In master mode, SCLK and LRCLK signals are generated by the CODEC when any of the ADC/DAC are enabled. SCLK is derived from MCLK via a programmable division set by BLK_DIV, LRCLK is derived from MCLK via another programmable division set by ADCFsRatio/DACFsRatio. In slave mode, SCLK and LRCLK signals are received as inputs and supplied externally. LRCLK and SCLK must be synchronously derived from MCLK with specific rates. The device can auto detect MCLK/LRCLK ratio according to a predefined table. LRCLK/SCLK ratio is usually 64 (SCLK = 64 * LRCLK) This commits adds support to let to device auto detect and decide which ratio to use. The mclkdiv2 and BCLK_DIV ratio and put to zero. Signed-off-by: Romain Perier <romain.perier@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit ae884ae) Change-Id: I195d5c3fc9f8b3032c5f0a1c767da696de22fb9b Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Add support for slave modeRomain Perier
Currently, the function that changes the DAI format only supports master mode. Trying to use a slave mode exits the function with -EINVAL and leave the codec misconfigured. This commits adds support for enabling the slave mode. Signed-off-by: Romain Perier <romain.perier@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit b9b044e) Change-Id: Iae229b7504df9567ca374a1e47555b45ba76dc5d Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: codec duplicated callback function goes to component on es8328Kuninori Morimoto
codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 87869e4) Change-Id: I6cb19b9a2febba1802872caf6883013aeb5e3504 Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Set symmetric ratesJohn Keeping
Although the ES8328 does support different rates for capture and playback, only very limited combinations are supported (8kHz and 48kHz or 8.0182kHz and 44.1kHz) with most rates required to be symmetric. Instead of adding a lot of complexity for little gain, let's enforce symmetric rates. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit ca0d879) Change-Id: If155a5d6efa318f03226862a26d519b804c10004 Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Support more sample ratesJohn Keeping
Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 45749c9) Change-Id: I16ba6fcffc583a11ede4c79332f280dd5acaa01d Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Support more sample formatsJohn Keeping
The values are the same for the DAC and ADC so remove the specific values and use values with shifts. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 779e86a) Change-Id: Ic3bbe56ae7aaa1c11112769646451ce593974352 Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Move sample size setup to hw_paramsJohn Keeping
This is a refactor in preparation for supporting more sample sizes which has no functional change. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 8865c95) Change-Id: I05c62052a573a5d24d8b91c385ef19b13ee56b49 Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Use single R/W for regmapJohn Keeping
The chip only supports single reads and writes. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit f2ed04a) Change-Id: Id70c848dfea948df11517bc6112c314878dcc9ca Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Fix ADC format setupJohn Keeping
The ADCCONTROL4 and DACCONTROL1 registers are similar but not identical, with the DACCONTROL1 having each field starting one bit higher than ADCCONTROL4. Instead of introducing a magic shift, add new constants for the values in ADCCONTROL4 and use a second variable to setup the ADC. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 57e41f3) Change-Id: I2e34c6671d38505700b987f34af53c4134702b75 Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-05UPSTREAM: ASoC: es8328: Move clock setup to hw_paramsJohn Keeping
This ensures that the clock is setup after its frequency has been set; the existing code in set_dai_fmt may be called before the clock rate has been set resulting in an incorrect configuration. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 420c470d) Change-Id: Ib963bd5cfb09da397afa90ac628af8b775da821c Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-12-01Merge 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: (510 commits) Linux 4.4.103 Revert "sctp: do not peel off an assoc from one netns to another one" xen: xenbus driver must not accept invalid transaction ids s390/kbuild: enable modversions for symbols exported from asm ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data btrfs: return the actual error value from from btrfs_uuid_tree_iterate ASoC: rsnd: don't double free kctrl netfilter: nf_tables: fix oob access netfilter: nft_queue: use raw_smp_processor_id() spi: SPI_FSL_DSPI should depend on HAS_DMA staging: iio: cdc: fix improper return value iio: light: fix improper return value mac80211: Suppress NEW_PEER_CANDIDATE event if no room mac80211: Remove invalid flag operations in mesh TSF synchronization drm: Apply range restriction after color adjustment when allocation ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBE ath10k: set CTS protection VDEV param only if VDEV is up ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats() ath10k: ignore configuring the incorrect board_id ath10k: fix incorrect txpower set by P2P_DEVICE interface ... Conflicts: drivers/media/v4l2-core/v4l2-ctrls.c kernel/sched/fair.c Change-Id: I48152b2a0ab1f9f07e1da7823119b94f9b9e1751
2017-11-30ASoC: wm_adsp: Don't overrun firmware file buffer when reading region dataRichard Fitzgerald
[ Upstream commit 1cab2a84f470e15ecc8e5143bfe9398c6e888032 ] Protect against corrupt firmware files by ensuring that the length we get for the data in a region actually lies within the available firmware file data buffer. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30ASoC: rsnd: don't double free kctrlColin Ian King
[ Upstream commit 0ea617a298dcdc2251b4e10f83ac3f3e627b66e3 ] On an error, snd_ctl_add already free's kctrl, so calling snd_ctl_free_one to free it again leads to a double free error. Fix this by removing the extraneous snd_ctl_free_one call. Issue found using static analysis with CoverityScan, CID 1372908 Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBEGabriele Mazzotta
[ Upstream commit 972aa2c708703c21f14eb958b37e82aae2530e44 ] Setting shutup when the action is HDA_FIXUP_ACT_PRE_PROBE might not have the desired effect since it could be overridden by another more generic shutup function. Prevent this by setting the more specific shutup function on HDA_FIXUP_ACT_PROBE. Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30ALSA: hda/realtek - Fix ALC700 family no sound issueKailang Yang
commit 2d7fe6185722b0817bb345f62ab06b76a7b26542 upstream. It maybe the typo for ALC700 support patch. To fix the bit value on this patch. Fixes: 6fbae35a3170 ("ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703") Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30ALSA: timer: Remove kernel warning at compat ioctl error pathsTakashi Iwai
commit 3d4e8303f2c747c8540a0a0126d0151514f6468b upstream. Some timer compat ioctls have NULL checks of timer instance with snd_BUG_ON() that bring up WARN_ON() when the debug option is set. Actually the condition can be met in the normal situation and it's confusing and bad to spew kernel warnings with stack trace there. Let's remove snd_BUG_ON() invocation and replace with the simple checks. Also, correct the error code to EBADFD to follow the native ioctl error handling. Reported-by: syzbot <syzkaller@googlegroups.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30ALSA: usb-audio: Add sanity checks in v2 clock parsersTakashi Iwai
commit 0a62d6c966956d77397c32836a5bbfe3af786fc1 upstream. The helper functions to parse and look for the clock source, selector and multiplier unit may return the descriptor with a too short length than required, while there is no sanity check in the caller side. Add some sanity checks in the parsers, at least, to guarantee the given descriptor size, for avoiding the potential crashes. Fixes: 79f920fbff56 ("ALSA: usb-audio: parse clock topology of UAC2 devices") Reported-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30ALSA: usb-audio: Fix potential out-of-bound access at parsing SUTakashi Iwai
commit f658f17b5e0e339935dca23e77e0f3cad591926b upstream. The usb-audio driver may trigger an out-of-bound access at parsing a malformed selector unit, as it checks the header length only after evaluating bNrInPins field, which can be already above the given length. Fix it by adding the length check beforehand. Fixes: 99fc86450c43 ("ALSA: usb-mixer: parse descriptors with structs") Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30ALSA: usb-audio: Add sanity checks to FE parserTakashi Iwai
commit d937cd6790a2bef2d07b500487646bd794c039bb upstream. When the usb-audio descriptor contains the malformed feature unit description with a too short length, the driver may access out-of-bounds. Add a sanity check of the header size at the beginning of parse_audio_feature_unit(). Fixes: 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0") Reported-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30ALSA: pcm: update tstamp only if audio_tstamp changedHenrik Eriksson
commit 20e3f985bb875fea4f86b04eba4b6cc29bfd6b71 upstream. commit 3179f6200188 ("ALSA: core: add .get_time_info") had a side effect of changing the behaviour of the PCM runtime tstamp. Prior to this change tstamp was not updated by snd_pcm_update_hw_ptr0() unless the hw_ptr had moved, after this change tstamp was always updated. For an application using alsa-lib, doing snd_pcm_readi() followed by snd_pcm_status() to estimate the age of the read samples by subtracting status->avail * [sample rate] from status->tstamp this change degraded the accuracy of the estimate on devices where the pcm hw does not provide a granular hw_ptr, e.g., devices using soc-generic-dmaengine-pcm.c and a dma-engine with residue_granularity DMA_RESIDUE_GRANULARITY_DESCRIPTOR. The accuracy of the estimate depended on the latency between the PCM hw completing a period and the driver called snd_pcm_period_elapsed() to notify ALSA core, typically determined by interrupt handling latency. After the change the accuracy of the estimate depended on the latency between the PCM hw completing a period and the application calling snd_pcm_status(), determined by the scheduling of the application process. The maximum error of the estimate is one period length in both cases, but the error average and variance is smaller when it depends on interrupt latency. Instead of always updating tstamp, update it only if audio_tstamp changed. Fixes: 3179f6200188 ("ALSA: core: add .get_time_info") Suggested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Henrik Eriksson <henrik.eriksson@axis.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30ALSA: hda: Add Raven PCI IDVijendar Mukunda
commit 9ceace3c9c18c67676e75141032a65a8e01f9a7a upstream. This commit adds PCI ID for Raven platform Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28ALSA: usb-audio: Add SNDRV_PCM_TRIGGER_SUSPEND/RESUME to trigger functionszain wang
Missing SNDRV_PCM_TRIGGER_SUSPEND/RESUME, usb-audio can not enter suspend since pcm was always running. Change-Id: I0f7be7345f2b5c1bd42dad4c6fc4647c8636eed8 Signed-off-by: zain wang <wzz@rock-chips.com>
2017-11-24ASoC: Add gva codec driverLi Dongqiang
Change-Id: Ifc1e49750e9b203681780b5400f9f1d7acf6afe4 Signed-off-by: Li Dongqiang <david.li@rock-chips.com>
2017-11-22ASoC: codecs: tc358749x: compatible with different power pin definitionsXinhuang Li
some boards do not define the power pin such as power18/power33 for tc358749x Change-Id: I36914dc005e465c290f71df2483d1969f6d101ef Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-21ALSA: hda/realtek - Add new codec ID ALC299Kailang Yang
[ Upstream commit 28f1f9b26cee161ddd3985b3eb78e3ffada08dda ] ALC299 was similar as ALC225. Add headset support for ALC299. ALC3271 was for Dell rename. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-21ALSA: vx: Fix possible transfer overflowTakashi Iwai
[ Upstream commit 874e1f6fad9a5184b67f4cee37c1335cd2cc5677 ] The pseudo DMA transfer codes in VX222 and VX-pocket driver have a slight bug where they check the buffer boundary wrongly, and may overflow. Also, the zero sample count might be handled badly for the playback (although it shouldn't happen in theory). This patch addresses these issues. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=141541 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-21ALSA: vx: Don't try to update capture stream before runningTakashi Iwai
[ Upstream commit ed3c177d960bb5881b945ca6f784868126bb90db ] The update of stream costs significantly, and we should avoid it unless the stream really has started. Check pipe->running flag instead of pipe->prepared. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-18ALSA: seq: Cancel pending autoload work at unbinding deviceTakashi Iwai
commit fc27fe7e8deef2f37cba3f2be2d52b6ca5eb9d57 upstream. ALSA sequencer core has a mechanism to load the enumerated devices automatically, and it's performed in an off-load work. This seems causing some race when a sequencer is removed while the pending autoload work is running. As syzkaller spotted, it may lead to some use-after-free: BUG: KASAN: use-after-free in snd_rawmidi_dev_seq_free+0x69/0x70 sound/core/rawmidi.c:1617 Write of size 8 at addr ffff88006c611d90 by task kworker/2:1/567 CPU: 2 PID: 567 Comm: kworker/2:1 Not tainted 4.13.0+ #29 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: events autoload_drivers Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x192/0x22c lib/dump_stack.c:52 print_address_description+0x78/0x280 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x230/0x340 mm/kasan/report.c:409 __asan_report_store8_noabort+0x1c/0x20 mm/kasan/report.c:435 snd_rawmidi_dev_seq_free+0x69/0x70 sound/core/rawmidi.c:1617 snd_seq_dev_release+0x4f/0x70 sound/core/seq_device.c:192 device_release+0x13f/0x210 drivers/base/core.c:814 kobject_cleanup lib/kobject.c:648 [inline] kobject_release lib/kobject.c:677 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put+0x145/0x240 lib/kobject.c:694 put_device+0x25/0x30 drivers/base/core.c:1799 klist_devices_put+0x36/0x40 drivers/base/bus.c:827 klist_next+0x264/0x4a0 lib/klist.c:403 next_device drivers/base/bus.c:270 [inline] bus_for_each_dev+0x17e/0x210 drivers/base/bus.c:312 autoload_drivers+0x3b/0x50 sound/core/seq_device.c:117 process_one_work+0x9fb/0x1570 kernel/workqueue.c:2097 worker_thread+0x1e4/0x1350 kernel/workqueue.c:2231 kthread+0x324/0x3f0 kernel/kthread.c:231 ret_from_fork+0x25/0x30 arch/x86/entry/entry_64.S:425 The fix is simply to assure canceling the autoload work at removing the device. Reported-by: Andrey Konovalov <andreyknvl@google.com> Tested-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-16ASoC: rk312x_codec: remove references to RK_GRF_VIRTTao Huang
Change-Id: I43f8ae6beee64a0feaa8a43a1cc3d0ef9e8d0635 Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-15ALSA: seq: Fix OSS sysex delivery in OSS emulationTakashi Iwai
commit 132d358b183ac6ad8b3fea32ad5e0663456d18d1 upstream. The SYSEX event delivery in OSS sequencer emulation assumed that the event is encoded in the variable-length data with the straight buffering. This was the normal behavior in the past, but during the development, the chained buffers were introduced for carrying more data, while the OSS code was left intact. As a result, when a SYSEX event with the chained buffer data is passed to OSS sequencer port, it may end up with the wrong memory access, as if it were having a too large buffer. This patch addresses the bug, by applying the buffer data expansion by the generic snd_seq_dump_var_event() helper function. Reported-by: syzbot <syzkaller@googlegroups.com> Reported-by: Mark Salyzyn <salyzyn@android.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-15ASoC: rockchip: add support for rk312x codecBinyuan Lan
Change-Id: Idb73b8999ed0fdc790e144ec18ad9a03b431311a Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2017-11-14UPSTREAM: ALSA: timer: Call notifier in the same spinlockTakashi Iwai
snd_timer_notify1() is called outside the spinlock and it retakes the lock after the unlock. This is rather racy, and it's safer to move snd_timer_notify() call inside the main spinlock. The patch also contains a slight refactoring / cleanup of the code. Now all start/stop/continue/pause look more symmetric and a bit better readable. Bug: 37240993 Change-Id: Ib90099f88c8b04928a8cdd2808cd9e16da6d519c Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Siqi Lin <siqilin@google.com>
2017-11-08ASoC: adau17x1: Workaround for noise bug in ADCRicard Wanderlof
commit 1e6f4fc06f6411adf98bbbe7fcd79442cd2b2a75 upstream. The ADC in the ADAU1361 (and possibly other Analog Devices codecs) exhibits a cyclic variation in the noise floor (in our test setup between -87 and -93 dB), a new value being attained within this range whenever a new capture stream is started. The cycle repeats after about 10 or 11 restarts. The workaround recommended by the manufacturer is to toggle the ADOSR bit in the Converter Control 0 register each time a new capture stream is started. I have verified that the patch fixes this problem on the ADAU1361, and according to the manufacturer toggling the bit in question in this manner will at least have no detrimental effect on other chips served by this driver. Signed-off-by: Ricard Wanderlof <ricardw@axis.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-08ALSA: seq: Fix nested rwsem annotation for lockdep splatTakashi Iwai
commit 1f20f9ff57ca23b9f5502fca85ce3977e8496cb1 upstream. syzkaller reported the lockdep splat due to the possible deadlock of grp->list_mutex of each sequencer client object. Actually this is rather a false-positive report due to the missing nested lock annotations. The sequencer client may deliver the event directly to another client which takes another own lock. For addressing this issue, this patch replaces the simple down_read() with down_read_nested(). As a lock subclass, the already existing "hop" can be re-used, which indicates the depth of the call. Reference: http://lkml.kernel.org/r/089e082686ac9b482e055c832617@google.com Reported-by: syzbot <bot+7feb8de6b4d6bf810cf098bef942cc387e79d0ad@syzkaller.appspotmail.com> Reported-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-08ALSA: timer: Add missing mutex lock for compat ioctlsTakashi Iwai
commit 79fb0518fec8c8b4ea7f1729f54f293724b3dbb0 upstream. The races among ioctl and other operations were protected by the commit af368027a49a ("ALSA: timer: Fix race among timer ioctls") and later fixes, but one code path was forgotten in the scenario: the 32bit compat ioctl. As syzkaller recently spotted, a very similar use-after-free may happen with the combination of compat ioctls. The fix is simply to apply the same ioctl_lock to the compat_ioctl callback, too. Fixes: af368027a49a ("ALSA: timer: Fix race among timer ioctls") Reference: http://lkml.kernel.org/r/089e082686ac9b482e055c832617@google.com Reported-by: syzbot <bot+e5f3c9783e7048a74233054febbe9f1bdf54b6da@syzkaller.appspotmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-03UPSTREAM: ASoC: es8328-i2c: Add compatible for ES8388Romain Perier
This commit adds a compatible string for everest,es8388. This is an audio codec that is compatible with es8328. Signed-off-by: Romain Perier <romain.perier@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 5f166156dbd4c0cf85632799ee7330d24deeec4e) Change-Id: I526239c3f4062849f2c96a610cf261f0f0de7aa4 Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-11-02Merge 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: (546 commits) Linux 4.4.93 x86/alternatives: Fix alt_max_short macro to really be a max() USB: serial: console: fix use-after-free after failed setup USB: serial: qcserial: add Dell DW5818, DW5819 USB: serial: option: add support for TP-Link LTE module USB: serial: cp210x: add support for ELV TFD500 USB: serial: ftdi_sio: add id for Cypress WICED dev board fix unbalanced page refcounting in bio_map_user_iov direct-io: Prevent NULL pointer access in submit_page_section usb: gadget: composite: Fix use-after-free in usb_composite_overwrite_options ALSA: line6: Fix leftover URB at error-path during probe ALSA: caiaq: Fix stray URB at probe error path ALSA: seq: Fix copy_from_user() call inside lock ALSA: seq: Fix use-after-free at creating a port ALSA: usb-audio: Kill stray URB at exiting iommu/amd: Finish TLB flush in amd_iommu_unmap() usb: renesas_usbhs: Fix DMAC sequence for receiving zero-length packet KVM: nVMX: fix guest CR4 loading when emulating L2 to L1 exit crypto: shash - Fix zero-length shash ahash digest crash HID: usbhid: fix out-of-bounds bug ... Conflicts: drivers/cpufreq/cpufreq-dt.c drivers/usb/dwc3/gadget.c Change-Id: I1a24ad0bba307b56b5ddf1fd7c4832ffb73ad12f
2017-11-02ALSA: hda - fix headset mic problem for Dell machines with alc236Hui Wang
commit f265788c336979090ac80b9ae173aa817c4fe40d upstream. We have several Dell laptops which use the codec alc236, the headset mic can't work on these machines. Following the commit 736f20a70, we add the pin cfg table to make the headset mic work. Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02ALSA: hda/realtek - Add support for ALC236/ALC3204Kailang Yang
commit 736f20a7060857ff569e9e9586ae6c1204a73e07 upstream. Add support for ALC236/ALC3204. Add headset mode support for ALC236/ALC3204. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02ASoC: Add driver for Voice Processor Codec FM1288ldq
Change-Id: I4d5fc9e4aff9a70f10ea27be1c21f4363608b5d3 Signed-off-by: Li Dongqiang <david.li@rock-chips.com>