aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_analog.c
AgeCommit message (Collapse)Author
2014-06-18ALSA: hda/analog - Fix silent output on ASUS A8JNTakashi Iwai
commit 598e306184d26fa1d546334f2eb370b4d94a4ad3 upstream. ASUS A8JN with AD1986A codec seems following the normal EAPD in the normal order (0 = off, 1 = on) unlike other machines with AD1986A. Apply the workaround used for Toshiba laptop that showed the same problem. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=75041 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-05ALSA: hda - Use analog beep for Thinkpads with AD1984 codecsTakashi Iwai
For making the driver behavior compatible with the earlier kernels, use the analog beep in the loopback path instead of the digital beep. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-05ALSA: hda - Add missing loopback merge path for AD1884/1984 codecsTakashi Iwai
The mixer widget (NID 0x20) of AD1884 and AD1984 codecs isn't connected directly to the actual I/O paths but only via another mixer widget (NID 0x21). We need a similar fix as we did for AD1882. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-05ALSA: hda - Improve loopback path lookups for AD1983Takashi Iwai
AD1983 has flexible loopback routes and the generic parser would take wrong path confusingly instead of taking individual paths via NID 0x0c and 0x0d. For avoiding it, limit the connections at these widgets so that the parser can think more straightforwardly. This fixes the regression of the missing line-in loopback on Dell machine. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70011 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-05ALSA: hda - Add missing mixer widget for AD1983Takashi Iwai
The mixer widget on AD1983 at NID 0x0e was missing in the commit [f2f8be43c5c9: ALSA: hda - Add aamix NID to AD codecs]. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70011 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-04ALSA: hda - Fix silent output on Toshiba Satellite L40Takashi Iwai
Toshiba Satellite L40 with AD1986A codec requires the EAPD of NID 0x1b to be constantly on, otherwise the output doesn't work. Unlike most of other AD1986A machines, EAPD is correctly implemented in HD-audio manner (that is, bit set = amp on), so we need to clear the inv_eapd flag in the fixup, too. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=67481 Cc: <stable@vger.kernel.org> [v3.11+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-13ALSA: hda - Don't set indep_hp flag for old AD codecsTakashi Iwai
Some old AD codecs don't like the independent HP handling, either it contains a single DAC (AD1981) or it mandates the mixer routing (AD1986A). This patch removes the indep_hp flag for such codecs. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68081 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Correct AD1986A 3stack pin configsTakashi Iwai
The 3stack pin configs for AD1986A codec had incorrect values that resulted in broken mic and line-in. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-16Merge branch 'for-linus' into for-nextTakashi Iwai
2013-12-11ALSA: hda - Add static DAC/pin mapping for AD1986A codecTakashi Iwai
AD1986A codec is a pretty old codec and has really many hidden restrictions. One of such is that each DAC is dedicated to certain pin although there are possible connections. Currently, the generic parser tries to assign individual DACs as much as possible, and this lead to two bad situations: connections where the sound actually doesn't work, and connections conflicting other channels. We may fix this by trying to find the best connections more harder, but as of now, it's easier to give some hints for paired DAC/pin connections and honor them if available, since such a hint is needed only for specific codecs (right now only AD1986A, and there will be unlikely any others in future). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64971 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-09ALSA: hda - Enable stereo mix as default for AD and VIA codecsTakashi Iwai
AD and VIA codecs had stereo mixer input enabled as default before moving to the generic parser, and people think the lack of such a regression. In this patch, the stereo mixer input is added back to the input selection if no auto-mic is available, and if it's not disabled explicitly via hint. This should satisfy most of demands, i.e. stereo mix on desktop machines like what it worked before, and it still keeps the new auto-mic feature on laptops. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-02ALSA: hda - Use always amps for auto-mute on AD1986A codecTakashi Iwai
It seems that AD1986A cannot manage the dynamic pin on/off for auto-muting, but rather gets confused. Since each output has own amp, let's use it instead. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64971 Cc: <stable@vger.kernel.org> [v3.11+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-02ALSA: hda/analog - Handle inverted EAPD properly in vmaster hookTakashi Iwai
ad_vmaster_eapd_hook() needs to handle the inverted EAPD case properly, too. Otherwise the output gets broken on Lenovo N100 with AD1986A codec. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64971 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-02ALSA: hda - Fix bad EAPD setup for HP machines with AD1984ATakashi Iwai
It seems that EAPD on NID 0x16 is the only control over all outputs on HP machines with AD1984A while turning EAPD on NID 0x12 breaks the output. Thus we need to avoid fiddling EAPD on NID. As a quick workaround, just set own_eapd_ctrl flag for the wrong EAPD, then implement finer EAPD controls. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66321 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-13ALSA: hda - Control EAPD for Master volume on Lenovo N100Takashi Iwai
Similarly as other laptops with AD1981 & co codecs, we can control EAPD on AD1986A more safely depending on the Master switch, in order to save some power. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-13ALSA: hda - Don't turn off EAPD for headphone on Lenovo N100Takashi Iwai
The only EAPD on AD1986A is on NID 0x1b where usually the speaker. But this doesn't control only the speaker amp but may influence on all outputs, e.g. Lenovo N100 laptop seems to have this issue. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-26ALSA: hda - Sync EAPD with vmaster on AD1984A ThinkpadsTakashi Iwai
As EAPD on NID 0x12 (speaker pin) is used as the master amp on Thinkpads with AD1984A codec, we can hook this to vmaster for saving a bit more power at master mute state. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-26ALSA: hda - Fix silent headphone on Thinkpads with AD1984A codecTakashi Iwai
AD1984A codec has a couple of pins with EAPD controls, and the generic codec driver tries to turn each of them on/off depending on the pin active state. However, Thinkpads seem to use EAPD of the speaker pin as a master EAPD for controlling the mute of all outputs, including the headphone. This results in the dead headphone output via the headphone plugging because it mutes the speaker and turns off EAPD. The fix is to simply add spec->gen.keep_on_eapd flag. [This is a regression fix on 3.12 where we moved the AD codec parser to the generic parser. 3.11 and earlier didn't show this problem because still static quirks have been used.] Reported-and-tested-by: Vito Caputo <vcaputo@gnugeneration.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hda - Remove static quirks for AD1986A codecTakashi Iwai
Finally all the static quirks in patch_analog.c are reduced by this patch. As machines with AD1986A codec are all old and often their BIOS are buggy, we need to keep at least a few static pin conifgs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Drop a few other static quirks for AD1986ATakashi Iwai
Most of ASUS laptops and Lenovo N100 provide proper BIOS pin-configs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Drop static quirk for Toshiba Satellite L40-10QTakashi Iwai
The BIOS provides good pin-configurations, so we can drop the static quirk now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Drop static quirks for other AD1986A Samsung machinesTakashi Iwai
BIOS on Samsung R55, M55 and M50 provide the proper pin-configs, so we can remove the corresponding static quirk entries gracefully. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Convert static quirks for AD1986A Samsung laptopsTakashi Iwai
Just need to override some pin-configurations. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Convert the static quirk for Samsung Q1 UltraTakashi Iwai
... to a fixup entry. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Remove static quirks for AD1988 codecsTakashi Iwai
For removing static quirks for AD1988 variants, a new fixup defining the 6stack pinconfig has been added for the buggy BIOS. Other than that, we can cut off straightforwardly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Remove static quirks for AD1981 and AD1983 codecsTakashi Iwai
These are relatively easy ones, as we already converted all static quirks to the generic parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Remove static quirks for AD1884/1984 & variantsTakashi Iwai
Since the necessary device-specific fixups for Thinkpad and HP devices have been already ported, we can remove all static quirks for AD1884, AD1984, AD1884A and AD1984A codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Remove static quirks for AD1882Takashi Iwai
Now the generic parser can work stably enough, we can get rid of the static quirks. Let's start from AD1882. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Add fixup for HP TouchSmart with AD1984A codecTakashi Iwai
Ported from the static quirk. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Add fixup for Lenovo Thinkpad with AD1984 codecTakashi Iwai
Ported from the static quirk (model=thinkpad). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Add GPIO control to AD1884 HP fixupTakashi Iwai
The AD1884 HP laptop/mobile quirks control GPIO1 bit as the primary mute as well. Add the similar control to ad1884 fixup for auto parser, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Fix EAPD vmaster hook for AD1884 & coTakashi Iwai
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. Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18ALSA: hda - Move beep attach/detach calls in hda_generic.cTakashi Iwai
Instead of calling snd_hda_attach_beep_device() and snd_hda_detach_beep_device() in each codec driver, move them to the generic parser. The codec driver just needs to set spec->beep_nid for activating the digital beep. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23ALSA: hda - Fix missing path between aamix and outputs in AD codecsTakashi Iwai
AD1988 family and AD1882 codecs have another mixer widget (0x21) between the analog-loopback mixer widget (0x20) and the actual outputs. Due to this hole, the analog-loopbacks aren't sent properly to the output pins. As a band-aid fix, introduce another fields holding the aamix merge path, and activate it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22ALSA: hda - Select auto-parser as default for AD codecsTakashi Iwai
Now all AD codecs have the proper BIOS auto-parser, and we can make it for default, finally. (AD1988 already did it because it had the auto-parser.) Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22ALSA: hda - Convert some static quirks to fixup codes for AD codecsTakashi Iwai
Other remaining quirks are mostly resolvable via pincfg fixes, even if it matters. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22ALSA: hda - Rearrange for dropping static quirk codes in AD codec driverTakashi Iwai
As done for patch_conexant.c, put ifdef ENABLE_AD_STATIC_QUIRKS for preparing t odrop the static quirk codes in patch_analog.c. The whole static quirk code can be omitted by commenting out ENABLE_AD_STATIC_QUIRKS define now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22ALSA: hda - Add SPDIF mux control to AD codec auto-parserTakashi Iwai
AD codecs have strange implementations for choosing the SPDIF-output mux source: the digital audio out widget may take the sources from multiple connections, where 0x01 indicates it's a PCM while others point ADCs. It's obviously invalid in the HD-audio spec POV, but it's somehow convincing, too. And, to make things more complex, AD1988A and AD1882 have deeper connection routes that aren't expressed correctly. In this patch, the SPDIF mux control is implemented in two ways: - For easier one like AD1981, AD1983, AD1884 and AD1984, where the SPDIF audio out widget takes just two or three sources, we can simply implement via the normal input_mux and connection verb calls. - For the complex routes like AD1988A (but not AD1988B) or AD1882, we prepare "faked" paths represented statically, and switch the paths using these static ones, instead of parsing the routes from the widget tree. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22ALSA: hda - Add aamix NID to AD codecsTakashi Iwai
The aamix NIDs are also missing for AD codecs. All AD codecs seem to have a (more or less) working aamix widget. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21ALSA: hda - Remove superfluous header inclusionsTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18ALSA: hda - Fix missing unsol event handler in some codec driversTakashi Iwai
This resulted in non-working auto-mute behavior, of course... Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Add generic parser support to Analog Device codec driverTakashi Iwai
This patch adds the support for the generic auto-parser to AD codec driver. For AD1988, the old code is replaced simply with the new generic parser. For other codecs, new model "auto" is added and directed to use the generic parser. No fixup codes have been implemented yet as of now. Eventually we'd replace each static quirk with the generic parser + fixup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-10ALSA: hda - Remove snd_hda_codec_amp_update() call from patch_*.cTakashi Iwai
It's used only in one place in patch_analog.c, and it can be replaced with others better. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-28ALSA: hda - Call snd_array_init() early and only onceTakashi Iwai
This is a preliminary patch for introducing a protection to access races of snd_array instances. Call snd_array_init() appropriately at the initialization time and don't call it twice. Also the allocations of codec-spec structs are cleaned up by helper functions in patch_sigmatel.c and patch_analog.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-21ALSA: hda - Remove shutup calls in free callbacksTakashi Iwai
The free callback is called at the state where no extra verbs are executed, thus calling *_shutup() is useless, as it's checking the shutdown flag. Remove such superfluous calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-05ALSA: hda - Force to reset IEC958 status bits for AD codecsTakashi Iwai
Several bug reports suggest that the forcibly resetting IEC958 status bits is required for AD codecs to get the SPDIF output working properly after changing streams. Original fix credit to Javeed Shaikh. BugLink: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/359361 Reported-by: Robin Kreis <r.kreis@uni-bremen.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-19ALSA: hda - avoid non-standard "Docking" name in mixersDavid Henningsson
The standard name (and what PulseAudio picks up) is "Dock Mic", not "Docking Mic" or "Docking-Station". Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-30ALSA: hda - Clean up CONFIG_SND_HDA_POWER_SAVETakashi Iwai
CONFIG_SND_HDA_POWER_SAVE is no longer an experimental feature and its behavior can be well controlled via the default value and module parameter. Let's just replace it with the standard CONFIG_PM. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-15ALSA: hda - Add 3stack-automute model to AD1882 codecTakashi Iwai
Added a simple support of automute for the front HP jack to AD1882 stack model. Such an addition is basically an exception -- we really want to avoid the static quirk codes, but AD1882 parser isn't still ready for moving to the BIOS auto-parser yet. So, as a quick fix, I merged it for now. In near future, we really need the big clean up of patch_analog.c to move on to the auto-parser... Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-03ALSA: Convert to new pm_ops for PCI driversTakashi Iwai
Straightforward conversion to the new pm_ops from the legacy suspend/resume ops. Since we change vx222, vx_core and vxpocket have to be converted, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>