summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_analog.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Merge branch 'fix/hda' into topic/hdaTakashi Iwai2010-05-061-9/+0
|\
| * ALSA: hda - Fix resume from StR of HP 2510p with docking-stationTakashi Iwai2010-04-191-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>
* | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2010-04-011-0/+8
|\ \ | |/
| * ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981Daniel T Chen2010-03-311-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>
* | ALSA: hda-intel - AD1984 thinkpad - add analog beep input controlJaroslav Kysela2010-03-261-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>
* Merge branch 'topic/hda' into for-linusTakashi Iwai2010-03-011-1/+1
|\
| * ALSA: hda: Use 3stack quirk for Toshiba Satellite L40-10QDaniel T Chen2010-02-221-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>
| * Merge branch 'fix/hda' into topic/hdaTakashi Iwai2010-01-191-0/+16
| |\ | | | | | | | | | | | | Conflicts: sound/pci/hda/patch_realtek.c
* | \ Merge branch 'fixes' into develJaroslav Kysela2010-02-161-0/+16
|\ \ \ | | |/ | |/|
| * | ALSA: hda - Disable tigger at pin-sensing on AD codecsTakashi Iwai2009-12-251-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>
* | | ALSA: hda - AD1988 codec - fix SPDIF-input mixer initialization (unmute)Jaroslav Kysela2010-01-211-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>
* | ALSA: hda: Add powerdown for Analog Devices HDA codecsDaniel T Chen2009-12-281-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>
* | ALSA: hda - Fix NID association for capture mixersTakashi Iwai2009-12-231-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>
* | Merge remote branch 'alsa/devel' into topic/hdaTakashi Iwai2009-12-151-4/+33
|\ \ | |/ |/|
| * ALSA: hda - simplify usage of HDA_SUBDEV_AMP_FLAGJaroslav Kysela2009-12-151-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>
| * ALSA: hda - introduce HDA_SUBDEV_AMP_FLAG (ControlAmp in proc)Jaroslav Kysela2009-12-151-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>
| * ALSA: hda - add more NID->Control mappingJaroslav Kysela2009-12-151-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>
* | ALSA: hda: Fix max PCM level to 0 dB for AD1981_HPDaniel T Chen2009-12-141-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>
* ALSA: hda - Generalize EAPD inversion check in patch_analog.cTakashi Iwai2009-12-081-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>
* ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()Takashi Iwai2009-11-181-31/+16
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix build errors with CONFIG_SND_HDA_INPUT_BEEP=nTakashi Iwai2009-11-161-0/+6
| | | | | | Disable beep-related codes when CONFIG_SND_HDA_INPUT_BEEP isn't set. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Get rid of magic digits for subdev hackTakashi Iwai2009-11-161-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>
* ALSA: hda - proc - add support for dynamic controls to mixer<->NID mappingJaroslav Kysela2009-11-161-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>
OpenPOWER on IntegriCloud