aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-01-18ALSA: hrtimer: Fix stall by hrtimer_cancel()Takashi Iwai1-1/+2
hrtimer_cancel() waits for the completion from the callback, thus it must not be called inside the callback itself. This was already a problem in the past with ALSA hrtimer driver, and the early commit [fcfdebe70759: ALSA: hrtimer - Fix lock-up] tried to address it. However, the previous fix is still insufficient: it may still cause a lockup when the ALSA timer instance reprograms itself in its callback. Then it invokes the start function even in snd_timer_interrupt() that is called in hrtimer callback itself, results in a CPU stall. This is no hypothetical problem but actually triggered by syzkaller fuzzer. This patch tries to fix the issue again. Now we call hrtimer_try_to_cancel() at both start and stop functions so that it won't fall into a deadlock, yet giving some chance to cancel the queue if the functions have been called outside the callback. The proper hrtimer_cancel() is called in anyway at closing, so this should be enough. Reported-and-tested-by: Dmitry Vyukov <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-18ALSA: hda - Fix bass pin fixup for ASUS N550JXTakashi Iwai1-0/+1
ASUS N550JX (PCI SSID 1043:13df) requires the same fixup for a bass speaker output pin as other N550 models. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110001 Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-15ALSA: timer: Code cleanupTakashi Iwai1-17/+11
This is a minor code cleanup without any functional changes: - Kill keep_flag argument from _snd_timer_stop(), as all callers pass only it false. - Remove redundant NULL check in _snd_timer_stop(). Signed-off-by: Takashi Iwai <[email protected]>
2016-01-15ALSA: timer: Harden slave timer list handlingTakashi Iwai1-4/+14
A slave timer instance might be still accessible in a racy way while operating the master instance as it lacks of locking. Since the master operation is mostly protected with timer->lock, we should cope with it while changing the slave instance, too. Also, some linked lists (active_list and ack_list) of slave instances aren't unlinked immediately at stopping or closing, and this may lead to unexpected accesses. This patch tries to address these issues. It adds spin lock of timer->lock (either from master or slave, which is equivalent) in a few places. For avoiding a deadlock, we ensure that the global slave_active_lock is always locked at first before each timer lock. Also, ack and active_list of slave instances are properly unlinked at snd_timer_stop() and snd_timer_close(). Last but not least, remove the superfluous call of _snd_timer_stop() at removing slave links. This is a noop, and calling it may confuse readers wrt locking. Further cleanup will follow in a later patch. Actually we've got reports of use-after-free by syzkaller fuzzer, and this hopefully fixes these issues. Reported-by: Dmitry Vyukov <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-15ALSA: hda - Add fixup for Dell Latitidue E6540Takashi Iwai1-0/+1
Another Dell model, another fixup entry: Latitude E6540 needs the same fixup as other Latitude E series as workaround for noise problems. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=104341 Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-14ALSA: timer: Fix race among timer ioctlsTakashi Iwai1-13/+19
ALSA timer ioctls have an open race and this may lead to a use-after-free of timer instance object. A simplistic fix is to make each ioctl exclusive. We have already tread_sem for controlling the tread, and extend this as a global mutex to be applied to each ioctl. The downside is, of course, the worse concurrency. But these ioctls aren't to be parallel accessible, in anyway, so it should be fine to serialize there. Reported-by: Dmitry Vyukov <[email protected]> Tested-by: Dmitry Vyukov <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-14ALSA: hda - add codec support for Kabylake display audio codecLibin Yang1-1/+4
This patch adds codec ID (0x8086280b) for Kabylake display codec and apply the hsw fix-ups to Kabylake. Signed-off-by: Libin Yang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-13ALSA: timer: Fix double unlink of active_listTakashi Iwai1-1/+1
ALSA timer instance object has a couple of linked lists and they are unlinked unconditionally at snd_timer_stop(). Meanwhile snd_timer_interrupt() unlinks it, but it calls list_del() which leaves the element list itself unchanged. This ends up with unlinking twice, and it was caught by syzkaller fuzzer. The fix is to use list_del_init() variant properly there, too. Reported-by: Dmitry Vyukov <[email protected]> Tested-by: Dmitry Vyukov <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-13ALSA: usb-audio: Fix mixer ctl regression of Native Instrument devicesTakashi Iwai1-1/+1
The commit [da6d276957ea: ALSA: usb-audio: Add resume support for Native Instruments controls] brought a regression where the Native Instrument audio devices don't get the correct value at update due to the missing shift at writing. This patch addresses it. Fixes: da6d276957ea ('ALSA: usb-audio: Add resume support for Native Instruments controls') Reported-and-tested-by: Owen Williams <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-13ALSA: hda - fix the headset mic detection problem for a Dell laptopHui Wang1-0/+4
The machine uses codec alc255, and the pin configuration value for pin 0x14 on this machine is 0x90171130 which is not in the pin quirk table yet. Cc: [email protected] BugLink: https://bugs.launchpad.net/bugs/1533461 Signed-off-by: Hui Wang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-12ALSA: hda - Fix white noise on Dell Latitude E5550Takashi Iwai1-0/+1
Dell Latitude E5550 (1028:062c) has a white noise problem like other Latitude E models, and it gets fixed by the very same quirk as well. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110591 Cc: <[email protected]> # v4.1+ Signed-off-by: Takashi Iwai <[email protected]>
2016-01-12ALSA: hda_intel: add card number to irq descriptionHeiner Kallweit3-1/+5
Currently the info in /proc/interrupts doesn't allow to figure out which interrupt belongs to which card (HDMI, PCH, ..). Therefore add card details to the interrupt description. With the patch the info in /proc/interrupts looks like this: PCI-MSI 442368-edge snd_hda_intel:card1 PCI-MSI 49152-edge snd_hda_intel:card0 NOTE: this patch adds the new irq_descr field snd_card struct that is filled automatically at a card object creation. This can be used generically for other drivers as well. The changes for others will follow later -- tiwai Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-12ALSA: seq: Fix race at timer setup and closeTakashi Iwai1-0/+2
ALSA sequencer code has an open race between the timer setup ioctl and the close of the client. This was triggered by syzkaller fuzzer, and a use-after-free was caught there as a result. This patch papers over it by adding a proper queue->timer_mutex lock around the timer-related calls in the relevant code path. Reported-by: Dmitry Vyukov <[email protected]> Tested-by: Dmitry Vyukov <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-12ALSA: seq: Fix missing NULL check at remove_events ioctlTakashi Iwai1-1/+1
snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <[email protected]> Tested-by: Dmitry Vyukov <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-12ALSA: usb-audio: Avoid calling usb_autopm_put_interface() at disconnectTakashi Iwai1-0/+2
ALSA PCM may still have a leftover instance after disconnection and it delays its release. The problem is that the PCM close code path of USB-audio driver has a call of snd_usb_autosuspend(). This involves with the call of usb_autopm_put_interface() and it may lead to a kernel Oops due to the NULL object like: BUG: unable to handle kernel NULL pointer dereference at 0000000000000190 IP: [<ffffffff815ae7ef>] usb_autopm_put_interface+0xf/0x30 PGD 0 Call Trace: [<ffffffff8173bd94>] snd_usb_autosuspend+0x14/0x20 [<ffffffff817461bc>] snd_usb_pcm_close.isra.14+0x5c/0x90 [<ffffffff8174621f>] snd_usb_playback_close+0xf/0x20 [<ffffffff816ef58a>] snd_pcm_release_substream.part.36+0x3a/0x90 [<ffffffff816ef6b3>] snd_pcm_release+0xa3/0xb0 [<ffffffff816debb0>] snd_disconnect_release+0xd0/0xe0 [<ffffffff8114d417>] __fput+0x97/0x1d0 [<ffffffff8114d589>] ____fput+0x9/0x10 [<ffffffff8109e452>] task_work_run+0x72/0x90 [<ffffffff81088510>] do_exit+0x280/0xa80 [<ffffffff8108996a>] do_group_exit+0x3a/0xa0 [<ffffffff8109261f>] get_signal+0x1df/0x540 [<ffffffff81040903>] do_signal+0x23/0x620 [<ffffffff8114c128>] ? do_readv_writev+0x128/0x200 [<ffffffff810012e1>] prepare_exit_to_usermode+0x91/0xd0 [<ffffffff810013ba>] syscall_return_slowpath+0x9a/0x120 [<ffffffff817587cd>] ? __sys_recvmsg+0x5d/0x70 [<ffffffff810d2765>] ? ktime_get_ts64+0x45/0xe0 [<ffffffff8115dea0>] ? SyS_poll+0x60/0xf0 [<ffffffff818d2327>] int_ret_from_sys_call+0x25/0x8f We have already a check of disconnection in snd_usb_autoresume(), but the check is missing its counterpart. The fix is just to put the same check in snd_usb_autosuspend(), too. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109431 Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-11Merge tag 'asoc-v4.4-rc8' of ↵Takashi Iwai61-563/+7169
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Last updates for v4.5 A bunch more updates for v4.5, mainly driver work: - More topology API enhancements from Mengdong Lin working towards making everything more component based and being able to specify PCM links via topology. - Large sets driver updates from Cirrus, Intel (mainly more Skylake support) and Renesas. - New driver for AMD ACP - Rename PCM1792a driver to be generic pcm179x
2016-01-11Merge remote-tracking branch 'asoc/topic/wm8960' into asoc-nextMark Brown1-6/+18
2016-01-11Merge remote-tracking branch 'asoc/topic/rt5651' into asoc-nextMark Brown2-0/+72
2016-01-11Merge remote-tracking branches 'asoc/topic/rcar' and 'asoc/topic/rockchip' ↵Mark Brown3-16/+22
into asoc-next
2016-01-11Merge remote-tracking branches 'asoc/topic/fsl-asrc' and ↵Mark Brown3-1/+37
'asoc/topic/fsl-ssi' into asoc-next
2016-01-11Merge remote-tracking branches 'asoc/topic/da7218' and 'asoc/topic/da7219' ↵Mark Brown2-22/+99
into asoc-next
2016-01-11Merge remote-tracking branches 'asoc/topic/bcm2835' and 'asoc/topic/cleanup' ↵Mark Brown5-14/+10
into asoc-next
2016-01-11Merge remote-tracking branches 'asoc/topic/adsp' and 'asoc/topic/amd' into ↵Mark Brown14-0/+5503
asoc-next
2016-01-11Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown1-4/+26
2016-01-11Merge remote-tracking branch 'asoc/topic/pcm1792a' into asoc-nextMark Brown6-280/+280
2016-01-11Merge remote-tracking branch 'asoc/topic/pcm-list' into asoc-nextMark Brown3-106/+180
2016-01-11Merge remote-tracking branch 'asoc/topic/pcm' into asoc-nextMark Brown1-8/+20
2016-01-11Merge remote-tracking branch 'asoc/topic/arizona' into asoc-nextMark Brown2-6/+7
2016-01-11Merge tag 'asoc-v4.5' into asoc-nextMark Brown145-3223/+26491
ASoC: Updates for v4.5 This is quite a busy release on the driver front with a lot of new drivers being added but comparatively quiet on the core side with only one big change going in and that a fairly straightforward refactoring. - Conversion of the array of DAI links to a list by Mengdong Lin, supporting dynamically adding and removing DAI links. - Some more fixes for the topology code, though it is still not final and ready for enabling in production. We really need to get to the point where that can be done. - A pile of changes for Intel SkyLake drivers which hopefully deliver some useful initial functionality for systems with this chipset, though there is more work still to come. - New drivers for a number of Imagination Technologies IPs. - Lots of new features and cleanups for the Renesas drivers. - ANC support for WM5110. - New driver for Atmel class D speaker drivers. - New drivers for Cirrus CS47L24 and WM1831. - New driver for Dialog DA7128. - New drivers for Realtek RT5659 and RT56156. - New driver for Rockchip RK3036. - New driver for TI PC3168A # gpg: Signature made Wed 23 Dec 2015 00:42:40 GMT using RSA key ID 5D5487D0 # gpg: Good signature from "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0
2016-01-11Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown66-953/+4789
2016-01-11Merge remote-tracking branch 'asoc/fix/compress' into asoc-linusMark Brown1-3/+20
2016-01-11Merge remote-tracking branch 'asoc/fix/arizona' into asoc-linusMark Brown1-5/+3
2016-01-11Merge tag 'asoc-fix-v4.4-rc8' into asoc-linusMark Brown7-3/+18
ASoC: Last minute fixes for v4.4 A few final fixes for v4.4, the main one being the two patches to the new Sky Lake drivers which fix a previous incorrect fix that went in during an earlier -rc. # gpg: Signature made Wed 06 Jan 2016 17:12:57 GMT using RSA key ID 5D5487D0 # gpg: Good signature from "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0
2016-01-11ASoC: hdac_hdmi: remove unused hdac_hdmi_query_pin_connlistArnd Bergmann1-22/+0
A recent rework removed the only user of the hdac_hdmi_query_pin_connlist function, so we now get a warning when building the hdac_hdmi driver: hdac_hdmi.c:313:12: warning: 'hdac_hdmi_query_pin_connlist' defined but not used [-Wunused-function] This removes the function, which makes the file build cleanly again. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: 15b914476bf2 ("ASoC: hdac_hdmi: Use list to add pins and converters") Signed-off-by: Mark Brown <[email protected]>
2016-01-11ASoC: AMD: Add missing include fileGuenter Roeck1-0/+1
arm:allmodconfig, s390:allmodconfig, sparc64:allmodconfig, and probably other builds fail with sound/soc/amd/acp-pcm-dma.c:83:2: error: implicit declaration of function ‘readl’ sound/soc/amd/acp-pcm-dma.c:88:2: error: implicit declaration of function ‘writel’ Include linux/io.h explicitly to fix the problem. Fixes: 7c31335a03b6a ("ASoC: AMD: add AMD ASoC ACP 2.x DMA driver") Cc: Maruthi Srinivas Bayyavarapu <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-11ALSA: hda - Fixup inverted internal mic for Lenovo E50-80David Henningsson1-0/+8
Inform userspace that one channel of the internal mic has reversed polarity, so it does not attempt to add both channels together and end up with silence. Cc: [email protected] Reported-by: Andrzej Mendel <[email protected]> Alsa-info: http://www.alsa-project.org/db/?f=3088f82a0cf977855f92af9db8ad406c04f71efa BugLink: https://bugs.launchpad.net/bugs/1529624 Signed-off-by: David Henningsson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-11ALSA: usb: Add native DSD support for Oppo HA-1Jurgen Kramer1-0/+1
This patch adds native DSD support for the Oppo HA-1. It uses a XMOS chipset but they use their own vendor ID. Signed-off-by: Jurgen Kramer <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2016-01-10ASoC: Make aux_dev more like a generic componentMengdong Lin2-71/+83
aux_dev is mainly used by the machine driver to specify analog devices, which are registered as codecs. Making it more like a generic component can help the machine driver to use it to specify any component with topology info by name. Details: - Remove the stub 'rtd_aux' array from the soc card. - Add a list 'aux_comp_list' to store the components of aux_devs. And add a list head 'list_aux' to struct snd_soc_component, for adding such components to the above list. - Add a 'init' ops to a component for machine specific init. soc_bind_aux_dev() will set it to be aux_dev's init. And it will be called when probing the component. - soc_bind_aux_dev() will also search components by name of an aux_dev, since it may not be a codec. - Move probing of aux_devs before checking new DAI links brought by topology. - Move removal of aux_devs later than removal of links. Because topology of aux components may register DAIs and the DAI drivers will go with removal of the aux components, we want soc_remove_link_dais() to remove the DAIs at first. Signed-off-by: Mengdong Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: bcm2835: cleanup includes by ordering them alphabeticallyMartin Sperl1-6/+6
Cleanup of includes so that they are ordered alphabetically. Signed-off-by: Martin Sperl <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: AMD: Manage ACP 2.x SRAM banks powerMaruthi Srinivas Bayyavarapu1-7/+87
ACP SRAM banks gets turned on when ACP is powered on. Not all banks are used for playback/capture. So, power on required banks during audio device open and power off during audio device close. Signed-off-by: Maruthi Bayyavarapu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: AMD: add pm opsMaruthi Srinivas Bayyavarapu1-0/+48
genpd will power off/on ACP to manage runtime ACP PM. ACP runtime PM hooks are added to get it deinitialized and initialized respectively, after it is powered off/on. When system goes to suspend when audio usecase is active, ACP will be powered off through genpd. When it resumes, ACP needs to be initialized and reconfigured. Signed-off-by: Maruthi Bayyavarapu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: AMD: add AMD ASoC ACP 2.x DMA driverMaruthi Srinivas Bayyavarapu6-0/+1041
ACP IP has internal DMA controller with multiple channels which can be programmed in cyclic/non cyclic manner. ACP can generate interrupt upon completion of DMA transfer, if required. The PCM driver provides the platform DMA component to ALSA core. Signed-off-by: Maruthi Bayyavarapu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Murali Krishna Vemuri <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: AMD : add ACP 2.2 register headersMaruthi Srinivas Bayyavarapu3-0/+3969
These are register headers for the ACP (Audio CoProcessor) v2.2 Signed-off-by: Maruthi Bayyavarapu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: fsl_ssi: mark some registers preciousMaciej S. Szmigiero1-0/+16
Mark some registers precious since their reads have side effects (like clearing flags). Signed-off-by: Maciej S. Szmigiero <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: fsl_ssi: mark SACNT register volatileMaciej S. Szmigiero1-1/+7
SACNT register should be marked volatile since its WR and RD bits are cleared by SSI after completing the relevant operation. This unbreaks AC'97 register access. Fixes: 05cf237972fe ("ASoC: fsl_ssi: Add driver suspend and resume to support MEGA Fast") Signed-off-by: Maciej S. Szmigiero <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: Intel: Skylake: Add Resume capability in PCM info.Jeeja KP1-0/+1
This patch adds pcm capability to support Resume. Signed-off-by: Jeeja KP <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: Intel: Skylake: Reconfigure Link stream on suspend/resumeJeeja KP1-10/+12
On suspend the link register are lost so we need to reconfigure them in resume. This patch adds the reconfiguration of the link register in trigger resume. Signed-off-by: Jeeja KP <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: Intel: Skylake: Add DMA resume position in Trigger resume/suspendJeeja KP1-1/+19
Use the DMA resume capability to resume the DMA position when stream is suspended/resumed. In suspend we save the position and when stream is resumed the stream needs to be started from the position when the stream was suspended using the new DMA resume capabilities Signed-off-by: Jeeja KP <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: Intel: Skylake: enable interrupt as wake source in active suspendJeeja KP1-0/+4
In active suspend, any HDA interrupt should wake the system. When device enters active suspend, we need to enable HDA controller interrupt as wake source. Similarly disable HDA controller interrupt as wake source when exiting active suspend. Signed-off-by: Jeeja KP <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-10ASoC: Intel: Skylake: manage link power in active suspendVinod Koul1-0/+2
When device enters active suspend, we should turn off the links as they are not in use. Similarly we need to bring back links when we exit active suspend. Signed-off-by: Jayachandran B <[email protected]> Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>