summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_analog.c
AgeCommit message (Collapse)Author
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>
2011-05-02ALSA: hda - Constify some API function argumentsTakashi Iwai
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 Iwai
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 Henningsson
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 Yau
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18ALSA: hda - consitify string arraysTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18ALSA: hda - Add add multi-streaming playback for AD1988Raymond Yau
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 Henningsson
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 Iwai
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 Iwai
2010-09-21ALSA: hda - Add Dell Latitude E6400 model quirkLuke Yelavich
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 Iwai
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 Iwai
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 Iwai
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 Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposedJerone Young
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 Iwai
2010-04-19ALSA: hda - Fix resume from StR of HP 2510p with docking-stationTakashi Iwai
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 Iwai
2010-03-31ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981Daniel T Chen
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 Kysela
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 Iwai
2010-02-22ALSA: hda: Use 3stack quirk for Toshiba Satellite L40-10QDaniel T Chen
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 Kysela
2010-01-21ALSA: hda - AD1988 codec - fix SPDIF-input mixer initialization (unmute)Jaroslav Kysela
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 Iwai
Conflicts: sound/pci/hda/patch_realtek.c
2009-12-28ALSA: hda: Add powerdown for Analog Devices HDA codecsDaniel T Chen
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 Iwai
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 Iwai
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 Iwai
2009-12-15ALSA: hda - simplify usage of HDA_SUBDEV_AMP_FLAGJaroslav Kysela
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 Kysela
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 Kysela
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 Chen
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 Iwai
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 Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16ALSA: hda - Fix build errors with CONFIG_SND_HDA_INPUT_BEEP=nTakashi Iwai
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 Iwai
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 Kysela
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 Kysela
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 Kysela
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 Barros
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 Iwai
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>