summaryrefslogtreecommitdiff
path: root/sound/pci
AgeCommit message (Collapse)Author
2013-11-20ALSA: hda - hdmi: Fix reported channel map on common default layoutsAnssi Hannula
commit 56cac413dd6d43af8355f5d1f90a199b540f73fc upstream. hdmi_setup_fake_chmap() is supposed to set the reported channel map when the channel map is not specified by the user. However, the function indexes channel_allocations[] with a wrong value and extracts the wrong nibble from hdmi_channel_mapping[], causing wrong channel maps to be shown. Fix those issues. Tested on Intel HDMI to correctly generate various channel maps, for example 3,4,14,15,7,8,5,6 (instead of incorrect 3,4,8,7,5,6,14,0) for standard 7.1 channel audio. (Note that the side and rear channels are reported as RL/RR and RLC/RRC, respectively, as per the CEA-861 standard, instead of the more traditional SL/SR and RL/RR.) Note that this only fixes the layouts that only contain traditional 7.1 speakers (2.0, 2.1, 4.0, 5.1, 7.1, etc.). E.g. the rear center of 6.1 is still being shown wrongly due to an issue with from_cea_slot() which will be fixed in a later patch. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-13ALSA: hda - Add a fixup for ASUS N76VZTakashi Iwai
commit 6fc16e58adf50c0f1e4478538983fb5ff6f453d4 upstream. ASUS N76VZ needs the same fixup as N56VZ for supporting the boost speaker. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=846529 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-13ALSA: hda - Fix unbalanced runtime PM refcount after S3/S4Takashi Iwai
commit e6bbe666673ab044a3d39ddb74e4d9a401cf1d6f upstream. When a machine goes to S3/S4 after power-save is enabled, the runtime PM refcount might be incorrectly decreased because the power-down triggered soon after resume assumes that the controller was already powered up, and issues the pm_notify down. This patch fixes the incorrect pm_notify call simply by checking the current value properly. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-13ALSA: hda - Add missing initial vmaster hook at build_controls callbackTakashi Iwai
commit b63eae0a6c84839275a4638a7baa391be965cd0e upstream. The generic parser has a support of vmaster hook, but this is initialized only in the init callback with the check of the presence of the corresponding kctl. However, since kctl is NULL at the very first init callback that is called before build_controls callback, the vmaster hook sync is skipped there. Eventually this leads to the uninitialized state depending on the hook implementation. This patch adds a simple workaround, just calling the sync function explicitly at build_controls callback. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-04ALSA: hda - Fix inverted internal mic not indicated on some machinesDavid Henningsson
commit ccb041571b73888785ef7828a276e380125891a4 upstream. The create_bind_cap_vol_ctl does not create any control indicating that an inverted dmic is present. Therefore, create multiple capture volumes in this scenario, so we always have some indication that the internal mic is inverted. This happens on the Lenovo Ideapad U310 as well as the Lenovo Yoga 13 (both are based on the CX20590 codec), but the fix is generic and could be needed for other codecs/machines too. Thanks to Szymon Acedański for the pointer and a draft patch. BugLink: https://bugs.launchpad.net/bugs/1239392 BugLink: https://bugs.launchpad.net/bugs/1227491 Reported-by: Szymon Acedański <accek@mimuw.edu.pl> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-18ALSA: hda - Fix mono speakers and headset mic on Dell Vostro 5470David Henningsson
This is a backport for stable. The original commit SHA is 338cae565c53755de9f87d6a801517940d2d56f7. On this machine, DAC on node 0x03 seems to give mono output. Also, it needs additional patches for headset mic support. It supports CTIA style headsets only. Alsa-info available at the bug link below. BugLink: https://bugs.launchpad.net/bugs/1236228 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-18ALSA: hda - Fix microphone for Sony VAIO Pro 13 (Haswell model)David Henningsson
commit 88cfcf86aa3ada84d97195bcad74f4dadb4ae23b upstream. The external mic showed up with a precense detect of "always present", essentially disabling the internal mic. Therefore turn off presence detection for this pin. Note: The external mic seems not yet working, but an internal mic is certainly better than no mic at all. BugLink: https://bugs.launchpad.net/bugs/1227093 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-18ALSA: hda - Add fixup for ASUS N56VZTakashi Iwai
commit c6cc3d58b4042f5cadae653ff8d3df26af1a0169 upstream. ASUS N56VZ needs a fixup for the bass speaker pin, which was already provided via model=asus-mode4. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=841645 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-18ALSA: hda - hdmi: Fix channel map switch not taking effectAnssi Hannula
commit 39edac70e9aedf451fccaa851b273ace9fcca0bd upstream. Currently hdmi_setup_audio_infoframe() reprograms the HDA channel mapping only when the infoframe is not up-to-date or the non-PCM flag has changed. However, when just the channel map has been changed, the infoframe may still be up-to-date and non-PCM flag may not have changed, so the new channel map is not actually programmed into the HDA codec. Notably, this failing case is also always triggered when the device is already in a prepared state and a new channel map is configured while changing only the channel positions (for example, plain "speaker-test -c2 -m FR,FL"). Fix that by always programming the channel map in hdmi_setup_audio_infoframe(). Tested on Intel HDMI. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-13ALSA: hda - Fix GPIO for Acer Aspire 3830TGTakashi Iwai
commit 4a4370442c996be0fd08234a167c8a127c2488bb upstream. Acer Aspire 3830TG seems requiring GPIO bit 0 as the primary mute control. When a machine is booted after Windows 8, the GPIO pin is turned off and it results in the silent output. This patch adds the manual fixup of GPIO bit 0 for this model. Reported-by: Christopher <DIDI2002@web.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26ALSA: hda - Add Toshiba Satellite C870 to MSI blacklistTakashi Iwai
commit 83f72151352791836a1b9c1542614cc9bf71ac61 upstream. Toshiba Satellite C870 shows interrupt problems occasionally when certain mixer controls like "Mic Switch" is toggled. This seems worked around by not using MSI. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=833585 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26ALSA: hda - hdmi: Fallback to ALSA allocation when selecting CAAnssi Hannula
commit 18e391862cceaf43ddb8eb5cca05e1a83abdebaa upstream. hdmi_channel_allocation() tries to find a HDMI channel allocation that matches the number channels in the playback stream and contains only speakers that the HDMI sink has reported as available via EDID. If no such allocation is found, 0 (stereo audio) is used. Using CA 0 causes the audio causes the sink to discard everything except the first two channels (front left and front right). However, the sink may be capable of receiving more channels than it has speakers (and then perform downmix or discard the extra channels), in which case it is preferable to use a CA that contains extra channels than to use CA 0 which discards all the non-stereo channels. Additionally, it seems that HBR (HD) passthrough output does not work on Intel HDMI codecs when CA is set to 0 (possibly the codec zeroes channels not present in CA). This happens with all receivers that report a 5.1 speaker mask since a HBR stream is carried on 8 channels to the codec. Add a fallback in the CA selection so that the CA channel count at least matches the stream channel count, even if the stream contains channels not present in the sink speaker descriptor. Thanks to GrimGriefer at OpenELEC forums for discovering that changing the sink speaker mask allowed HBR output. Reported-by: GrimGriefer Reported-by: Ashecrow Reported-by: Frank Zafka <kafkaesque1978@gmail.com> Reported-by: Peter Frühberger <fritsch@xbmc.org> Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26ALSA: hda - Re-setup HDMI pin and audio infoframe on stream switchesTakashi Iwai
commit b054087dbacee30a9dddaef2c9a96312146be04e upstream. When the transcoder:port mapping on Haswell HDMI/DP audio is changed during the stream playback, the sound gets lost. Typically this problem is seen when the user switches the graphics mode from eDP+DP to DP-only configuration, where CRTC 1 is used for DP in the former while CRTC 0 is used for the latter. The graphics controller notifies the change via the normal ELD update procedure, so we get the intrinsic event. For enabling the sound again, the HDMI audio driver needs to reset the pin and set up the audio infoframe again. This patch achieves it by: - keep the current status of channels and info frame setup in per_pin struct, - check the reconnection in the intrinsic event handler, - reset the pin and the re-invoke hdmi_setup_audio_infoframe() accordingly. The hdmi_setup_audio_infoframe() function has been changed, too, so that it can be invoked without passing the substream instance. The patch is mostly based on the work by Mengdong Lin. Cc: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-07ALSA: hda - Add inverted digital mic fixup for Acer Aspire OneTakashi Iwai
commit d3d3835ce919438c00c5d1270d6f9d6ffea59d03 upstream. Yet another entry, just use the existing fixup for this machine, too. Reported-by: "Nathanael D. Noblet" <nathanael@gnat.ca> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-07ALSA: hda - Fix NULL dereference with CONFIG_SND_DYNAMIC_MINORS=nTakashi Iwai
commit 2ca320e294a738c9134a71b5029de05edbfc7aad upstream. Without the dynamic minor assignment, HDMI codec may have less PCM instances than the number of pins, which eventually leads to Oops. Reported-by: Stratos Karafotis <stratosk@semaphore.gr> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-20ALSA: hda - Add a fixup for Gateway LT27Takashi Iwai
commit 1801928e0f99d94c55e33c584c5eb2ff5e246ee6 upstream. Gateway LT27 needs a fixup for the inverted digital mic. Reported-by: "Nathanael D. Noblet" <nathanael@gnat.ca> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-20ALSA: hda - Add pinfix for LG LW25 laptopTakashi Iwai
commit db8a38e5063a4daf61252e65d47ab3495c705f4c upstream. Correct the pins for a line-in and a headphone on LG LW25 laptop with ALC880 codec. Other pins seem fine. Reported-and-tested-by: Joonas Saarinen <jonskunator@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-20ALSA: hda - Fix missing mute controls for CX5051Takashi Iwai
commit f69910ddbd8c29391958cf82b598dd78fe5c8640 upstream. We've added a fake mute control (setting the amp volume to zero) for CX5051 at commit [3868137e: ALSA: hda - Add a fake mute feature], but this feature was overlooked in the generic parser implementation. Now the driver lacks of mute controls on these codecs. The fix is just to check both AC_AMPCAP_MUTE and AC_AMPCAP_MIN_MUTE bits in each place checking the amp capabilities. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59001 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-11ALSA: hda - Fix missing fixup for Mac Mini with STAC9221Takashi Iwai
commit 697aebab78a88c6b164cfb74d19b86817d2ccd82 upstream. A fixup for Apple Mac Mini was lost during the adaption to the generic parser because the fallback for the generic ID 8384:7680 was dropped, and it resulted in the silence output (and maybe other problems). Unfortunately, just adding the missing subsystem ID wasn't enough, in this case. The subsystem ID of this machine is 0000:0100 (what Apple thought...?), and since snd_hda_pick_fixup() doesn't take the vendor id zero into account, the driver ignored this entry. Now it's fixed to regard the vendor id zero as a valid value. Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04ALSA: hda - Guess what, it's two more Dell headset mic quirksDavid Henningsson
commit cd6fb6793a33e2b02af6e05a8d3f735f7c88a943 upstream. Add two more machines that need quirks for headset mics to work. Tested-by: Shawn Wang <shawn.wang@canonical.com> BugLink: https://bugs.launchpad.net/bugs/1195636 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04ALSA: hda - Yet another Dell headset mic quirkDavid Henningsson
commit 6c29d68a82ec68db18241b818d03e7864c052be9 upstream. This quirk is needed for the headset mic to work on this Dell machine. BugLink: https://bugs.launchpad.net/bugs/1195597 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-28ALSA: hda - Fix EAPD GPIO control for Sigmatel codecsTakashi Iwai
commit 1ea9a69d1a36a5b62bf281ba8bb304fcac656dad upstream. The EAPD GPIO is dynamically turned on/off for some machines with Sigmatel codecs, but this didn't work as expected, and it resulted in spontaneous lost of speaker outputs per HP plugging or power-saving. This patch fixes the bug by simply including spec->eapd_mask into spec->gpio_mask and spec->gpio_data bits. Reported-and-tested-by: Eric Shattow <lucent@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-28ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n LaptopTakashi Iwai
commit f3e351eef3a7fd1e36a3e18d4f2f069b00deb23c upstream. The quirk for Dell laptops with STAC9228 overrides the pin default config of NID 0x0f to the value with AC_DEFCFG_MISC_NO_PRESENCE bit on. I'm not quite sure why this was done so, but can guess that this was introduced for avoiding this to be muted by another headphone plug. Now, after transition to the generic parser, this workaround rather causes a problem (notably as unexpected speaker mutes) because the pin is seen as if it's always plugged in. Since the generic parser can handle multiple headphone plugging gracefully, we can get rid of this override now. Reported-and-tested-by: Eric Shattow <lucent@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25ALSA: asihpi: Fix unlocked snd_pcm_stop() callTakashi Iwai
commit 60478295d6876619f8f47f6d1a5c25eaade69ee3 upstream. snd_pcm_stop() must be called in the PCM substream lock context. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25ALSA: atiixp: Fix unlocked snd_pcm_stop() callTakashi Iwai
commit cc7282b8d5abbd48c81d1465925d464d9e3eaa8f upstream. snd_pcm_stop() must be called in the PCM substream lock context. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25ALSA: hda - Add new GPU codec ID to snd-hdaAaron Plattner
commit d52392b1a80458c0510810789c7db4a39b88022a upstream. Vendor ID 0x10de0060 is used by a yet-to-be-named GPU chip. Reviewed-by: Andy Ritger <aritger@nvidia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25ALSA: hda - Fix the max length of control name in generic parserTakashi Iwai
commit 0c055b3413868227f2e85701c4e6938c9581f0e2 upstream. add_control_with_pfx() in hda_generic.c assumes a shorter name string for the control element, and this resulted in the truncation of the long but valid string like "Headphone Surround Switch" in the middle. This patch aligns the max size to the actual limit of snd_ctl_elem_id, 44. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25ALSA: hda - Fix missing Mic Boost controls for VIA codecsTakashi Iwai
commit d045c5dc43d829df9f067d363c3b42b14dacf434 upstream. Some VIA codecs like VT1708S have Mic boost amps in the mic pins but they aren't exposed in the capability bits. In the past driver code, we override the pin caps and create mic boost controls forcibly. While transition to the generic parser, we lost the mic boost controls although the pin caps are still overridden, because the generic parser code checks the widget caps, too. So this patch adds a new helper function to allow the override of the given widget capability bits, and makes VIA codecs driver to add the missing input-amp capability bit. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59861 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25ALSA: hda - Cache the MUX selection for generic HDMITakashi Iwai
commit bddee96b5d0db869f47b195fe48c614ca824203c upstream. When a selection to a converter MUX is changed in hdmi_pcm_open(), it should be cached so that the given connection can be restored properly at PM resume. We need just to replace the corresponding snd_hda_codec_write() call with snd_hda_codec_write_cache(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25ALSA: hda - Fix return value of snd_hda_check_power_state()Takashi Iwai
commit 06ec56d3c60238f27bfa50d245592fccc1b4ef0f upstream. The refactoring by commit 9040d102 introduced the new function snd_hda_check_power_state(). This function is supposed to return true if the state already reached to the target state, but it actually returns false for that. An utterly stupid typo while copy & paste. Fortunately this didn't influence on much behavior because powering up AFG usually powers up the child widgets, too. But the finer power control must have been broken by this bug. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25ALSA: hda - Fix EAPD vmaster hook for AD1884 & coTakashi Iwai
commit 8f0b3b7e222383a21f7d58bd97d5552b3a5dbced upstream. ad1884_fixup_hp_eapd() tries to set the NID for controlling the speaker EAPD from the pin configuration. But the current code can't work expectedly since it sets spec->eapd_nid before calling the generic parser where the autocfg pins are set up. This patch changes the function to set spec->eapd_nid after the generic parser call while it sets vmaster hook unconditionally. The spec->eapd_nid check is moved in the hook function itself instead. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17ALSA: hda - Add models for Dell headset jacksDavid Henningsson
These headset jacks keep coming in on more and more platforms, and it's possible I don't catch them all. Make it easier to test and verify by making models. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-17ALSA: hda - Fix pin configurations for MacBook Air 4,2Takashi Iwai
MacBook Air 4,2 requires the whole default pin configuration table to be overridden by the driver, as usual, as Apple's machines don't set up properly after boot. Otherwise mic won't work, and other ill effect may happen. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59381 Reported-and-tested-by: Peter John Hartman <peterjohnhartman@gmail.com> Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-17ALSA: hda - Headset mic support for three more machinesDavid Henningsson
They need these quirks to have headset mic support. BugLink: https://bugs.launchpad.net/bugs/1189363 Tested-by: Shawn Wang <shawn.wang@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03ALSA: hda/via - Clean up duplicated codesTakashi Iwai
The previous commit was written in the way to make the backport to 3.9.y easier, and left the duplicated open codes intentionally. Now let's clean up the duplicated codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03ALSA: hda/via - Fix wrongly cleared pins after suspend on VT1802Takashi Iwai
VIA driver has a special suspend handling only for VT1802 to reduce the pop noise. During the transition to the generic parser, the behavior of snd_hda_set_pin_ctl() was also changed to modify the cached values, too. And this caused a regression where the pin is still cleared even after the resume (including the resume from power save), resulting in the silent output. The fix is simply to replace snd_hda_set_pin_ctl() with the explicit call of snd_hda_codec_write() again. Reported-by: Alex Riesen <raa.lkml@gmail.com> Cc: <stable@vger.kernel.org> [v3.9] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03ALSA: hda - Add keep_eapd_on flag to generic parserTakashi Iwai
VT1802 codec seems to reset EAPD of other pins in the hardware level, and this was another reason of the silent headphone output on some machines. As a workaround, introduce a new flag indicating to keep the EPAD on to the generic parser, and set it in patch_via.c. Reported-by: Alex Riesen <raa.lkml@gmail.com> Cc: <stable@vger.kernel.org> [v3.9] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03ALSA: hda - Allow setting automute/automic hooks after parsingTakashi Iwai
Some codec drivers (VIA codecs and some Realtek fixups) set the automute and automic hooks after calling snd_hda_gen_parse_auto_config(). In the current code, the hook pointers are referred only in snd_hda_gen_parse_auto_config() and passed to snd_hda_jack_detect_enable_callback(), thus changing the hook values won't change the actually called callbacks properly. This patch fixes this bug by setting the static functions as the primary callback functions for the jack detection, and let them calling the appropriate hooks dynamically. Cc: <stable@vger.kernel.org> [v3.9] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03ALSA: hda/via - Disable broken dynamic power controlTakashi Iwai
Since the transition to the generic parser, the actual routes used there don't match always with the assumed static paths in some set_widgets_power_state callbacks. This results in the wrong power setup in the end. As a temporary workaround, we need to disable the calls together with the non-functional dynamic power control enum. Reported-by: Alex Riesen <raa.lkml@gmail.com> Cc: <stable@vger.kernel.org> [v3.9] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-31ALSA: hda - Add headset quirk for two Dell machinesDavid Henningsson
This quirk is required for the headset mic to work on these two machines. BugLink: https://bugs.launchpad.net/bugs/1186170 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-31ALSA: hda - add dock support for Thinkpad T431sEbben Aries
Add a model/fixup string "lenovo-dock", for Thinkpad T431s, to allow sound in docking station. Tested on Lenovo T431s with ThinkPad Mini Dock Plus Series 3 Signed-off-by: Ebben Aries <earies@dscp.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-31ALSA: sis7019: fix error return code in sis_chip_create()Wei Yongjun
Fix to return a negative error code in the pci_set_dma_mask() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-16ALSA: hda - Add headset mic support for another Dell machineDavid Henningsson
BugLink: https://bugs.launchpad.net/bugs/1180351 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-16ALSA: hda - Check the activity of the NID to be powered downTakashi Iwai
When an inactive path is powered down with spec->power_down_unused flag, we should check the activity of each widget in the path whether it's still referred from any active path. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-10Merge tag 'sound-3.10' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This contains small fixes since the previous pull request: - A few regression fixes and small updates of HD-audio - Yet another fix for Haswell HDMI audio - A copule of trivial fixes in ASoC McASP, DPAM and WM8994" * tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: Revert "ALSA: hda - Don't set up active streams twice" ALSA: Add comment for control TLV API ALSA: hda - Apply pin-enablement workaround to all Haswell HDMI codecs ALSA: HDA: Fix Oops caused by dereference NULL pointer ALSA: mips/sgio2audio: Remove redundant platform_set_drvdata() ALSA: mips/hal2: Remove redundant platform_set_drvdata() ALSA: hda - Fix 3.9 regression of EAPD init on Conexant codecs sound: Fix make allmodconfig on MIPS ALSA: hda - Fix system panic when DMA > 40 bits for Nvidia audio controllers ALSA: atmel: Remove redundant platform_set_drvdata() ASoC: McASP: Fix receive clock polarity in DAIFMT_NB_NF mode. ASoC: wm8994: missing break in wm8994_aif3_hw_params() ASoC: McASP: Add pins output direction for rx clocks when configured in CBS_CFS format ASoC: dapm: use clk_prepare_enable and clk_disable_unprepare
2013-05-10Revert "ALSA: hda - Don't set up active streams twice"Takashi Iwai
This reverts commit affdb62b815b38261f09f9d4ec210a35c7ffb1f3. The commit introduced a regression with AD codecs where the stream is always clean up. Since the patch is just a minor optimization and reverting the commit fixes the issue, let's just revert it. Reported-and-tested-by: Michael Burian <michael.burian@sbg.at> Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-08ALSA: hda - Apply pin-enablement workaround to all Haswell HDMI codecsTakashi Iwai
This is a revised patch based on Mengdong Lin's fix patch, which is a supplement to a previous patch [1611a9c9: ALSA: hda - Add fixup for Haswell to enable all pin and convertor widgets]. Some Haswell BIOS will disable the 2nd and 3rd pin/covertor widgets when the HD-A controller changes state from D3 to D0. So when the controller resumes after a system or runtime suspend, these widgets are disabled and programming these widgets to D0 will cause H/W error and codec will not respond. In addition, we found out that some BIOS disables the pins at S3 although it shows up at boot. This confuses the driver utterly, and the hardware falls into the fatal communication error like the above. So in this patch, we apply intel_haswell_enable_all_pins() not only as a fixup to a certain device (with 8086:2010) but to all Haswell machines. The codec driver basically assumes that all pins are exposed, so it's anyway better to see them from the beginning. Even if all pins and converters are shown by this call, there should be no regression in practice: the pin default configurations are still kept, thus the disabled pins are handled as disabled by the driver properly. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-07ALSA: HDA: Fix Oops caused by dereference NULL pointerWang YanQing
The interrupt handler azx_interrupt will call azx_update_rirb, which may call snd_hda_queue_unsol_event, snd_hda_queue_unsol_event will dereference chip->bus pointer. The problem is we alloc chip->bus in azx_codec_create which will be called after we enable IRQ and enable unsolicited event in azx_probe. This will cause Oops due dereference NULL pointer. I meet it, good luck:) [Rearranged the NULL check before the tracepoint and added another NULL check of bus->workq -- tiwai] Signed-off-by: Wang YanQing <udknight@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-04ALSA: hda - Fix 3.9 regression of EAPD init on Conexant codecsTakashi Iwai
The older Conexant codecs have up to two EAPDs and these are supposed to be rather statically turned on. The new generic parser code assumes the dynamic on/off per path usage, thus it resulted in the silent output on some machines. This patch fixes the problem by simply assuming the static EAPD on for such old Conexant codecs as we did until 3.8 kernel. Reported-and-tested-by: Christopher K. <c.krooss@gmail.com> Cc: <stable@vger.kernel.org> [v3.9] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-03Merge tag 'sound-3.10' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "Mostly many small changes spread as seen in diffstat in sound/* directory by this update. A significant change in the subsystem level is the introduction of snd_soc_component, which will help more generic handling of SoC and off-SoC components. Also, snd_BUG_ON() macro is enabled unconditionally now due to its misuses, so people might hit kernel warnings (it's a good thing for us). - compress-offload: support for capture by Charles Keepax - HD-audio: codec delay support by Dylan Reid - HD-audio: improvements/fixes in generic parser: better headphone mic and headset mic support, jack_modes hint consolidation, proper beep attach/detachment, generalized power filter controls by David Henningsson, et al - HD-audio: Improved management of HDMI codec pins/converters - HD-audio: Better pin/DAC assignment for VIA codecs - HD-audio: Haswell HDMI workarounds - HD-audio: ALC268 codec support, a few new quirks for Chromebooks - USB: regression fixes: USB-MIDI autopm fix, the recent ISO latency fix by Clemens Ladisch - USB: support for DSD formats by Daniel Mack - USB: A few UAC2 device endian/cock fixes by Eldad Zack - USB: quirks for Emu 192kHz support, Novation Twitch DJ controller, Yamaha THRxx devices - HDSPM: updates for TCO controls by Adrian Knoth - ASoC: Add a snd_soc_component object type for generic handling of SoC and off-SoC components by Kuninori Morimoto, - dmaengine: a large set of cleanups and conversions by Lars-Peter Clausen - ASoC DAPM: performance optimizations from Ryo Tsutsui - ASoC DAPM: support for mixer control sharing by Stephen Warren - ASoC: multiplatform ARM cleanups from Arnd Bergmann - ASoC: new codec drivers for AK5385 and TAS5086 from Daniel Mack" * tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (315 commits) ALSA: usb-audio: caiaq: fix endianness bug in snd_usb_caiaq_maschine_dispatch ALSA: asihpi: add format support check in snd_card_asihpi_capture_formats ALSA: pcm_format_to_bits strong-typed conversion ALSA: compress: fix the states to check for allowing read ALSA: hda - Move Thinkpad X220 to use auto parser ALSA: USB: adjust for changed 3.8 USB API ALSA: usb - Avoid unnecessary sample rate changes on USB 2.0 clock sources sound: oss/dmabuf: use dma_map_single ALSA: ali5451: use mdelay instead of large udelay constants ALSA: hda - Add the support for ALC286 codec ALSA: usb-audio: USB quirk for Yamaha THR10C ALSA: usb-audio: USB quirk for Yamaha THR5A ALSA: usb-audio: USB quirk for Yamaha THR10 ALSA: usb-audio: Fix autopm error during probing ALSA: snd-usb: try harder to find USB_DT_CS_ENDPOINT ALSA: sound kconfig typo ALSA: emu10k1: Fix dock firmware loading ASoC: ux500: forward declare msp_i2s_platform_data ASoC: davinci-mcasp: Add Support BCLK-to-LRCLK ratio for TDM modes ASoC: davinci-pcm, davinci-mcasp: Clean up active_serializers ...