aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
AgeCommit message (Collapse)AuthorFilesLines
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>
2011-11-02ALSA: hda - Disable power-widget control for IDT 92HD83/93 as defaultCharles Chin1-19/+1
The power-widget control in patch_stac92hd83xxx() never worked properly, thus it's safer to turn it off as default for now. Signed-off-by: Charles Chin <Charles.Chin@idt.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker1-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>
2011-10-13ALSA: hda - Remove bad code for IDT 92HD83 family patchCharles Chin1-18/+0
The purpose of this patch is to remove a section of "bad" code that assigns the last DAC to ports E or F in order to support notebooks with docking in earlier days, around ALSA 1.0.19 - 21. This is not necessary now and actually breaks some configurations that use these ports as other devices. This have been tested on several different configurations to make sure that it is working for different combinations. Signed-off-by: Charles Chin <Charles.Chin@idt.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-05ALSA: HDA: Fix DAC assignment for secondary headphone on Sigmatel/IDTDavid Henningsson1-3/+15
If we run out of DACs when trying to assign a DAC to a secondary headphone, prefer the DAC of the first headphone to the primary (usually line out) DAC. BugLink: http://bugs.launchpad.net/bugs/845275 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-03ALSA: HDA: Fix naming of input jacks for IDT parserDavid Henningsson1-11/+3
The Sigmatel/IDT parser should have the same naming convention for input jacks as the other codecs have. BugLink: http://bugs.launchpad.net/bugs/859704 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-24ALSA: HDA: No power nids on 92HD93David Henningsson1-0/+1
This patch is necessary to make internal speakers work on this chip. Cc: stable@kernel.org BugLink: http://bugs.launchpad.net/bugs/854468 Tested-by: Alex Wolfson <alex.wolfson@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-20ALSA: HDA: Add support for IDT 92HD93David Henningsson1-0/+1
Cc: stable@kernel.org BugLink: http://bugs.launchpad.net/bugs/854468 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-10ALSA: hda - Add CONFIG_SND_HDA_POWER_SAVE to stac_vrefout_set()Wang Shaoyan1-0/+2
In commit 45eebda7, it add new function stac_vrefout_set, but it is only used in code between CONFIG_SND_HDA_POWER_SAVE macro, so add the macro to avoid such warning: sound/pci/hda/patch_sigmatel.c:676:12: warning: 'stac_vrefout_set' defined but not used Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-27ALSA: hda - Add support for vref-out based mute LED control on IDT codecsVitaliy Kulikov1-43/+156
This patch also registers all necessary callbacks to support mute LED only when such control is enabled. And it keeps codec AFG in D0 or D1 state all the time when aggressive power managemnt is enabled for vref-out control (and mute LED) work correctly. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PMTakashi Iwai1-3/+3
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-07-26ALSA: hda - Make sure mute led reflects master mute stateVitaliy Kulikov1-18/+35
This patch adds checking of mute state on all outputs besides just speakers to calculate the master mute state for mute led support. It also renames and splits the function that does it for better code clarity. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26ALSA: hda - Fix invalid mute led state on resume of IDT codecsVitaliy Kulikov1-0/+12
Codec state is not restored immediately on resume but on the first access when power-save is enabled. That leads to an invalid mute led state after resume until either sound is played or some control is changed. This patch adds a possibility for a vendor specific patch to restore codec state immediately after resume if required. And it adds code to restore IDT codecs state immediately on resume on HP systems with mute led support. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-24ALSA: hda - Add support of the 4 internal speakers on certain HP laptopsVitaliy Kulikov1-1/+50
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-29ALSA: hda - Create snd_hda_get_conn_index() helper functionTakashi Iwai1-24/+3
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>
2011-06-06ALSA: hda: Virtualize SPDIF out controlsStephen Warren1-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>
2011-05-17ALSA: hda - Handle dock line-in as auto-detectable for IDT codecsTakashi Iwai1-4/+8
When a docking-station has a line-in jack, we can handle it also as a detectable jack just like mic-in. This will improve the usability of HP laptops with a docking-station. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17ALSA: hda - Check unsol-cap in is_jack_detectalbe()Takashi Iwai1-7/+4
Also replace more open-codes with this function. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16ALSA: HDA: Use one dmic only for Dell Studio 1558David Henningsson1-1/+1
There are no signs of a dmic at node 0x0b, so the user is left with an additional internal mic which does not exist. This commit removes that non-existing mic. Cc: stable@kernel.org (2.6.32+) BugLink: http://bugs.launchpad.net/bugs/731706 Reported-by: James Page <james.page@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02ALSA: hda - Constify fixup and other array data in patch_sigmatel.cTakashi Iwai1-195/+199
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02ALSA: hda - Constify some API function argumentsTakashi Iwai1-1/+2
Also fixed the assignment of multiout.dac_nids to satisfy const. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-1/+1
2011-04-26ALSA: hda - Enable sync_write workaround for AMD genericallyTakashi Iwai1-16/+0
The workaround for AMD chipset via sync_write flag seems needed for machines with Realtek codecs. So, it's better to activate it generically in hda_intel.c from the beginning. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-0/+3
2011-04-21ALSA: hda - Enable sync_write for AMD chipset with IDT 92HD8x codecsTakashi Iwai1-0/+7
The AMD chipset seems unstable in the normal operation mode, and it seems requring more sensible access for each verb. Enabling sync_write mode and allowing bus-reset is a sort of workaround for these chipset stability issues. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-10Merge branch 'for-linus' of ↵Linus Torvalds1-0/+3
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Don't query connections for widgets have no connections ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E) ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable ALSA: HDA: Fix dock mic for Lenovo X220-tablet ASoC: format_register_str: Don't clip register values ASoC: PXA: Fix oops in __pxa2xx_pcm_prepare ASoC: zylonite: set .codec_dai_name in initializer
2011-04-07ALSA: hda - Don't query connections for widgets have no connectionsTakashi Iwai1-0/+3
Fixes the kernel warnings with IDT codecs like hda_codec: connection list not available for 0x1e Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>