summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_conexant.c
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda - Use auto-parser for HP laptops with cx20459 codecTakashi Iwai2012-01-101-2/+0
| | | | | | | | | | | | These laptops can work well with the auto-parser and their BIOS setups, and in addition, the auto-parser fixes the problem with S3/S4 where the unsol event handling is killed after resume due to fallback to the single-cmd mode. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740115 Cc: <stable@kernel.org> [v3.1+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Integrate input-jack stuff into kctl-jackTakashi Iwai2011-12-011-44/+8
| | | | | | | | | | | | Instead of managing input-jack stuff separately, call all stuff inside the kctl-jack creation, deletion and report. The caller no longer needs to care about input-jack. The better integration between input-jack and kctl-jack should be done in the upper layer in near future, but for now, it's implemented locally for more tests. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Merge input-jack helpers to hda_jack.cTakashi Iwai2011-11-161-1/+0
| | | | | | | We can use the very same table in hda_jack.c for managing the list for input-jack elements, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Manage unsol tags in hda_jack.cTakashi Iwai2011-11-161-4/+4
| | | | | | | | | | | | | Manage the tags assigned for unsolicited events dynamically together with the jack-detection routines. Basically this is almost same as what we've done in patch_sigmatel.c. Assign the new tag number for each new unsol event, associate with the given NID and the action type, etc. With this change, now all pins looked over in snd_hda_jack_add_kctls() are actually enabled for detection now even if the pins aren't used for jack-retasking by the driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Create jack-detection kcontrolsTakashi Iwai2011-11-161-0/+2
| | | | | | | | | | | | | | | | Create kcontrols for pin jack-detections, which work similarly like jack-input layer. Each control will notify when the jack is plugged or unplugged, and also user can read the value at any time via the normal control API. The control elements are created with iface=CARD, so that they won't appear in the mixer apps. So far, only the pins that enabled the jack-detection are registered. For covering all pins, the transition of the common unsol-tag handling would be needed. Stay tuned. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Cache the jack-detection valueTakashi Iwai2011-11-161-11/+9
| | | | | | | | | | | | | | | | | | | 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>
* ALSA: HDA: Remove quirk for Toshiba T110David Henningsson2011-11-091-1/+0
| | | | | | | | | | According to the bug reporter, model=auto is needed to make the internal microphone work. BugLink: https://bugs.launchpad.net/bugs/819699 Reported-by: Andrej (agno01) Signed-off-by: David Henningsson <david.henningsson@canonical.com> 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 - Fix ADC input-amp handling for Cx20549 codecTakashi Iwai2011-10-271-2/+27
| | | | | | | | | | | | | | | | | | | | It seems that Conexant CX20549 chip handle only a single input-amp even though the audio-input widget has multiple sources. This has been never clear, and I implemented in the current way based on the debug information I got at the early time -- the device reacts individual input-amp values for different sources. This is true for another Conexant codec, but it's not applied to CX20549 actually. This patch changes the auto-parser code to handle a single input-amp per audio-in widget for CX20549. After applying this, you'll see only a single "Capture" volume control instead of separate "Mic" or "Line" captures when the device is set up to use a single ADC. We haven't tested 20551 and 20561 codecs yet. If these show the similar behavior like 20549, they need to set spec->single_adc_amp=1, too. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Keep EAPD turned on for old Conexant chipsTakashi Iwai2011-10-271-21/+22
| | | | | | | | | | | | | In the old Conexant chips (5045, 5047, 5051 and 5066), a single EAPD may handle both headphone and speaker outputs while it's assigned only to one of them. Turning off dynamically leads to the unexpected silent output in such a configuration with the auto-mute function. Since it's difficult to know how the EAPD is handled in the actual h/w implementation, better to keep EAPD on while running for such codecs. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-10-191-0/+1
|\
| * ALSA: HDA: conexant support for Lenovo T520/W520Daniel Suchy2011-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is patch for Conexant codec of Intel HDA driver, adding new quirk for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for T520 (similar subsystem ID is used also in W520 model) and detects more mixer features compared to generic (fallback) Lenovo quirk with hardcoded options in Conexant codec. Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any problems. Signed-off-by: Daniel Suchy <danny@danysek.cz> Cc: <stable@kernel.org> [3.0+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-09-201-19/+27
|\|
| * ALSA: hda: Conexant: Allow different output types to share DACDavid Henningsson2011-08-251-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | Headphones has stopped working for the original reported (a regression compared to 2.6.38). This is because Speaker and Headphones share the same DAC, in which case no Headphones volume control was created. This patch fixes so that both Speaker and Headphones volume controls are created in such scenario. BugLink: http://bugs.launchpad.net/bugs/817943 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Rewrite Lenovo X200 quirk with pincfg-fix using auto-parserTakashi Iwai2011-08-241-43/+50
|/ | | | | | | | | | Introduce the pincfg table to patch_conexant.c for fixing up the extra pin-configuration for auto-parser. As an example, Lenovo X200 model is replaced with this new mechanism. (This also fixes the wrong mixer elements for docking-station I/O in the previous model quirk automagically.) Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/conexant - Enable ADC-switching for auto-mic mode, tooTakashi Iwai2011-08-241-1/+1
| | | | | | The ADC-switching can work also in the auto-mic mode, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix double-headphone/speaker paths for Cxt auto-parserTakashi Iwai2011-08-231-3/+10
| | | | | | | | | When multiple headphones or speakers are assigned but no individual DACs are available, the driver should take the first HP/SPK DAC instead of another primary output. The patch adds a bit-flag to dac field of struct pin_dac_pair indicating that it's a slave DAC. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Allow codec-specific set_power_state opsTakashi Iwai2011-07-261-0/+14
| | | | | | | | | | | | | | The procedure for codec D-state change may have exceptional cases depending on the codec chip, such as a longer delay or suppressing D3. This patch adds a new codec ops, set_power_state() to override the system default function. For ease of porting, snd_hda_codec_set_power_to_all() helper function is extracted from the default set_power_state() function. As an example, the Conexant codec-specific delay is removed from the default routine but moved to patch_conexant.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Turn on extra EAPDs on Conexant codecsTakashi Iwai2011-07-111-0/+39
| | | | | | | | | Some machines seem to use EAPD control of the unused pin for controlling the overall EAPD. Since the driver currently doesn't check the EAPD of unused pins, the EAPD isn't enabled. For avoiding such a problem, turn all extra EAPDs on as default. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Enable auto-parser as default for Conexant codecsTakashi Iwai2011-06-291-12/+4
| | | | | | Let's use auto-parser as default now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-06-291-0/+4
|\
| * ALSA: HDA: Add model=auto quirk for Acer Aspire 3830TGDavid Henningsson2011-06-281-0/+1
| | | | | | | | | | | | | | | | Since we're not using the new auto parser as a fallback yet, add it manually as a quirk. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: HDA: Add a new Conexant codec ID (506c)David Henningsson2011-06-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | Conexant ID 506c was found on Acer Aspire 3830TG. As users report no playback, sending to stable should be safe. Cc: stable@kernel.org BugLink: https://bugs.launchpad.net/bugs/783582 Reported-by: andROOM Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Create snd_hda_get_conn_index() helper functionTakashi Iwai2011-06-291-13/+2
| | | | | | | | | | | | | | | | Create snd_hda_get_conn_index() helper function for obtaining the connection index of the widget. Replaced the similar codes used in several codec-drivers with this common helper. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-06-131-0/+1
|\|
| * ALSA: hda: Fix inaudible internal speakers on CyberpowerPC Gamer Xplorer ↵Daniel T Chen2011-06-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | N57001 laptop BugLink: https://launchpad.net/bugs/761171 The original reporter needs the model=auto quirk for his internal speakers to be audible in the latest daily snapshot, so add an entry in the quirk table for his PCI SSID. A trivially different version of this patch using the model=asus quirk should be applied to the 2.6.38 and 2.6.39 stable kernels. We don't use the asus quirk in 3.0-rc2, because 3.0-rc2's autoparser is much improved. Reported-and-tested-by: tomdeering7 Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda: Virtualize SPDIF out controlsStephen Warren2011-06-061-0/+1
|/ | | | | | | | | | | | | | | | | | 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 - Use model=auto for Lenovo G555Takashi Iwai2011-05-251-0/+1
| | | | | | The new auto-parser fixes problems on Lenovo G555. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix speaker auto-mute in Cxt auto-parserTakashi Iwai2011-05-241-12/+21
| | | | | | | Fix some logic failures in auto-mute handling in Conexant auto-parser. Also, modify codes to be a bit more understandable. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix initial capture-source with auto-mic for Cxt auto-parserTakashi Iwai2011-05-231-2/+3
| | | | | | | Fix the initialization of capture-source route when auto-mic is enabled for Conexant auto-parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix auto-mic detection in Conexant codec-parserTakashi Iwai2011-05-231-1/+1
| | | | | | | Fix the auto-mic detection for Cxt auto-parser due to off-by-one missing initialization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: HDA: Add quirk for Lenovo U350David Henningsson2011-05-231-0/+1
| | | | | | | | | | | Add model=asus quirk for Lenovo Ideapad U350 to make internal mic work correctly. Cc: stable@kernel.org (2.6.38+) BugLink: http://bugs.launchpad.net/bugs/751681 Reported-by: Kent Baxley <kent.baxley@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Handle dock line-in as auto-detecable for Cxt auto-parserTakashi Iwai2011-05-171-5/+7
| | | | | | Similar process like in patch_realtek.c and patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add support of dock-mic detection to Conexant auto-parserTakashi Iwai2011-05-171-39/+59
| | | | | | | | | In addition to the normal external mic jack, check also the mic jack on a docking-station as well, and select the input source appropriately. The similar functionality was already implemented in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add automute-mode enum to Conexant auto-parserTakashi Iwai2011-05-171-49/+210
| | | | | | | | Implement the same functionality as Realtek's auto-mute mode control. Now Conexant auto-parser can also mutes line-out and provide the enum control for different automute behavior. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add missing Front/Surround/CLFE as slaves for Cxt auto-parserTakashi Iwai2011-05-171-0/+6
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Code refactoring in patch_conexant.cTakashi Iwai2011-05-171-30/+34
| | | | | | | Use a struct instead of each array for managing input-source info for auto-parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add support of auto-parser to cxt5066 codecsTakashi Iwai2011-05-161-2/+11
| | | | | | | Still experimental. Not enabled as default unless model=auto is passed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Don't create multiple same volume/boost controls in Cxt auto-parserTakashi Iwai2011-05-161-2/+13
| | | | | | | Check the routing more exactly for avoiding the duplicated controls for the very same effect for multiple capture routes in Conexant auto-parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Build boost controls from selector widget in Cxt auto-parserTakashi Iwai2011-05-161-18/+61
| | | | | | | When the intermediate selector widget in the capture path provides the boost volume, create the corresponding volume control. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Don't use auto-parser for cxt5045 / 5051 as defaultTakashi Iwai2011-05-151-0/+4
| | | | | | | Just for safety reason (for avoiding any possible regressions), don't enable auto-parser as default for cxt5045 and 5051, as well as 5047. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Enable codec->pin_amp_workaround always for Conexant auto-parserTakashi Iwai2011-05-151-11/+1
| | | | | | It can (must for some) be used for all Conexnat codecs safely. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Search ADC NIDs dynamically in Conexant auto-parserTakashi Iwai2011-05-151-14/+26
| | | | | | | Instead of giving fixed arrays, look for ADC nids dynamically in the tree in Conexant auto-parser code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add support of auto-parser to cxt5047 / CX20551 WaikikiTakashi Iwai2011-05-131-3/+18
| | | | | | | | | | | Similarly like other Conexant codecs, now model=auto is supported for cxt5047. But the auto-parser mode isn't activated as default yet, since BIOS pin-configs seem often broken on machines with this codec. User need to pass model=auto explicitly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Parse more deep input-source routes in Conexant auto-parserTakashi Iwai2011-05-131-21/+52
| | | | | | | Handle not only a single-depth input-route but two-level depth routes (PIN->MUX->ADC), too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Clean up input-mux handling in Conexant auto-parserTakashi Iwai2011-05-131-9/+10
| | | | | | | Keep the registered input-pins in imux_pins[], and fix the inconsistent use of sepc->auto_mic_ext. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add auto-parser support to cxt5045 / CX20549 VeniceTakashi Iwai2011-05-131-19/+65
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add auto-parser support to cxt5051 / CX20561 HermosaTakashi Iwai2011-05-131-62/+217
| | | | | | | Extend the existing auto-parser for CX2064x for cxt5051 codec. Now the auto-parser supports ADC-switching for this codec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Check AMP CAP at initialization of Conexant auto-parserTakashi Iwai2011-05-131-8/+20
| | | | | | Some codecs have no mute caps in audio I/O widgets. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Turn on EAPD dynamically per jack plug in Conexant auto modeTakashi Iwai2011-05-131-8/+17
| | | | | | | Instead of keeping always EAPD on, turn on/off appropriately at jack plugging in Conexant auto-parser mode. Signed-off-by: Takashi Iwai <tiwai@suse.de>