summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_analog.c
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda - Fix missing path between aamix and outputs in AD codecsTakashi Iwai2013-01-231-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>
* ALSA: hda - Select auto-parser as default for AD codecsTakashi Iwai2013-01-221-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>
* ALSA: hda - Convert some static quirks to fixup codes for AD codecsTakashi Iwai2013-01-221-0/+164
| | | | | | | Other remaining quirks are mostly resolvable via pincfg fixes, even if it matters. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Rearrange for dropping static quirk codes in AD codec driverTakashi Iwai2013-01-221-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>
* ALSA: hda - Add SPDIF mux control to AD codec auto-parserTakashi Iwai2013-01-221-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>
* ALSA: hda - Add aamix NID to AD codecsTakashi Iwai2013-01-221-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>
* ALSA: hda - Remove superfluous header inclusionsTakashi Iwai2013-01-211-1/+0
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix missing unsol event handler in some codec driversTakashi Iwai2013-01-181-0/+1
| | | | | | This resulted in non-working auto-mute behavior, of course... Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add generic parser support to Analog Device codec driverTakashi Iwai2013-01-121-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>
* ALSA: hda - Remove snd_hda_codec_amp_update() call from patch_*.cTakashi Iwai2013-01-101-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>
* ALSA: hda - Call snd_array_init() early and only onceTakashi Iwai2012-11-281-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>
* ALSA: hda - Remove shutup calls in free callbacksTakashi Iwai2012-11-211-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>
* ALSA: hda - Force to reset IEC958 status bits for AD codecsTakashi Iwai2012-11-051-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>
* ALSA: hda - avoid non-standard "Docking" name in mixersDavid Henningsson2012-09-191-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>
* ALSA: hda - Clean up CONFIG_SND_HDA_POWER_SAVETakashi Iwai2012-08-301-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>
* ALSA: hda - Add 3stack-automute model to AD1882 codecTakashi Iwai2012-08-151-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>
* ALSA: Convert to new pm_ops for PCI driversTakashi Iwai2012-07-031-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>
* ALSA: hda - Move BIOS pin-parser code to hda_auto_parser.cTakashi Iwai2012-05-081-0/+1
| | | | | | Just code shuffles. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add snd_hda_get_default_vref() helper functionTakashi Iwai2012-04-201-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>
* ALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functionsTakashi Iwai2012-04-201-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>
* ALSA: hda - Return the created kcontrol in __snd_hda_add_vmaster()Takashi Iwai2012-03-121-1/+1
| | | | | | It'll be used for adding hooks in later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Initialize vmaster slave volumesTakashi Iwai2012-03-091-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>
* ALSA: hda - Add suffix argument to snd_hda_add_vmaster()Takashi Iwai2012-02-031-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>
* ALSA: hda - Cache the jack-detection valueTakashi Iwai2011-11-161-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>
* sound: Add module.h to the previously silent sound usersPaul Gortmaker2011-10-311-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>
* ALSA: HDA - Add Independent Headphone for all models of ad1988/ad1989Raymond Yau2011-09-231-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>
* ALSA: hda - Add Headphone Playback Volume control for ad1988/ad1989Raymond Yau2011-09-121-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>
* ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PMTakashi Iwai2011-07-261-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>
* ALSA: hda - Disable SPDIF only when no pin config set for HP with AD1981Takashi Iwai2011-06-101-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>
* ALSA: hda: Virtualize SPDIF out controlsStephen Warren2011-06-061-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>
* ALSA: hda - Check pin support EAPD in ad198x_power_eapd_writeRaymond Yau2011-06-031-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>
* ALSA: hda - Fix HP and Front pins of ad1988/ad1989 in ad198x_power_eapd()Takashi Iwai2011-06-031-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>
* ALSA: hda - Force AD1988_6STACK_DIG for Asus M3N-HT DeluxeTony Vroon2011-05-251-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>
* ALSA: hda - Fix input-src parse in patch_analog.cAdrian Wilkins2011-05-201-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>
* ALSA: hda - Constify fixup and other array data in patch_analog.cTakashi Iwai2011-05-021-164/+164
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Constify some API function argumentsTakashi Iwai2011-05-021-1/+1
| | | | | | Also fixed the assignment of multiout.dac_nids to satisfy const. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move EAPD power-down into shutup callback for AD codecsTakashi Iwai2011-04-261-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>
* ALSA: HDA: New AD1984A model for Dell Precision R5500David Henningsson2011-03-251-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>
* ALSA: hda - simplify multistreaming playback model of ad1988Raymond Yau2011-02-141-107/+10
| | | | | Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - consitify string arraysTakashi Iwai2011-01-181-14/+16
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add add multi-streaming playback for AD1988Raymond Yau2011-01-181-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>
* ALSA: HDA: Rename "Mic Boost" to "Mic Boost Volume"David Henningsson2011-01-101-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>
* ALSA: hda - Disable sticky PCM stream assignment for AD codecsTakashi Iwai2010-10-251-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>
* Merge branch 'fix/hda' into topic/hdaTakashi Iwai2010-09-211-0/+1
|\
| * ALSA: hda - Add Dell Latitude E6400 model quirkLuke Yelavich2010-09-211-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>
* | ALSA: hda - Improve the input source name labelsTakashi Iwai2010-09-091-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>
* | ALSA: hda - Remove AUTO_PIN_FRONT_{MIC|LINE}Takashi Iwai2010-09-091-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>
* | ALSA: hda - Keep char arrays in input_mux itemsTakashi Iwai2010-09-091-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>
* | ALSA: hda - Use new inputs[] field to parse input-pins for AD codecsTakashi Iwai2010-08-301-12/+18
|/ | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposedJerone Young2010-08-031-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>
OpenPOWER on IntegriCloud