summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2016-03-18ALSA: hda - Fix forgotten HDMI monitor_present updateTakashi Iwai
We forgot to copy monitor_present value when updating the ELD information. This won't change the ELD retrieval and the jack notification behavior, but appears only in the proc output. In that sense, it's no fatal error, but a bug is a bug is a bug. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-18ALSA: hda - Really restrict i915 notifier to HSW+Takashi Iwai
The commit [b62232d429fa: ALSA: hda - Limit i915 HDMI binding only for HSW and later] tried to limit the usage of i915 audio notifier to the recent Intel models and switch to the old method on pre-Haswell models. However, it assumed that the i915 component binding hasn't been done on such models, and the assumption was wrong: namely, Baytrail had already the i915 component binding due to powerwell control. Thus, the workaround wasn't applied to Baytrail. For fixing this properly, this patch introduces a new flag indicating the usage of audio notifier and codec_has_acomp() refers to this flag instead of checking the existence of audio component. Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: <stable@vger.kernel.org> # v4.5 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-17ALSA: hda - Fix mutex deadlock at HDMI/DP hotplugTakashi Iwai
The recent change in HD-audio HDMI/DP codec driver for allowing the dynamic PCM binding introduced a new spec->pcm_mutex. One of the protected area by this mutex is hdmi_present_sense(). As reported by Intel CI tests, unfortunately, the new mutex causes a deadlock when the hotplug/unplug is triggered during the codec is in runtime suspend. The buggy code path is like the following: hdmi_unsol_event() -> ... -> hdmi_present_sense() ==> ** here taking pcm_mutex -> hdmi_present_sense_via_verbs() -> snd_hda_power_up_pm() -> ... (runtime resume calls) -> generic_hdmi_resume() -> hdmi_present_sense() ==> ** here taking pcm_mutex again! As we can see here, the problem is that the mutex is taken before snd_hda_power_up_pm() call that triggers the runtime resume. That is, the obvious solution is to move the power up/down call outside the mutex; it is exactly what this patch provides. The patch also clarifies why this bug wasn't caught beforehand. We used to have the i915 audio component for hotplug for all Intel chips, and in that code path, there is no power up required but the information is taken directly from the graphics side. However, we recently switched back to the old method for some old Intel chips due to regressions, and now the deadlock issue is surfaced. Fixes: a76056f2e57e ('ALSA: hda - hdmi dynamically bind PCM to pin when monitor hotplug') Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-17ALSA: ctl: change return value in compatibility layer so that it's the same ↵Takashi Sakamoto
value in core implementation In control compatibility layer, when no elements are found by ELEM_READ/ELEM_WRITE ioctl commands, ENXIO is returned. On the other hand, in core implementation, ENOENT is returned. This is not good for ALSA ctl applications. This commit changes the return value from the compatibility layer so that the same value is returned. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-16ALSA: mixart: silence an uninitialized variable warningDan Carpenter
We could print the uninitialized value of "stat" in the error message. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-16ALSA: usb-audio: Add sanity checks for endpoint accessesTakashi Iwai
Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity of iface and altsetting index is checked as well. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-16ALSA: usb-audio: Minor code cleanup in create_fixed_stream_quirk()Takashi Iwai
Just a minor code cleanup: unify the error paths. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-16ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk()Takashi Iwai
create_fixed_stream_quirk() may cause a NULL-pointer dereference by accessing the non-existing endpoint when a USB device with a malformed USB descriptor is used. This patch avoids it simply by adding a sanity check of bNumEndpoints before the accesses. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-15ALSA: hda - Limit i915 HDMI binding only for HSW and laterTakashi Iwai
It turned out that the pre-HSW Intel chips are incompatible with the naive assumption we had -- the fixed mapping between the port and the HD-audio widget. This may result in the bad access, as captured by the recent patch to add a WARN_ON() for the port mapping check. As a quick workaround, disable the i915 audio component binding for all pre-Haswell models. Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: <stable@vger.kernel.org> # v4.5 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-15ALSA: hda - Fix unconditional GPIO toggle via automuteTakashi Iwai
Cirrus HD-audio driver may adjust GPIO pins for EAPD dynamically depending on the jack plug state. This works fine for the auto-mute mode where the speaker gets muted upon the HP jack plug. OTOH, when the auto-mute mode is off, this turns off the EAPD unexpectedly depending on the jack state, which results in the silent speaker output. This patch fixes the silent speaker output issue by setting GPIO bits constantly when the auto-mute mode is off. Reported-and-tested-by: moosotc@gmail.com Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-15ALSA: mixart: silence unitialized variable warningsDan Carpenter
We print can print the uninitialized memory on error. Which is an info leak, I suppose but it's basically harmless. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-14Merge tag 'asoc-v4.6' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.6 The main thing in terms of the core this time around has been some additional framework work for dynamic topologies (though we *still* don't appear to have a stable ABI for the topology code, it's probably worth considering if this will ever happen...). Otherwise the work has almost all been in the drivers: - HDMI support for Sky Lake, along with other fixes and enhancements for the Intel drivers. - Lots of improvements to the Renesas drivers. - Capture support for Qualcomm drivers. - Support for TI DaVinci DRA7xxx devices. - New machine drivers for Freescale systems with Cirrus CODECs, Mediatek systems with RT5650 CODECs. - New CPU drivers for Allwinner S/PDIF controllers - New CODEC drivers for Maxim MAX9867 and MAX98926 and Realtek RT5514.
2016-03-14ALSA: hda - Fixes double fault in nvhdmi_chmap_cea_alloc_validate_get_typeSubhransu S. Prusty
nvhdmi_chmap_cea_alloc_validate_get_type calls itself recursively using chmap ops causing the double fault. Fixed by adding the default validate_get_type handling inside nvdia validate_get_type handler. Link: https://bugzilla.kernel.org/show_bug.cgi?id=114311 Fixes: 67b90cb ("ALSA: hda - Create common chmap object") Reported-by: Andreas Reis <andreas.reis@gmail.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Tested-by: Andreas Reis <andreas.reis@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-14ALSA: intel8x0: Add clock quirk entry for AD1981B on IBM ThinkPad X41.Vittorio Gambaletta (VittGam)
The clock measurement on the AC'97 audio card found in the IBM ThinkPad X41 will often fail, so add a quirk entry to fix it. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=441087 Cc: <stable@vger.kernel.org> Signed-off-by: Vittorio Gambaletta <linuxbugs@vittgam.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-14ALSA: hda - Add new GPU codec ID 0x10de0082 to snd-hdaAaron Plattner
Vendor ID 0x10de0082 is used by a yet-to-be-named GPU chip. This chip also has the 2-ch audio swapping bug, so patch_nvhdmi is appropriate here. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-14Merge branch 'for-linus' into for-nextTakashi Iwai
2016-03-13Merge remote-tracking branches 'asoc/topic/sunxi', 'asoc/topic/topology' and ↵Mark Brown
'asoc/topic/wm8974' into asoc-next
2016-03-13Merge remote-tracking branches 'asoc/topic/rt5640', 'asoc/topic/rt5659', ↵Mark Brown
'asoc/topic/samsung' and 'asoc/topic/ssm4567' into asoc-next
2016-03-13Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/rockchip', ↵Mark Brown
'asoc/topic/rt298', 'asoc/topic/rt5514' and 'asoc/topic/rt5616' into asoc-next
2016-03-13Merge remote-tracking branches 'asoc/topic/pxa' and 'asoc/topic/qcom' into ↵Mark Brown
asoc-next
2016-03-13Merge remote-tracking branches 'asoc/topic/max98926', 'asoc/topic/mtk', ↵Mark Brown
'asoc/topic/mxs-saif', 'asoc/topic/nau8825' and 'asoc/topic/omap' into asoc-next
2016-03-13Merge remote-tracking branches 'asoc/topic/fsl-sai', 'asoc/topic/fsl-ssl', ↵Mark Brown
'asoc/topic/hdac' and 'asoc/topic/max9867' into asoc-next
2016-03-13Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/fsl-card' ↵Mark Brown
and 'asoc/topic/fsl-mpc5200' into asoc-next
2016-03-13Merge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/bcm2835' and ↵Mark Brown
'asoc/topic/cs42xx8' into asoc-next
2016-03-13Merge remote-tracking branches 'asoc/topic/ab8500', 'asoc/topic/adau17x1', ↵Mark Brown
'asoc/topic/ads117x', 'asoc/topic/adsp' and 'asoc/topic/arizona' into asoc-next
2016-03-13Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown
2016-03-13Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-nextMark Brown
2016-03-13Merge remote-tracking branch 'asoc/topic/pcm179x' into asoc-nextMark Brown
2016-03-13Merge remote-tracking branch 'asoc/topic/pcm' into asoc-nextMark Brown
2016-03-13Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown
2016-03-13Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown
2016-03-13Merge remote-tracking branch 'asoc/topic/core-pcm' into asoc-nextMark Brown
2016-03-13Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown
2016-03-13Merge tag 'asoc-fix-v4.5-rc6' into asoc-linusMark Brown
ASoC: Fixes for v4.5 This is far too big a set of fixes for this late in the release cycle but the overwhelming bulk is essentially the same simple fix from Takashi for a cut'n'pasted 64 bit cleanliness issue in the userspace interface where drivers were accessing things using the wrong element in a union which worked OK on 32 bit platforms as the correct element happened to be aligned the same way but with 64 bit platforms ABIs are different and the two members of the union are laid out in different places. They aren't all tagged to stable since some of these chips have vanishingly little chance of being used in 64 bit systems. The other changes are: - A fix for Qualcomm devices to work on big endian systems. The original change is actually correct but triggered a bug in regmap which is too invasive to fix for this cycle and can be worked around by just letting regmap pick the default. - A fix for the Samsung I2S driver locking which wasn't using IRQ safe spinlocks when it needed to. - A fix for the new Intel Sky Lake driver forgetting that C pointer arithmetic takes the type of the pointer into consideration. - A revert of a change to the FSL SSI driver that broke some systems. - A fix for the cleanup path of the wm9713 driver. - A fix for some incorrect register definitions in the ADAU17x1 driver that caused misclocking in some configurations. - A fix for the tracepoints for jack detection to avoid using an internal field of the core jack structure which is no longer present in all configurations. - A fix for another of the new Intel drivers which tried to write to a string literal. # gpg: Signature made Mon 07 Mar 2016 09:41:48 ICT using RSA key ID 5D5487D0 # gpg: key CD7BEEBC: no public key for trusted key - skipped # gpg: key CD7BEEBC marked as ultimately trusted # gpg: key AF88CD16: no public key for trusted key - skipped # gpg: key AF88CD16 marked as ultimately trusted # gpg: key 16005C11: no public key for trusted key - skipped # gpg: key 16005C11 marked as ultimately trusted # gpg: key 5621E907: no public key for trusted key - skipped # gpg: key 5621E907 marked as ultimately trusted # gpg: key 5C6153AD: no public key for trusted key - skipped # gpg: key 5C6153AD marked as ultimately trusted # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
2016-03-12ASoC: rsnd: add simplified module explanationKuninori Morimoto
Renesas sound driver user needs to read its datasheet when create DT. But it is difficult to understand, because it has many modules (SRC/CTU/MIX/DVC/SSIU/SSI/AudioDMAC/AudioDMACperiperi), and many features (Asynchronous/Synchronous mode on SRC, CTU matrix, DVC volume settings feature, Multi-SSI/TDM-SSI, etc). This patch adds simplified explanation to help setting/understanding. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: hdac_hdmi: Add broxton device IDJeeja KP
Broxton HDMI codec is similar to Skylake so add the device ID Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: Intel: Bxtn: Add Broxton PCI IDSenthilnathan Veppur
Broxton is an Intel SoC which sports a DSP and system is quite like Skylake. So add this ID in Skylake driver Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: Intel: Skylake: Move Skylake dsp ops & loader opsJeeja KP
The code loading for Skylake and other platforms is different, so add a dsp_ops and a loader_ops which can be defined for each platform. Move the dsp init, cleanup and loader ops (alloc and free dma) to these ops Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: Intel: add dmabuffer to common sst_dspJeeja KP
Broxton uses HDA DMA so needs to keep dmab in the driver context so add it Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: Intel: Skylake: Unstatify skl_dsp_enable_coreJayachandran B
The function skl_dsp_enable_core will be called by other parts of driver so this can no longer be a static function. Signed-off-by: Jayachandran B <jayachandran.b@intel.com> Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: Intel: Skylake: Fix whitepsace issuesVinod Koul
Some double whitespaces issues existed in driver, so fix them up. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: Intel: Skylake: Move module id definesVinod Koul
The module ID defines are common to other platforms so can be reused if moved to a common driver header so move it Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: omap-hdmi-audio: Support for DRA7xx familyPeter Ujfalusi
DRA7xx family is compatible with the OMAP5 HDMI. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: nau8825: fix issue that pop noise when start playbackJohn Hsu
Reduce pop noise in power up and down sequence when playback. The DAPM widgets graph is reconstructed to ensure the register write sequence at playback matches exactly to the v5 clickless sequence provided by Nuvoton. Signed-off-by: John Hsu <KCHSU0@nuvoton.com> Signed-off-by: Ben Zhang <benzh@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: qcom: fix build errorSudip Mukherjee
While building m32r allmodconfig the build failed with: ERROR: "bad_dma_ops" [sound/soc/qcom/snd-soc-lpass-platform.ko] undefined! ERROR: "dma_common_mmap" [sound/soc/qcom/snd-soc-lpass-platform.ko] undefined! To satisfy the dependency CONFIG_SND_SOC_LPASS_PLATFORM should depend on HAS_DMA. Some other configs also needs the dependency on HAS_DMA as they are directly or indirectly selecting SND_SOC_LPASS_PLATFORM. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: davinci: Kconfig: Update the edma-pcm section's dependency and helpPeter Ujfalusi
Instead of depending on individual SoCs make the edma-pcm depend on the eDMA dmaengine driver (TI_EDMA). Update the help text and add DRA7xx family since they have eDMA integrated as well along with sDMA. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: davinci-mcasp: dai format runtime reconfigurationPeter Ujfalusi
In case when the dai format is set via the dai_link the format configuration happens once when the links are probed. If the McASP lose context after this, the information will be lost and McASP will not going to work correctly. To overcome this issue, we save the fmt and set it within hw_params as well. Reported-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-11ALSA: hda - fix the mic mute button and led problem for a Lenovo AIOHui Wang
This Lenovo ThinkCentre AIO also uses Line2 as mic mute button and uses GPIO2 to control the mic mute led, so applying this quirk can make both the button and led work. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1555912 Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-11ASoC: wm_adsp: Use correct local length in error messageCharles Keepax
Fixes: 44029e9e1290 ("ASoC: wm_adsp: wm_coeff_{read|write}_control should use passed length") Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-10ALSA: pcm: Avoid "BUG:" string for warnings againTakashi Iwai
The commit [d507941beb1e: ALSA: pcm: Correct PCM BUG error message] made the warning prefix back to "BUG:" due to its previous wrong prefix. But a kernel message containing "BUG:" seems taken as an Oops message wrongly by some brain-dead daemons, and it annoys users in the end. Instead of teaching daemons, change the string again to a more reasonable one. Fixes: 507941beb1e ('ALSA: pcm: Correct PCM BUG error message') Cc: <stable@vger.kernel.org> # v3.19+ Signed-off-by: Takashi Iwai <tiwai@suse.de>