summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_analog.c
AgeCommit message (Collapse)Author
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>
2012-05-08ALSA: hda - Move BIOS pin-parser code to hda_auto_parser.cTakashi Iwai
Just code shuffles. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20ALSA: hda - Add snd_hda_get_default_vref() helper functionTakashi Iwai
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 Iwai
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 Iwai
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 Iwai
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 Iwai
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 Iwai
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 Gortmaker
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 Yau
- 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 Yau
- 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 Iwai
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 Iwai
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 Warren
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 Yau
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 Iwai
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 Vroon
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 Wilkins
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 Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>