aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_analog.c
AgeCommit message (Collapse)AuthorFilesLines
12 daysALSA: hda: analog: Reduce CONFIG_PM dependenciesTakashi Iwai1-4/+0
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio analog codec driver, too. Simply drop CONFIG_PM ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-5-tiwai@suse.de
2021-08-18ALSA: hda/analog - Sink ad198x_shutup() and shuffle CONFIG_PM guardsNathan Chancellor1-8/+2
When CONFIG_PM is not set, there is an unused function warning: sound/pci/hda/patch_analog.c:115:13: warning: unused function 'ad198x_shutup' [-Wunused-function] static void ad198x_shutup(struct hda_codec *codec) ^ 1 warning generated. Sink ad198x_shutup() into ad198x_suspend(), as it is only called in that one space. Move the CONFIG_PM guards above ad198x_power_eapd_write() as it is only called in ad198x_power_eapd(), which is in turn only called in ad198x_power_eapd(). Those two functions are large enough that they are left alone. Fixes: 327b34f2a97d ("ALSA: hda: Nuke unused reboot_notify callback") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20210818012705.311963-2-nathan@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-08-14ALSA: hda: Nuke unused reboot_notify callbackTakashi Iwai1-1/+0
As reboot_notify callback is no longer used by the codec core, let's get rid of the unused code. Conexant codec needs a slight code change as it used to call the reboot_notify at the codec removal, too. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045 Link: https://lore.kernel.org/r/20210813081230.4268-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-16ALSA: hda/analog - Minor optimization for SPDIF mux connectionsTakashi Iwai1-5/+9
AD HD-audio codec driver has a few code lines invoking snd_get_num_conns() and using its return value as the array index without checking. This is basically safe in all those places; at the second and later calls snd_get_num_conns() returns the value cached from the first invocation, hence the value is always consistent. However, it looks a bit confusing as if a lack of the proper check. This patch introduces a new field num_smux_conns in ad198x_spec for simplifying the code. Now we store and refer to the value more locally without invoking the extra function at each time. Reported-by: Colin King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200115100035.22511-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-05ALSA: hda: More constificationsTakashi Iwai1-1/+1
Apply const prefix to the remaining possible places: the string tables, the rate tables, the verb tables, the index tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-10-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-03ALSA: hda - constify and cleanup static NodeID tablesMichał Mirosław1-3/+3
Make hda_nid_t tables static const, as they are not intended to be modified by callees. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lore.kernel.org/r/5150c94101c9534f4c8e987324f6912c16d459f6.1578043216.git.mirq-linux@rere.qmqm.pl Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-09-20ALSA: hda - Add laptop imic fixup for ASUS M9V laptopShih-Yuan Lee (FourDollars)1-0/+1
The same fixup to enable laptop imic is needed for ASUS M9V with AD1986A codec like another HP machine. Signed-off-by: Shih-Yuan Lee (FourDollars) <fourdollars@debian.org> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20190920134052.GA8035@localhost Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-05-24treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 32Thomas Gleixner1-14/+1
Based on 1 normalized pattern(s): this driver is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this driver is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 18 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520170857.186505395@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-30ALSA: hda: move hda_codec.h to include/soundPierre-Louis Bossart1-1/+1
As suggested by Takashi, move this header file to make it easier to include from e.g. the Intel Skylake driver in follow-up patches Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-27ALSA: hda - Kill snd_hda_codec_update_cache()Takashi Iwai1-2/+2
snd_hda_codec_update_cache() used to serve for a slightly different purpose from snd_hdac_write_cache(), but now both of them became identical. Let's unify and replace with the latter one consistently. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-16ALSA: hda: make snd_kcontrol_new constBhumika Goyal1-2/+2
Make these const as they are only passed as the 3rd argument to the function snd_hda_gen_add_kctl, which is of type const. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-20ALSA: hda - convert to hda_device_idTakashi Iwai1-19/+18
Finally we have a proper infrastructure to generate the modaliases automatically, let's move to hda_device_id from the legacy hda_codec_preset that contains basically the same information. The patch function hook is stored in driver_data field, which is long, and we need an explicit cast. Other than that, the conversion is mostly straightforward. Each entry is even simplified using a macro, and the lengthy (and error-prone) manual modaliases got removed. As a result, we achieved a quite good diet: 14 files changed, 407 insertions(+), 595 deletions(-) Reviewed-by: Vinod Koul <vinod.koul@intel.com> Tested-by: Subhransu S Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-29ALSA: hda - Set patch_ops before calling auto-parserTakashi Iwai1-2/+1
... so that the parser code can overwrite some optional ops. For Realtek and others, it can be set solely in the spec allocator, so it results in a good code cleanup, too. With this change, we can finally remove the local stream_pm setup and rely on the generic parser's automatic setting. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-23ALSA: hda - Use regmap for command verb caches, tooTakashi Iwai1-10/+6
Like the previous patches, this patch converts also to the regmap, at this time, the cached verb writes are the target. But this conversion needs a bit more caution than before. - In the old code, we just record any verbs as is, and restore them at resume. For the regmap scheme, this doesn't work, since a few verbs like AMP or DIGI_CONVERT are asymmetrical. Such verbs are converted either to the dedicated function (snd_hda_regmap_xxx_amp()) or changed to the unified verb. - Some verbs have to be declared as vendor-specific ones before accessing via regmap. Also, the minor optimization with codec->cached_write flag is dropped in a few places, as this would confuse the operation. Further optimizations will be brought in the later patches, if any. This conversion ends up with a drop of significant amount of codes, mostly the helper codes that are no longer used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-23ALSA: hda - Move a part of hda_codec stuff into hdac_deviceTakashi Iwai1-1/+1
Now some codes and functionalities of hda_codec struct are moved to hdac_device struct. A few basic attributes like the codec address, vendor ID number, FG numbers, etc are moved to hdac_device, and they are accessed like codec->core.addr. The basic verb exec functions are moved, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-23ALSA: hda - Bind codecs via standard busTakashi Iwai1-14/+2
Now we create the standard HD-audio bus (/sys/bus/hdaudio), and bind the codec driver with the codec device over there. This is the first step of the whole transition so that the changes to each codec driver are kept as minimal as possible. Each codec driver needs to register hda_codec_driver struct containing the currently existing preset via the new helper macro module_hda_codec_driver(). The old hda_codec_preset_list is replaced with this infrastructure. The generic parsers (for HDMI and other) are also included in the preset with the special IDs to bind uniquely. In HD-audio core side, the device binding code is split to hda_bind.c. It provides the snd_hda_bus_type implementation to match the codec driver with the given codec vendor ID. It also manages the module auto-loading by itself like before: when the matching isn't found, it tries to probe the corresponding codec modules, and finally falls back to the generic drivers. (The special ID mentioned above is set at this stage.) The only visible change to outside is that the hdaudio sysfs entry now appears in /sys/bus/devices, not as a sound class device. More works to move the suspend/resume and remove ops will be (hopefully) done in later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-26ALSA: hda - patch_analog.c: Remove some unused functionsRickard Strandqvist1-33/+0
Removes some functions that are not used anywhere: ad198x_ch_mode_get() ad198x_ch_mode_info() ad198x_ch_mode_info() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-17ALSA: hda - Add quirk for Packard Bell EasyNote MX65Takashi Iwai1-0/+39
Packard Bell EasyNote MX65 with AD1986A codec needs a few fixups, namely, the pin config overrides to set only the known I/O pins and the EAPD has to be turned on. In addition, add stereo mix input forcibly for avoiding the weird KDE behavior by this update. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88251 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-15ALSA: hda - Make add_stereo_mix_input flag tristateTakashi Iwai1-1/+2
... for distinguishing whether it's explicitly enabled via a user hint or enabled by a driver as a fallback. Now the former case corresponds to HDA_HINT_STEREO_MIX_ENABLE while the latter to HDA_HINT_STEREO_MIX_AUTO. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-10ALSA: hda - Add "eapd" model string for AD1986A codecTakashi Iwai1-0/+1
Also update the documentation to the latest state. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-10ALSA: hda - Add EAPD fixup for ASUS Z99He laptopTakashi Iwai1-0/+1
The same fixup to enable EAPD is needed for ASUS Z99He with AD1986A codec like another ASUS machine. Reported-and-tested-by: Dmitry V. Zimin <pfzim@mail.ru> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-30ALSA: hda/analog - Fix silent output on ASUS A8JNTakashi Iwai1-0/+1
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 Cc: <stable@vger.kernel.org> [3.11+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-13Merge tag 'asoc-v3.15' of ↵Takashi Iwai1-0/+4
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.15 Quite a busy release for ASoC this time, more on janitorial work than exciting new features but welcome nontheless: - Lots of cleanups from Takashi for enumerations; the original API for these was error prone so he's refactored lots of code to use more modern APIs which avoid issues. - Elimination of the ASoC level wrappers for I2C and SPI moving us closer to converting to regmap completely and avoiding some randconfig hassle. - Provide both manually and transparently locked DAPM APIs rather than a mix of the two fixing some concurrency issues. - Start converting CODEC drivers to use separate bus interface drivers rather than having them all in one file helping avoid dependency issues. - DPCM support for Intel Haswell and Bay Trail platforms. - Lots of work on improvements for simple-card, DaVinci and the Renesas rcar drivers. - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the CSR SiRF SoC.
2014-03-05ALSA: hda - Use analog beep for Thinkpads with AD1984 codecsTakashi Iwai1-0/+3
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 Iwai1-0/+1
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-15ALSA: hda - Remove superfluous inclusion of linux/pci.hTakashi Iwai1-1/+0
Some codec drivers still have it since using PCI_VENDOR_ID_*. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-05ALSA: hda - Improve loopback path lookups for AD1983Takashi Iwai1-0/+7
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 Iwai1-0/+1
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 Iwai1-0/+19
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 Iwai1-8/+8
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 Iwai1-3/+3
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 Iwai1-0/+15
2013-12-11ALSA: hda - Add static DAC/pin mapping for AD1986A codecTakashi Iwai1-0/+10
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 Iwai1-0/+1
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 Iwai1-0/+3
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 Iwai1-0/+2
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 Iwai1-0/+1
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 Iwai1-13/+14
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 Iwai1-1/+5
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 Iwai1-1/+4
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 Iwai1-1/+17
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 Iwai1-1012/+57
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 Iwai1-10/+0
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 Iwai1-1/+0
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 Iwai1-3/+0
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 Iwai1-96/+12
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 Iwai1-23/+10
... to a fixup entry. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-04ALSA: hda - Remove static quirks for AD1988 codecsTakashi Iwai1-810/+35
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 Iwai1-682/+2
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 Iwai1-1330/+18
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 Iwai1-383/+1
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 Iwai1-0/+8
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 Iwai1-0/+13
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 Iwai1-1/+21
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 Iwai1-3/+9
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 Iwai1-20/+13
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 Iwai1-0/+2
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 Iwai1-1/+43
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 Iwai1-0/+164
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 Iwai1-97/+165
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 Iwai1-5/+261
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 Iwai1-0/+5
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 Iwai1-1/+0
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18ALSA: hda - Fix missing unsol event handler in some codec driversTakashi Iwai1-0/+1
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 Iwai1-624/+291
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 Iwai1-9/+1
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 Iwai1-34/+38
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 Iwai1-1/+0
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 Iwai1-0/+1
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 Henningsson1-7/+7
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 Iwai1-19/+17
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 Iwai1-0/+40
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 Iwai1-1/+1
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>
2012-05-08ALSA: hda - Move BIOS pin-parser code to hda_auto_parser.cTakashi Iwai1-0/+1
Just code shuffles. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20ALSA: hda - Add snd_hda_get_default_vref() helper functionTakashi Iwai1-2/+5
Add a new helper function to guess the default VREF pin control bits for mic in. This can be used to set the pin control value safely matching with the actual pin capabilities. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20ALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functionsTakashi Iwai1-5/+3
For setting the pin-control values more safely to match with the actual pin capability bits, a copule of new helper functions, snd_hda_set_pin_ctl() and snd_hda_set_pin_ctl_cache(), are introduced. These are simple replacement of the codec verb write with AC_VERB_SET_PIN_WIDGET but do more sanity checks and filter out superfluous pin-control bits if they don't fit with the corresponding pin capabilities. Some codecs are screwed up or ignore the command when such a wrong bit is set. These helpers will avoid such secret errors. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-12ALSA: hda - Return the created kcontrol in __snd_hda_add_vmaster()Takashi Iwai1-1/+1
It'll be used for adding hooks in later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-09ALSA: hda - Initialize vmaster slave volumesTakashi Iwai1-2/+6
When the driver is changed to use vmaster or a new slave element is added by the improvement of the parser code, user may face often the silent output because of the muted slave mixer although Master volume is properly set. And they complain. And I get upset. Although such a mixer element should be initialized via "alsactl init", it'd be more user-friendly if the known output slaves are unmuted and set to 0dB so that user can control the volume only with Master as default. Since Master is still set muted as default even with this change, no risk of the speaker blow up, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-03ALSA: hda - Add suffix argument to snd_hda_add_vmaster()Takashi Iwai1-53/+13
In most cases, the slave strings for vmaster are identical between volumes and switches except for "xxx Volume" and "xxx Switch" suffix. Now snd_hda_add_vmaster() takes the optional suffix argument so that each string can be composed with the given suffix, and we can share the slave name strings in both volume and switch calls nicely. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Cache the jack-detection valueTakashi Iwai1-0/+1
Introduce a table containing the pins and their jack-detection states for avoiding the unnecessary verbs to check the pin status at each time. When the unsol event is enabled via snd_hda_jack_detect_enable(), it automatically adds the given NID to the table. Then the driver supposes that the codec driver will set the dirty flag appropariately when an unsolicited event is invoked for that pin. The behavior for reading other pins that aren't registered in the table doesn't change. Only the pins assigned to the table are cached, so far. In near futre, this table can be extended to use the central place for the unsolicited events of all pins, etc, and eventually include the jack-detect kcontrols that replace the current input-jack stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker1-0/+1
Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-09-23ALSA: HDA - Add Independent Headphone for all models of ad1988/ad1989Raymond Yau1-19/+131
- Add "AD198x Headphone" playback device for independent headphone playback while playing 7.1 surround using rear panel audio jacks. - Remove "6stack-dig-fp" model since "Headphone Playback Volume" control using DAC0 instead of DAC1 (HDA_FRONT) was already added to all models. - Add "Independent HP" switch to enable/disable this playback device. When the switch is OFF, headphone use "copy front" mode to get the front channel as the green jack. When the switch is ON, you can play stereo sound through "AD198x Headphone" device to headphone while playing 7.1 surround sound through "AD198x Analog" device. The switch cannot be changed when either "AD198x Headphone" or "AD198X Analog" is open. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-12ALSA: hda - Add Headphone Playback Volume control for ad1988/ad1989Raymond Yau1-17/+13
- use DAC0 instead of DAC1 for Port-A Headphone - assign 0x03 to spec->multiout.hp_nid except model="6stack-dig-fp" Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PMTakashi Iwai1-2/+2
It makes little sense to enable power-saving without PM. This removes SND_HDA_NEEDS_RESUME define so that we can use CONFIG_PM in all places. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10ALSA: hda - Disable SPDIF only when no pin config set for HP with AD1981Takashi Iwai1-1/+2
Some HP laptops with AD1981 have SPDIF connections, but currently the driver disables it statically. Better to check the pin default config to judge whether to enable or disable the SPDIF. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-06ALSA: hda: Virtualize SPDIF out controlsStephen Warren1-1/+3
The SPDIF output controls apply to converter widgets. A future change will create a PCM device per pin widget, and hence a set of SPDIF output controls per pin widget, for certain HDMI codecs. To support this, we need the ability to virtualize the SPDIF output controls. Specifically: * Controls can be "unassigned" from real hardware when a converter is not used for the PCM the control was created for. * Control puts only write to hardware when they are assigned. * Controls can be "assigned" to real hardware when a converter is picked to support output for a particular PCM. * When a converter is assigned, the hardware is updated to the cached configuration. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-03ALSA: hda - Check pin support EAPD in ad198x_power_eapd_writeRaymond Yau1-2/+4
Check whether the pin supports EAPD in ad198x_power_eapd_write. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-03ALSA: hda - Fix HP and Front pins of ad1988/ad1989 in ad198x_power_eapd()Takashi Iwai1-6/+4
In ad198x_power_eapd(), wrong pin NIDs are used for controlling EAPD for HP and Front outputs of AD1988/AD1989. These are actually same with the ones for AD1984 & co, port-A is 0x11 and port-D 0x12. Reported-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25ALSA: hda - Force AD1988_6STACK_DIG for Asus M3N-HT DeluxeTony Vroon1-0/+1
The microphone input on the back panel (pink connector) stopped operating correctly after an upgrade from 2.6.35 to 2.6.38; the actual problem manifests itself as a lack of microphone bias voltage (VREF_HIZ) on node 0x17. With AD1988_6STACK_DIG the maximum bias voltage (VREF_80) is applied and the headset operates correctly. Signed-off-by: Tony Vroon <tony@linx.net> Tested-by: Doug Redlich <pbrigade@nxltech.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20ALSA: hda - Fix input-src parse in patch_analog.cAdrian Wilkins1-1/+2
Compare pin type enum to the pin type and not the array index. Fixes bug#0005368. Signed-off-by: Adrian Wilkins <adrian.wilkins@nhs.net> Cc: <stable@kernel.org> (2.6.37 and later) Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02ALSA: hda - Constify fixup and other array data in patch_analog.cTakashi Iwai1-164/+164
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02ALSA: hda - Constify some API function argumentsTakashi Iwai1-1/+1
Also fixed the assignment of multiout.dac_nids to satisfy const. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26ALSA: hda - Move EAPD power-down into shutup callback for AD codecsTakashi Iwai1-6/+6
EAPD power-down should be called also for normal shutup cases. Let's move to there. This also fixes the compile warnings when CONFIG_PM isn't set automatically. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-25ALSA: HDA: New AD1984A model for Dell Precision R5500David Henningsson1-0/+89
For codec AD1984A, add a new model to support Dell Precision R5500 or the microphone jack won't work correctly. BugLink: http://bugs.launchpad.net/bugs/741516 Tested-by: Kent Baxley <kent.baxley@canonical.com> Cc: stable@kernel.org Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14ALSA: hda - simplify multistreaming playback model of ad1988Raymond Yau1-107/+10
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18ALSA: hda - consitify string arraysTakashi Iwai1-14/+16
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18ALSA: hda - Add add multi-streaming playback for AD1988Raymond Yau1-4/+178
Attached a patch which add a new model to support multi-streaming playback for ad1988. playback another stereo stream through the front panel headphone on device 2 while playback through the speakers connected to rear panel on device 0 at the same time. Tested with ad1988a rev2 codec on asus P5B-V motherboard. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10ALSA: HDA: Rename "Mic Boost" to "Mic Boost Volume"David Henningsson1-36/+36
BugLink: http://bugs.launchpad.net/bugs/697240 If the "Volume" suffix is not given, alsa-lib gets confused and loses the dB information at the simple element level. Boosts generally affects both playback and capture, as they are applied early in the chain. Hence no "Playback" or "Capture" in the suffix. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-25ALSA: hda - Disable sticky PCM stream assignment for AD codecsTakashi Iwai1-0/+7
The sticky PCM stream assignment introduced in 2.6.36 kernel seems causing problems on AD codecs. At some time later, the streaming no longer works by unknown reason. A simple workaround is to disable sticky-assignment for these codecs. Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-21Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-0/+1
2010-09-21ALSA: hda - Add Dell Latitude E6400 model quirkLuke Yelavich1-0/+1
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/643891 Set the Dell Latitude E6400 (1028:0233) SSID to use AD1984_DELL_DESKTOP Cc: stable@kernel.org Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09ALSA: hda - Improve the input source name labelsTakashi Iwai1-16/+11
This patch improves the input-source label strings to be generated from the pin information instead of fixed strings per AUTO_PIN_* type. This gives more suitable labels, especially for mic and line-in pins. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09ALSA: hda - Remove AUTO_PIN_FRONT_{MIC|LINE}Takashi Iwai1-2/+2
We can assign multiple pins to a single role now, let's reduce the redundant FRONT_MIC and FRONT_LINE. Also, autocfg->input_pins[] is no longer used, so this is removed as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09ALSA: hda - Keep char arrays in input_mux itemsTakashi Iwai1-3/+3
Keep char array in the input_mux item itself instead of pointing to an external string. This is a preliminary work for improving the input-mux name based on the pin role. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30ALSA: hda - Use new inputs[] field to parse input-pins for AD codecsTakashi Iwai1-12/+18
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposedJerone Young1-1/+6
Just as with the X301. The X300 does not have a way to do SPDIF either. It does not have a dock connector, nor does it have the SPDIF through the headphone jack. This patch fixes it so X300 does not show SPDIF, since it cannot do it. To add all Lenovo Thinkpads had different codec subsytem IDs: X300: http://launchpadlibrarian.net/34862838/Card0.Codecs.codec.0.txt Signed-off-by: Jerone Young <jerone.young@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-06Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-9/+0
2010-04-19ALSA: hda - Fix resume from StR of HP 2510p with docking-stationTakashi Iwai1-9/+0
When HP laptop with AD1981 codec is suspended and the docking-station is connected before the resume, the outputs get confused, and wrongly routed still to the speaker. This is because of a change in 2.6.34-rc1 ea52bf260ecbb175339af3178c15788df21b7516 ALSA: hda: Add powerdown for Analog Devices HDA codecs The problem was the added resume callback that doesn't consider the modified init hook. The fix is simply remove the resume callback here and make the resume normally. This doesn't change any behavior intended in the commit above (for shutting down the sound at suspend) but only fixes the resume. Reported-and-tested-by: Frans Pop <elendil@planet.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-01Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-0/+8
2010-03-31ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981Daniel T Chen1-0/+8
BugLink: https://launchpad.net/bugs/551606 The OR's hardware distorts at PCM 100% because it does not correspond to 0 dB. Fix this in patch_ad1981() for all models using the Thinkpad quirk. Reported-by: Jane Silber Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-26ALSA: hda-intel - AD1984 thinkpad - add analog beep input controlJaroslav Kysela1-4/+17
For Lenovo Thinkpad T61/X61, the analog beep input is connected to node 0x20, index 3. Move the digital beep mute/volume controls as "Digital Beep" and create analog beep controls for mentioned node. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-03-01Merge branch 'topic/hda' into for-linusTakashi Iwai1-1/+1
2010-02-22ALSA: hda: Use 3stack quirk for Toshiba Satellite L40-10QDaniel T Chen1-1/+1
BugLink: https://bugs.launchpad.net/bugs/524948 The OR has verified that the existing model=laptop-eapd quirk does not function correctly but instead needs model=3stack. Make this change so that manual corrections to module-init-tools file(s) are not required. Reported-by: Lasse Havelund <lasse@havelund.org> CC: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-16Merge branch 'fixes' into develJaroslav Kysela1-0/+16
2010-01-21ALSA: hda - AD1988 codec - fix SPDIF-input mixer initialization (unmute)Jaroslav Kysela1-1/+10
The SPDIF-input pin 0x1c is muted by default in hardware. Unmute appropriate pin to get captured samples instead zeros. Tested on Lenovo Thinkstation. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-19Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-0/+16
Conflicts: sound/pci/hda/patch_realtek.c
2009-12-28ALSA: hda: Add powerdown for Analog Devices HDA codecsDaniel T Chen1-0/+68
This patch ports powerdown fixes to AD198x. Currently we only turn off Front and HP for suspend, but this is easily extended for additional nids. Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25ALSA: hda - Disable tigger at pin-sensing on AD codecsTakashi Iwai1-0/+16
Analog Device codecs seem to have problems with the triggering of pin-sensing although their pincaps give the trigger requirements. Some reported that constant CPU load on HP laptops with AD codecs. For avoiding this regression, add a flag to codec struct to notify explicitly that the codec doesn't suppot the trigger at pin-sensing. Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23ALSA: hda - Fix NID association for capture mixersTakashi Iwai1-2/+1
Fix the wrong implementation of NID <-> kctl mapping for capture mixers introduced by the ocmmit 5b0cb1d850c26893b1468b3a519433a1b7a176be. So far, the driver returns an error at probe. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-15Merge remote branch 'alsa/devel' into topic/hdaTakashi Iwai1-4/+33
2009-12-15ALSA: hda - simplify usage of HDA_SUBDEV_AMP_FLAGJaroslav Kysela1-10/+6
The HDA_SUBDEV_NID_FLAG is duplicate for amplifier control elements. Move get_amp_nid_() call to the snd_hda_ctl_add() function. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15ALSA: hda - introduce HDA_SUBDEV_AMP_FLAG (ControlAmp in proc)Jaroslav Kysela1-5/+7
The purpose of this changeset is to show information about amplifier setting in the codec proc file. Something like: Control: name="Front Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Front Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=In, idx=2, ofs=0 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15ALSA: hda - add more NID->Control mappingJaroslav Kysela1-0/+31
This set of changes add missing NID values to some static control elemenents. Also, it handles all "Capture Source" or "Input Source" controls. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-14ALSA: hda: Fix max PCM level to 0 dB for AD1981_HPDaniel T Chen1-0/+8
BugLink: https://bugs.launchpad.net/bugs/461062 The original reporter states that PCM maxes at +12 dB and results in very bad distortion. Cap PCM at 0 dB to resolve this symptom. Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-08ALSA: hda - Generalize EAPD inversion check in patch_analog.cTakashi Iwai1-8/+9
Add a flag to spec field so that the EAPD inversion can be checked outside the relevant control callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()Takashi Iwai1-31/+16
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16ALSA: hda - Fix build errors with CONFIG_SND_HDA_INPUT_BEEP=nTakashi Iwai1-0/+6
Disable beep-related codes when CONFIG_SND_HDA_INPUT_BEEP isn't set. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16ALSA: hda - Get rid of magic digits for subdev hackTakashi Iwai1-1/+1
Define a proper const for a magic 31bit flag for subdev / NID setup with a brief comment. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16ALSA: hda - proc - add support for dynamic controls to mixer<->NID mappingJaroslav Kysela1-0/+2
This patch adds support for dynamically created controls to proc codec file (Control: lines). Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignmentJaroslav Kysela1-1/+3
This is an initial patch to show universal control<->NID assigment in proc codec file. The change helps to debug codec related problems. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16ALSA: hda_intel: Digital PC Beep - change behaviour for input layerJaroslav Kysela1-1/+1
Original implementation was keeping registered input device for SND_BEEP and SND_TONE events all time. This patch changes this behaviour: If digital PC Beep is turned off using universal control switch, the input device is unregistered. Explanation: The kd_mksound() send SND_BEEP and SND_TONE only to last registered device acceping those events. It means that the HDA Intel audio driver blocks also the internal PC Speaker device (pcspkr.c driver) even if the HDA Beep is muted. The user can easy disable all beeps using 'setterm -blength 0' or 'xset b off' command. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-29ALSA: hda - Analog Devices AD1984A add HP Touchsmart modelMiguel de Barros1-0/+139
Reference: ALSA bug #0004614 https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4614 port-A (0x11) - front hp-out port-D (0x12) - rear line out port-E (0x1c) - front mic-in port-F (0x16) - Internal speakers digital-mic (0x17) - Internal mic init verbs, mixers, jack sensing and PCI_QUIRK to support this hardware Signed-off-by: Miguel de Barros <miguel.de.barros@bluewin.ch> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-01ALSA: hda - Unmute docking line-out as default with AD1984A codecTakashi Iwai1-0/+2
Unmute the docking-station line-out as default on machines with AD1984A codec chip. It can be still muted via "Dock" mixer switch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-31ALSA: hda - Add missing GPIO initialization for AD1984A laptop modelTakashi Iwai1-0/+4
A similar initialization of GPIO1 pin like mobile model is needed for laptop model, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-31ALSA: hda - Add support of docking auto-mute/mic for AD1984A laptop modelTakashi Iwai1-40/+81
Add the support of automatic mute and mic-switching of the docking station HP and mic plugs for AD1984A laptop model for some HP machines. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-27ALSA: hda - Add more quirk for HP laptops with AD1984ATakashi Iwai1-0/+1
More entries for HP laptops to get them working properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-19Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-2/+4
2009-08-19ALSA: hda: enable speaker output for Compaq 6530s/6531sWu Fengguang1-2/+4
HP Compaq 6530s and 6531s internal speaker is silence or becomes silence within 1 minute after fresh boot. It is found that pin 0x1c must be set to PIN_OUT mode to make the speaker work. This is weird - line-in pin 0x1c and speaker pin 0x16 seem to be unrelated. The codec differences before/after patch are: @@ Node 0x17 [Pin Complex] wcaps 0x40020b: Pin Default 0x41a6e130: [N/A] Mic at Ext Rear Conn = Digital, Color = White DefAssociation = 0x3, Sequence = 0x0 Misc = NO_PRESENCE - Pin-ctls: 0x24: IN + Pin-ctls: 0x40: OUT @@ Node 0x1c [Pin Complex] wcaps 0x40018d: Pin Default 0x41813021: [N/A] Line In at Ext Rear Conn = 1/8, Color = Blue DefAssociation = 0x2, Sequence = 0x1 - Pin-ctls: 0x24: IN VREF_80 + Pin-ctls: 0x40: OUT VREF_HIZ Unsolicited: tag=00, enabled=0 Connection: 1 0x24 Tests show that it won't impact (external) Mic recording. Reported-by: "Lin, Ming M" <ming.m.lin@intel.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-28ALSA: hda - Reword information messages for BIOS auto-probing modeTakashi Iwai1-1/+2
The sentense "Unknown model for xxx, ..." makes people too nervous and drives them to a direction to a wrong "fix" by giving any mismatching model option. Let's rephrase the messages to be more nice and easy (at least that won't make people suspect conspiracies). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-24Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-1/+1
2009-07-22ALSA: hda - Restore GPIO1 properly at resume with AD1984ATakashi Iwai1-1/+1
The commit 099db17e66294b02814dee01c81d9abbbeece93e introduced a regression at suspend/resume where the GPIO1 bit isn't properly restored, thus the speaker output gets muted initially after resume. The fix is simple, use the cached write for storing GPIO data. Reference: Novell bnc#522764 https://bugzilla.novell.com/show_bug.cgi?id=522764 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-1/+26
2009-07-03ALSA: hda - Add GPIO1 control at muting with HP laptopsTakashi Iwai1-1/+26
HP laptops with AD1984A codecs (at least mobile models) need to set GPIO1 appropriately to indicate the mute state. The BIOS checks this bit to judge whether the mute on or off is sent via F8 key. Without changing this bit, the BIOS can be confused and may toggle the mute wrongly. Reference: Novell bnc#515266 https://bugzilla.novell.com/show_bug.cgi?id=515266 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-01Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-0/+1
2009-07-01ALSA: hda - Add quirk for HP 6930pTakashi Iwai1-0/+1
Added a quirk model=laptop for HP 6930p (103c:30dc) with AD1984A codec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24ALSA: hda - Fix support for Samsung P50 with AD1986A codecTakashi Iwai1-0/+41
Samsung P50 requires the HP auto-muting unlike other Samsung models. Added a new model=samsung-p50 to support this. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24ALSA: hda - Generalize the pin-detect quirk for Lenovo N100Takashi Iwai1-2/+8
Add a new flag to ad_spec struct so that the same hack can be used for any other models (if any). This also allows other models to reuse the auto-mute functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24ALSA: hda - Simplify AD1986A mixer definitionsTakashi Iwai1-56/+21
Split mixer element arrays of AD1986A models to several pieces so that each model can share the same mixer arrays. This removes lots of duplicated data. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-23ALSA: hda - Fix init verbs of AD1884A mobile modelTakashi Iwai1-1/+44
The current ad1884a-mobile model has a problem that the speaker output doesn't work sometimes after boot or power-saving on some HP laptops. It seems that the verbs accessing to the non-functional widgets cause this problem. This patch simplifies the init verbs for mobile model not to touch unnecessary setups so that it avoids the speaker-mute problem. Reference: Novell bnc#495668 https://bugzilla.novell.com/show_bug.cgi?id=495668 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16ALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, tooTakashi Iwai1-0/+8
Add the upper-limit of mixer amp for AD1884A-laptop model just like the mobile model for some HP laptops. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-07ALSA: hda - add missing comma in ad1884_slave_volsAkinobu Mita1-1/+1
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-25ALSA: hda - Clean up / fix quirks for HP laptops with AD1984ATakashi Iwai1-3/+2
Use SND_PCI_QUIRK_MASK() to clean up / support better HP laptops with AD1984A codec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-23Merge branch 'test/hda-pincfg' into topic/hdaTakashi Iwai1-2/+1
2009-02-23ALSA: hda - Don't give over 0dB volume for AD1984A HP laptopsTakashi Iwai1-0/+8
Set the upper limit 0dB to the volume of mixer amp 0x20 for AD1984A HP laptops. The overloaded volume may damage the internal speaker. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-20ALSA: hda - Remove codec-specific pin save/restore functionsTakashi Iwai1-2/+1
Replace the accessor to pin defaults with the common code for caching. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-16ALSA: hda - Clean up quirks for HP laptops with AD1984ATakashi Iwai1-2/+1
Clean up quirks for HP laptops with AD1984A using SND_PCI_QUIRK_MASK() Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-13Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-3/+12
2009-02-13ALSA: hda - Add snd_hda_multi_out_dig_cleanup()Takashi Iwai1-1/+10
Added the helper function snd_hda_multi_out_dig_cleanup() to clean up the digital outputs with multi setup. This call is needed in cases the codec supports multiple digital outputs as slaves. Otherwise the slave widgets aren't properly cleaned up. For a single digital output (e.g. in patch_conexant.c), this call isn't needed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-13ALSA: hda - Add missing terminator in slave dig-out arrayTakashi Iwai1-2/+2
Added the missing terminator for ad1989b_slave_dig_outs[]. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-12ALSA: hda - Detect multiple digital-out pinsTakashi Iwai1-1/+1
Detect multiple digital-out pins in snd_hda_parse_pin_defconfig(). The dig_out_pin and dig_out_type fields become arrays. The codec parser still doesn't use this multiple pins detection, though. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-09ALSA: hda - Clean up quirk listsTakashi Iwai1-6/+4
Clean up quirk lists with bit masks. Also, sorted in numerical order for alc662_cfg_tbl[]. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-06ALSA: hda - Use digital beep for AD codecsTakashi Iwai1-52/+88
Use digital beep instead of analog pc-beep for AD codecs. Create the beep mixer controls dynamically on demand. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: hda - Add quirk for another HP laptopTakashi Iwai1-0/+1
Add model=laptop entry for another HP laptop (103c:3077) with AD1984A. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: hda - Add quirk for HP zenith laptopTakashi Iwai1-0/+1
Added model=laptop for another HP laptop (103c:3072) with AD1984A codec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23ALSA: hda - Fix wrong initial verb for AD1984 thinkpad modelTakashi Iwai1-1/+1
The docking mic-boost (0x25) has no mute bit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23ALSA: hda - Fix invalid verbs for mic-boosts on AD1884*Takashi Iwai1-4/+4
The mic-boosts (0x14 and 0x15) on AD1884* codecs are input-amps, not output-amps. Fix the invalid initialization verbs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23ALSA: hda - Remove invalid amp initializations for AD1988* codecsTakashi Iwai1-12/+0
The ADC widgets on AD1988* codecs have no amp controls. Remove invalid initialization verbs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23ALSA: hda - Fix initial verbs for mic-boosts on AD1981HDTakashi Iwai1-2/+2
The mic boosts (NID 0x08 and 0x18) are input-amps, not output-amps. Fix the initial verbs for them. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-07ALSA: hda - Fix typos for AD1882 codecsClemens Fruhwirth1-2/+2
Fixed typos of codec-id checks for AD1882/AD1882A. Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-07ALSA: hda - Add quirk for HP 2230sTakashi Iwai1-0/+1
Added a quirk for HP 2230s, model=laptop, with AD1984A codec. Reference: Novell bnc#461660 https://bugzilla.novell.com/show_bug.cgi?id=461660 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10ALSA: hda - Add quirk for HP6730B laptopTakashi Iwai1-0/+1
Added model=laptop for HP 6730B laptop with AD1984A codec. Reference: Novell bnc#457909 https://bugzilla.novell.com/show_bug.cgi?id=457909 Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: stable@kernel.org
2008-11-27ALSA: hda - Modularize HD-audio driverTakashi Iwai1-2/+24
Split the monolithc HD-audio driver into several pieces: - snd-hda-intel HD-audio PCI controller driver; loaded via udev - snd-hda-codec HD-audio codec bus driver - snd-hda-codec-* Specific HD-audio codec drivers When built as modules, snd-hda-codec (that is invoked by snd-hda-intel) looks up the codec vendor ID and loads the corresponding codec module automatically via request_module(). When built in a kernel, each codec drivers are statically hooked up before probing the PCI. This patch adds appropriate EXPORT_SYMBOL_GPL()'s and the module information for each driver, and driver-linking codes between codec-bus and codec drivers. TODO: - Avoid EXPORT_SYMBOL*() when built-in kernel - Restore __devinit appropriately depending on the condition Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21ALSA: hda - make laptop-eapd model back for AD1986ATakashi Iwai1-3/+46
The changes specific for Samsung laptops seem unapplicable to other hardware models like ASUS. The mic inputs are lost on such hardware by the change 5d5d5f43f1b835c375de9bd270cce030d16e2871. This patch adds back the old laptop-eapd model, and create a new model "samsung" for the new one specific to Samsung laptops with automatic mic selection feature. Reference: kernel bugzilla #12070 http://bugzilla.kernel.org/show_bug.cgi?id=12070 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-12Merge branch 'topic/fix/hda' into topic/hdaTakashi Iwai1-0/+2
Conflicts: sound/pci/hda/patch_sigmatel.c
2008-11-10ALSA: hda - Make the HP EliteBook 8530p use AD1884A model laptopTravis Place1-0/+1
Added a QUIRK to patch_analog.c for the HP Elitebook 8530p (IDs 0x103c:0x30e7) to use AD1884A model 'laptop' by default. Playback and Capture confirmed working. Signed-off-by: Travis Place <wishie@wishie.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-09ALSA: hda - Add another HP model (6730s) for AD1884AMichel Marti1-0/+1
Added model=laptop for another HP machine (103c:3614) with AD1884A codec. Signed-off-by: Michel Marti <mma@objectxp.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-29Merge branch 'topic/fix/hda' into topic/hdaTakashi Iwai1-0/+1
2008-10-28ALSA: hda - Add another HP model for AD1884ATakashi Iwai1-0/+1
Added a quirk entry for another HP mobile device with AD1884A codec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: hda - Use generic array helpersTakashi Iwai1-29/+27
Use generic array helpers to simplify array handling in snd-hda-intel. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-09-23ALSA: HDA: patch_analog: Quirk for Asus P5Q Premium/Pro boards.Robin H. Johnson1-0/+1
Use 6STACK_DIG for the AD2000BX variant of the AD1989B chip used by Asus on their Asus P5Q Premium and Pro boards. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-23ALSA: HDA: patch_analog: Implement multiple outputs for AD1988Robin H. Johnson1-1/+8
Implement the slave_dig_outs for AD1989 cards. Untested due to lack of hardware. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-23ALSA: HDA: patch_analog: Fix SPDIF output on AD1989BRobin H. Johnson1-1/+5
The SPDIF pins for AD1989 are not enabled by default. Set OUT bit so that they actually work. Also initialize the HDMI SPDIF at the same time. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-25ALSA: hda - Add AD1882A codec supportTakashi Iwai1-17/+57
Added the basic support of AD1882A codec chip. It's almost compatible with AD1882, but with a digital mic and some differences in connections. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-13ALSA: hda - initialize node 0x21 properly on AD1988 codecsTakashi Iwai1-0/+6
The widget node 0x21 should be initialized as unmuted/full (0dB) as default. This will reduce additional manual work by user at the first time use. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-10ALSA: hda - Add missing Thinkpad Z60m supportTakashi Iwai1-0/+1
Added the missing SSID of Thinkpad Z60m for model=thinkpad with AD1981HD. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-18ALSA: hda - Fix wrong volumes in AD1988 auto-probe modeTakashi Iwai1-11/+21
Don't create mixer volume elements for Headphone and Speaker if they use the same DAC as normal line-outs on AD1988. Otherwise the amp value gets screwed up, e.g. https://bugzilla.novell.com/show_bug.cgi?id=398255 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13ALSA: hda - Remove unused mutexTakashi Iwai1-5/+0
Removed unused mutex from patch_*.c. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-30[ALSA] hda - Fix mic input on HP2133Takashi Iwai1-22/+28
The mic pins are wrongly assigned on AD1884A mobile model. The mic handling is fixed for the automatic mic selection, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-24[ALSA] hda - Add model for ASUS P5K-E/WIFI-APTravis Place1-0/+1
Added a config table entry for the ASUS P5K-E/WIFI-AP mainboard (ID 1043:8227) to use AD1988_6STACK_DIG Signed-off-by: Travis Place <wishie@wishie.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda - Fix Thinkpad X300 digital micTakashi Iwai1-0/+3
TP X300 digital mic requires additional init verbs with magic COEFs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda - Add support of AD1989A/AD1989BTakashi Iwai1-3/+25
Added the support of AD1989A and AD1989B codecs. These codecs can have multiple SPDIF devices, but currently we handle only one SPDIF. If any real devices with two SPDIF interfaces (likely one for SPDIF and one for HDMI), we'll fix this rightly. Otherwise, these codecs are pretty similar with AD1988. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-codec - Support of Lenovo Thinkpad X300Takashi Iwai1-0/+94
Added the model thinkpad for Lenovo Thinkpad X300 with AD1984A codec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-codec - keep the format verb at closing PCM streamsTakashi Iwai1-4/+2
Keep the format verb at closing PCM streams. Introduced snd_hda_codec_cleanup_stream() for the parcicular purpose. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] sound: hda: missing includes of hda_patch.hHarvey Harrison1-0/+1
Move the array declaration to hda_codec.c where it is used and add includes where the individual presets are declared. Fixes the following sparse warnings: sound/pci/hda/patch_realtek.c:13744:25: warning: symbol 'snd_hda_preset_realtek' was not declared. Should it be static? sound/pci/hda/patch_cmedia.c:729:25: warning: symbol 'snd_hda_preset_cmedia' was not declared. Should it be static? sound/pci/hda/patch_analog.c:3656:25: warning: symbol 'snd_hda_preset_analog' was not declared. Should it be static? sound/pci/hda/patch_sigmatel.c:3995:25: warning: symbol 'snd_hda_preset_sigmatel' was not declared. Should it be static? sound/pci/hda/patch_si3054.c:286:25: warning: symbol 'snd_hda_preset_si3054' was not declared. Should it be static? sound/pci/hda/patch_atihdmi.c:156:25: warning: symbol 'snd_hda_preset_atihdmi' was not declared. Should it be static? sound/pci/hda/patch_conexant.c:1721:25: warning: symbol 'snd_hda_preset_conexant' was not declared. Should it be static? sound/pci/hda/patch_via.c:1962:25: warning: symbol 'snd_hda_preset_via' was not declared. Should it be static? Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-codec - Add docking-station mic input for Thinkpad X61Takashi Iwai1-1/+2
Added the docking-stationc mic input to the capture source list for Thinkpad X61. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] Keep private TLV entry in vmaster itselfTakashi Iwai1-3/+3
Use a private array for TLV entries of virtual master controls instead of (supposed) static array. This cleans up the existing codes. Also, now vmaster assumes the simple dB-range TLV that is the only type it can handle. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-codec - Add model=mobile for AD1884A & coTakashi Iwai1-1/+47
Added the new model mobile for AD1884A and compatible codecs. It's a reduced version of model=laptop. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-codec - Add support of AD1883/1884A/1984A/1984BTakashi Iwai1-0/+327
Added the support of new AD codecs: AD1883, AD1884A, AD1984A and AD1984B. These are almost compatible except for additional digital pins, etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-codec - Add "IEC958 Default PCM" switchTakashi Iwai1-1/+7
Added a new mixer switch to enable/disable the sharing of the default PCM stream with analog and SPDIF outputs. When "IEC958 Default PCM" switch is on, the PCM stream is routed both to analog and SPDIF outputs. This is the behavior in the earlier version. Turning this switch off has a merit for some codecs, though. Some codec chips don't support 24bit formats for SPDIF but only for analog outputs. In this case, you can use 24bit format by disabling this switch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-codec - Implement auto-mic jack sensing on Samsung laptopsTakashi Iwai1-4/+49
Implemented the auto-mic jack sensing for Samsung laptops with AD1986A codec chip (model=laptop-eapd). The hardware uses pin 0x1d and 0x1f for the internal and external mics, respectively. Signed-off-by: Takashi Iwai <tiwai@suse.de>