aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
AgeCommit message (Collapse)AuthorFilesLines
2012-06-26ALSA: hda - Fix power-map regression for HP dv6 & coTakashi Iwai1-1/+6
The recent fix for power-map controls (commit b0791dda813) caused regressions on some other HP laptops. They have fixed pins but these pins are exposed as jack-detectable. Thus the driver tries to control the power-map dynamically per jack detection where it never gets on. This patch adds the check of connection and it assumes the no jack detection is available for fixed pins no matter what pin capability says. BugLink: http://bugs.launchpad.net/bugs/1013183 Reported-by: Luis Henriques <luis.henriques@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15ALSA: hda/idt - Cache the power-map bitsTakashi Iwai1-3/+18
For avoiding unnecessary codec read/write verbs at each jack detection. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15ALSA: hda/idt - Clean up power-map check codeTakashi Iwai1-10/+9
Turn off the power-map for unused ports and check the jack-detection capability in the first place. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-3/+3
2012-05-15ALSA: hda - Evaluate gpio_led hints at the right momentTakashi Iwai1-7/+5
The hints regarding the mute-LED must be evaluated during the codec parsing. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15ALSA: hda/idt - Fix power-map for speaker-pins with some HP laptopsTakashi Iwai1-3/+3
BIOS on some HP laptops don't set the speaker-pins as fixed but expose as jacks, and this confuses the driver as if these pins are jack-detectable. As a result, the machine doesn't get sounds from speakers because the driver prepares the power-map update via jack unsol events which never come up in reality. The bug was introduced in some time in 3.2 for enabling the power-mapping feature. This patch fixes the problem by replacing the check of the persistent power-map bits with a proper is_jack_detectable() call. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43240 Cc: <stable@vger.kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-09ALSA: hda - Remove pre_resume and post_suspend opsTakashi Iwai1-21/+0
Since the recent commit, the resume procedure is always performed at the resume time. This makes the pre_resume hack for VREF mute LED on some HP laptops superfluous. As this is the only user of pre_resume (and there is no user of post_suspend) ops, let's kill them again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08ALSA: hda - Move BIOS pin-parser code to hda_auto_parser.cTakashi Iwai1-0/+1
Just code shuffles. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20ALSA: hda - Add snd_hda_get_default_vref() helper functionTakashi Iwai1-21/+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>
2012-04-20ALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functionsTakashi Iwai1-14/+6
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-04-19ALSA: hda/sigmatel - Fix inverted mute LEDTakashi Iwai1-3/+2
While refactoring the mute-LED handling for HP laptops, I messed up the polarity check in a wrong way. The red (or the mute-LED if any) should appear in the muted state, corresponding to GPIO on. Reported-by: Mikko Vinni <mmvinni@yahoo.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-16ALSA: hda - Fix build with CONFIG_PM=nTakashi Iwai1-0/+9
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-14ALSA: hda - Fix build of patch_sigmatel.c without CONFIG_SND_HDA_POWER_SAVETakashi Iwai1-8/+0
Now the mute-LED is controlled without powersave hack, and the ifdefs must be removed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13ALSA: hda - Add expose_enum_ctl flag to snd_hda_add_vmaster_hook()Takashi Iwai1-1/+1
Since it's not always safe to assume that the vmaster hook is purely the mute-LED control, add the flag indicating whether to expose the mute-LED enum control or not. Currently, conexant codec sets this off for non-HP laptops where EAPD may be used really as EAPD. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13ALSA: hda - Add "Mute-LED Mode" enum controlTakashi Iwai1-6/+7
Create snd_hda_add_vmaster_hook() and snd_hda_sync_vmaster_hook() helper functions to handle the mute-LED in vmaster hook more commonly. In the former function, a new enum control "Mute-LED Mode" is added. This provides user to choose whether the mute-LED should be turned on/off explicitly or to follow the master-mute status. Reviewed-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-12ALSA: hda - Rewrite the mute-LED hook with vmaster hook in patch_sigmatel.cTakashi Iwai1-87/+49
The mute-LED is controlled in patch_sigmatel.c by (ab-)using the powersave hook. This can be now rewritten with the vmaster hook instead, which is much simpler and can work even without CONFIG_SND_HDA_POWER_SAVE kconfig. A drawback is that the mute-LED corresponds _only_ to the Master mixer switch instead of checking the whole DACs. But usually this shouldn't be a big problem as PA enables the mixer elements accordingly. Also, this patch changes the code to create vmaster always even on STAC9200 and STAC925x. The former "Master" on these chips are renamed as "PCM" now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-02Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-1/+1
Speaker-Out renames are merged. Conflicts: sound/pci/hda/patch_realtek.c
2012-02-29ALSA: hda - Always set HP pin in unsol handler for STAC/IDT codecsTakashi Iwai1-1/+1
A bug report with an old Sony laptop showed that we can't rely on BIOS setting the pins of headphones but the driver should set always by itself. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-28ALSA: hda - Fix audio playback support on HP Zephyr systemVitaliy Kulikov1-0/+36
Enables port E of IDT 92HD91 codec as output and sets correct output phase between ports E and D and high pass filter. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-2/+2
Necessary for working on the jack-detection suppression feature.
2012-02-09ALSA: hda - Fix mute-LED VREF value for new HP laptopsTakashi Iwai1-2/+2
The new HP laptops turns off the mute LED with VREF50 or VREF80, but not in HIZ unlike the previous models. Since VREF50 (also 80) works with the previous models, let's use VREF50 for all. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-03ALSA: hda - Add suffix argument to snd_hda_add_vmaster()Takashi Iwai1-22/+7
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>
2012-01-25ALSA: hda: set mute led polarity for laptops with buggy BIOS based on SSIDGustavo Maciel Dias Vieira1-1/+8
HP laptop models with buggy BIOS are apparently frequent, including machines with different codecs. Set the polarity of the mute led based on the SSID and include an entry for the HP Mini 110-3100. Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org> Tested-by: Predrag Ivanovic <predivan@open.telekom.rs> Cc: <stable@kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptopsTakashi Iwai1-3/+5
The recent change of the power-widget handling for IDT codecs caused the silent output from the docking-station line-out jack. This was partially fixed by the commit f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33 "ALSA: hda - Fix the lost power-setup of seconary pins after PM resume". But the line-out on the docking-station is still silent when booted with the jack plugged even by this fix. The remainig bug is that the power-widget is set off in stac92xx_init() because the pins in cfg->line_out_pins[] aren't checked there properly but only hp_pins[] are checked in is_nid_hp_pin(). This patch fixes the problem by checking both HP and line-out pins and leaving the power-map correctly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42637 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-20snd-hda-intel: better Alienware M17x R3 quirkAlbert Pool1-1/+1
I have been told that this way the rear headphone connector is working as well; with model=alienware only laptop speakers work. The subsystem of both controller and codec is 1028:0490. Signed-off-by: Albert Pool <albertpool@solcon.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-16ALSA: HDA: Fix internal microphone on Dell Studio 16 XPS 1645David Henningsson1-1/+1
More than one user reports that changing the model from "both" to "dmic" makes their Internal Mic work. Cc: stable@kernel.org Tested-by: Martin Ling <martin-launchpad@earth.li> BugLink: https://bugs.launchpad.net/bugs/795823 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11ALSA: hda - Fix the lost power-setup of seconary pins after PM resumeTakashi Iwai1-13/+23
When multiple headphone or other detectable output pins are present, the power-map has to be updated after resume appropriately, but the current driver doesn't check all pins but only the first pin (since it's enough to check it for the mute-behavior). This resulted in the silent output from the secondary outputs after PM resume. This patch fixes the problem by checking all pins at (re-)init time. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740347 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-20Merge branch 'test/hda-jack' into topic/hdaTakashi Iwai1-139/+57
Conflicts: sound/pci/hda/patch_hdmi.c sound/pci/hda/patch_via.c
2011-12-20Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-0/+6
2011-12-14ALSA: hda: remove unused quirk for inverted mute ledGustavo Maciel Dias Vieira1-4/+0
Commit b99a776d0b17ae0f3a54e86009887a00ac4889d0 removed all effects of the STAC92HD83* model quirk "hp". However, it left the model selection and documentation behind, confusing users with inverted mute leds. Completely remove this quirk and its documentation. Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-13ALSA: hda: fix mute led polarity for HP laptops with buggy BIOSGustavo Maciel Dias Vieira1-0/+6
Some HP laptop models do not have a properly filled OEM string used to set the gpio and polarity of the mute led. Make the mute led configuration work for this case. Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-13ALSA: hda - GPIO to control mute LED may be enabled on HP systems with no ↵Vitaliy Kulikov1-5/+7
such HW This may lead to problems (like loss of sound) as GPIO pin may be used for different function (SPDIF OUT, EAPD etc) on those systems. This patch disables default mute LED GPIO configuration on all new codecs as all new HP systems are expected to provide explicit mute LED configuration in SMBIOS. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-06ALSA: hda - Fix remaining VREF mute-LED NID check in post-3.1 changesTakashi Iwai1-1/+1
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-06Merge branch 'fix/hda-idt-fix' into fix/hdaTakashi Iwai1-21/+24
2011-12-06ALSA: hda - Fix GPIO LED setup for IDT 92HD75 codecsTakashi Iwai1-21/+24
Some HP laptops with IDT 92HD75 codecs may use a GPIO > 4 for the mute LED, but currently the driver doesn't check this properly, and confuses the mute LED behavior. This ended up with the silent output on some HP laptops due to having another GPIO used as external amp control. This patch fixes the problem by checking the max GPIO count and comparing with the given value from DMI entry instead of magic fixed value 4 and 8, and adding a new field to indicate the VREF mute-LED behavior. Reported-and-tested-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Cc: <stable@kernel.org> [v3.1] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-01ALSA: hda - Integrate input-jack stuff into kctl-jackTakashi Iwai1-46/+0
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>
2011-12-01ALSA: hda - Fix S3/S4 problem on machines with VREF-pin mute-LEDCharles Chin1-18/+0
The verb command in stac92xx_post_suspend caused the audio to stop working after resuming from S3 mode on HP laptops with the VREF-pin mute-LED control. Removing relevant post_suspend registering. Although removing D3 on AFG is no optimal solution, the impact should be small in comparison with the broken S3/S4. Signed-off-by: Charles Chin <Charles.Chin@idt.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-29ALSA: hda - Avoid touching mute-VREF pin for IDT codecsTakashi Iwai1-1/+3
Some HP laptops use a pin VREF for controlling the mute LED, and such a pin shouldn't be powered off. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-19ALSA: hda - Add pin fix for Alienware M17x R3Takashi Iwai1-0/+2
Reported-by: Albert Pool <albertpool@solcon.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Give more unique names by snd_hda_get_pin_label()Takashi Iwai1-3/+5
The function now gives more unique names for the output pins by adding some prefix and suffix for the location and the channels. Otherwise, it can pass the index number. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Merge input-jack helpers to hda_jack.cTakashi Iwai1-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>
2011-11-16ALSA: hda - Manage unsol tags in hda_jack.cTakashi Iwai1-78/+26
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>
2011-11-16ALSA: hda - Create jack-detection kcontrolsTakashi Iwai1-0/+7
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>
2011-11-16ALSA: hda - Cache the jack-detection valueTakashi Iwai1-19/+27
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-11-16ALSA: hda - Introduce snd_hda_get_pin_label()Takashi Iwai1-2/+2
Create a new helper function snd_hda_get_pin_label() for getting a label string for both input and output pins. hda_get_input_pin_label() is obsoleted by this function, and the callers are replaced appropriately now by this patch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-11ALSA: hda - pwr_nids cleanup for IDT codecsCharles Chin1-24/+9
Clean up and fix pwr_nids for 92HD71 / 73 / 83 family codecs; remove pwr_mapping which was incorrect. The original pwr_nids support of 92HD83xxx was incorrect and never actually worked before. Now we should have things working correctly without having to hack by DID anymore. It is also not necessary to explicitly turn on all the pins near the beginning of patch_stac92hd83xxx() now, the pins will go though initialization properly. Tested on 92HD66 / 71 / 73 / 75 / 83 / 89 / 91 demo boards. Signed-off-by: Charles Chin <Charles.Chin@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: hda - fix internal mic on Dell Vostro 3500 laptopJulian Wollrath1-0/+11
Fix the not working internal mic on Dell Vostro 3500 laptop by introducing the new model dell-vostro-3500. Signed-off-by: Julian Wollrath <jwollrath@web.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-06Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
2011-11-03ALSA: hda/sigmatel - Automatically retrieve digital I/O widgetsCharles Chin1-13/+26
Revise stac92xx_parse_auto_config to automatically scan for digital input and output converters. Signed-off-by: Charles Chin <Charles.Chin@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-02ALSA: hda - Add support for 92HD65 / 92HD66 family of codecsCharles Chin1-1/+17
These codecs have SPDIF-in, which is new to the 92HD83xxx compatible families, so a bit of logic is added to support them. Signed-off-by: Charles Chin <Charles.Chin@idt.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>