summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_sigmatel.c
AgeCommit message (Collapse)Author
2014-03-06ALSA: hda - Add a fixup for HP Folio 13 mute LEDTakashi Iwai
commit 37c367ecdb9a01c9acc980e6e17913570a1788a7 upstream. HP Folio 13 may have a broken BIOS that doesn't set up the mute LED GPIO properly, and the driver guesses it wrongly, too. Add a new fixup entry for setting the GPIO pin statically for this laptop. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70991 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06ALSA: hda - Enable front audio jacks on one HP desktop modelHui Wang
commit 1de7ca5e844866f56bebb2fc47fa18e090677e88 upstream. The front headphone and mic jackes on a HP desktop model (Vendor Id: 0x111d76c7 Subsystem Id: 0x103c2b17) can not work, the codec on this machine has 8 physical ports, 6 of them are routed to rear jackes and all of them work very well, while the remaining 2 ports are routed to front headphone and mic jackes, but the corresponding pin complex node are not defined correctly. After apply this fix, the front audio jackes can work very well. [trivial fix of enum definition by tiwai] BugLink: https://bugs.launchpad.net/bugs/1282369 Cc: David Henningsson <david.henningsson@canonical.com> Tested-by: Gerald Yang <gerald.yang@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-11ALSA: hda - Fix missing fixup for Mac Mini with STAC9221Takashi Iwai
commit 697aebab78a88c6b164cfb74d19b86817d2ccd82 upstream. A fixup for Apple Mac Mini was lost during the adaption to the generic parser because the fallback for the generic ID 8384:7680 was dropped, and it resulted in the silence output (and maybe other problems). Unfortunately, just adding the missing subsystem ID wasn't enough, in this case. The subsystem ID of this machine is 0000:0100 (what Apple thought...?), and since snd_hda_pick_fixup() doesn't take the vendor id zero into account, the driver ignored this entry. Now it's fixed to regard the vendor id zero as a valid value. Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-28ALSA: hda - Fix EAPD GPIO control for Sigmatel codecsTakashi Iwai
commit 1ea9a69d1a36a5b62bf281ba8bb304fcac656dad upstream. The EAPD GPIO is dynamically turned on/off for some machines with Sigmatel codecs, but this didn't work as expected, and it resulted in spontaneous lost of speaker outputs per HP plugging or power-saving. This patch fixes the bug by simply including spec->eapd_mask into spec->gpio_mask and spec->gpio_data bits. Reported-and-tested-by: Eric Shattow <lucent@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-28ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n LaptopTakashi Iwai
commit f3e351eef3a7fd1e36a3e18d4f2f069b00deb23c upstream. The quirk for Dell laptops with STAC9228 overrides the pin default config of NID 0x0f to the value with AC_DEFCFG_MISC_NO_PRESENCE bit on. I'm not quite sure why this was done so, but can guess that this was introduced for avoiding this to be muted by another headphone plug. Now, after transition to the generic parser, this workaround rather causes a problem (notably as unexpected speaker mutes) because the pin is seen as if it's always plugged in. Since the generic parser can handle multiple headphone plugging gracefully, we can get rid of this override now. Reported-and-tested-by: Eric Shattow <lucent@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-21ALSA: hda - Enable "Headset Mic" name for some Dell Latitude devicesDavid Henningsson
Now that we have a "Headset Mic" name, let's use it for some devices we know for sure has a headset mic jack. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18ALSA: hda - Move beep attach/detach calls in hda_generic.cTakashi Iwai
Instead of calling snd_hda_attach_beep_device() and snd_hda_detach_beep_device() in each codec driver, move them to the generic parser. The codec driver just needs to set spec->beep_nid for activating the digital beep. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18Merge branch 'for-linus' into for-nextTakashi Iwai
Back-merged for refactoring beep stuff.
2013-03-14ALSA: hda - Disable IDT eapd_switch if there are no internal speakersDavid Henningsson
If there are no internal speakers, we should not turn the eapd switch off, because it might be necessary to keep high for Headphone. BugLink: https://bugs.launchpad.net/bugs/1155016 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-13ALSA: hda - Don't apply EAPD power filter as defaultTakashi Iwai
So far, the driver doesn't power down the widget at going down to D3 when the widget node has an EAPD capability and EAPD is actually set on all codecs unless codec->power_filter is set explicitly. This caused a problem on some Conexant codecs, leading to click noises, and we set it as NULL there. But it is very unlikely that the problem hits only these codecs. Looking back at the development history, this workaround for EAPD was introduced just for some laptops with STAC9200 codec, then we applied it blindly for all. Now, since it's revealed to have an ill effect, we should disable this workaround per default and apply only for the known requiring systems. The EAPD workaround is implemented now as snd_hda_codec_eapd_power_filter(), and this has to be set explicitly by the codec driver when needed. As of now, only patch_stac9200() sets this one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-06ALSA: hda - Apply mic-mute LED fixup for new HP laptopsTakashi Iwai
It's mostly harmless to apply it for new models even if they have no mic mute LED (just toggling an unused GPIO pin). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-01ALSA: hda - add support for IDT 92HD95 HDA codecVitaliy Kulikov
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-28ALSA: hda - Fix powermap for external mics on IDT codecsDavid Henningsson
This patch fixes a regression of the external mic not working on HP Probook 4520s. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-24ALSA: hda - Enable power down of unused widgets for IDT codecsTakashi Iwai
IDT codecs can work well with this new feature, so let's enable it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-24ALSA: hda - Add power state filteringTakashi Iwai
Add a hook to struct hda_codec for filtering the target power state of each widget when powering up/down. The current hackish EAPD check is implemented as the default hook pointer, too. This allows codec drivers to implement own power filter. In the upcoming changes, the generic parser will have the better power filter based on the active paths. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22ALSA: hda - Revive SPDIF mux for IDT/STAC codecsTakashi Iwai
The stuff that was dropped while transition to the generic parser is now recovered. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21ALSA: hda - Add aamix NID to IDT 92HD codecsTakashi Iwai
IDT codecs have analog-loopback mixer widgets, but we haven't cared about it, so far. Let's set them. This will avoid also possible wrong routes for the input paths. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21ALSA: hda - Remove superfluous header inclusionsTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18ALSA: hda/sigmatel - Add bass speaker support for HP ENVY Spectre XTTakashi Iwai
The pin configuration for the bass speaker needs to be corrected in a fixup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18ALSA: hda - Consolidate cap_sync_hook and capture_switch_hookTakashi Iwai
Two hooks in hda_gen_spec, cap_sync_hook and capture_switch_hook, play very similar roles. The only differences are that the former is called more often (e.g. at init or switching capsrc) while the latter can take an on/off argument. As a more generic implementation, consolidate these two hooks, and pass snd_ctl_elem_value pointer as the second argument. If the secondary argument is non-NULL, it can take the on/off value, so the caller handles it like the former capture_switch_hook. If it's NULL, it's called in the init or capsrc switch case. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-17ALSA: hda - Use generic parser for STAC/IDT codec driverTakashi Iwai
Finally we reached here. All codecs driver (except for CA0132, which has really device-specific requirements) have been converted to use the generic parser. This patch appears bigger than others since it also involves with the code shuffling, but mostly the cut-off of parser codes and adapt to the generic parser flags. Most of fixup codecs haven't been changed but just removed a few unnecessary codes. The only missing stuff is the SPDIF mux control. It'll be added again later. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-17ALSA: hda - Minor cleanup/fixes for patch_sigmatel.c fixup transitionTakashi Iwai
- spec->hp_detect has to be overridden in HDA_FIXUP_ACT_PARSE, not in PRE_PARSE. - Remove err == 0 check but return directly -EINVAL from stac92xx_parse_auto_config() - Set spec->default_polarity for 92HD71bxx - Some code shuffles Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15ALSA: hda/sigmatel - Remove superfluous fields from sigmatel_specTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15ALSA: hda/sigmatel - Move w/a for HP Mini 110 LED to fixup tableTakashi Iwai
Instead of checking the codec SSID in find_mute_led_cfg() for HP Mini 110, set the proper spec->default_polairty in the fixup table. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15ALSA: hda/sigmatel - Remove PCI id check in find_mute_led_cfg()Takashi Iwai
The PCI vendor ID check in find_mute_led_cfg() is now superfluous because the function is called in the fixup table entries of HP machines. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15ALSA: hda - Use standard fixup table for IDT92HD83xxxTakashi Iwai
Finally all codecs in patch_sigmatel.c have been converted to use the standard fixup helpers. This change also includes trivial cleanups like the call of common setup for GPIO LED or the removal of unused function. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15ALSA: hda - Use standard fixup table for IDT92HD73xxTakashi Iwai
This one is rather a simple conversion. The fixups for Dell machines are implemented by fixup functions in the end. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15ALSA: hda - Use standard fixup table for IDT92HD71BxxTakashi Iwai
This time, the only intrusive changes are for HP machines. As the mute LED fixup and the bass speaker switch are required only for HP machines, we can move these checks into the fixup entries; the former is applied generically to all HP machines while the latter for only certain models. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15ALSA: hda - Use standard fixup table for STAC927xTakashi Iwai
This conversion is a bit tricky. Since STAC927x may take two different volume-knob initialization values depending on the model, a new flag, spec->volknob_init, is introduced to indicate whether it's the standard volume-knob initialization or not. Also, Dell BIOS model is now directly mapped onto the fixup table instead of parsing in the function. This resulted in a new model ref, STAC_927X_DELL_BIOS_SPDIF, which is a chained entry. Also, for reducing the fixups, virtual entries like STAC_927X_DELL_DMIC and STAC_D965_VERBS are introduced. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15ALSA: hda - Use standard fixup table for STAC922xTakashi Iwai
Rather straightforward conversion, except for ones for Intel Mac. As Intel Mac have only unique codec SSIDs, we need to remap the fixup again for the codec SSID and call the new fixup there. Also, we can reduce model enums like STAC_MACMINI, which are model aliases for backward compatibility, since they can be pointed directly via hda_model_fixup table. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14ALSA: hda - Use standard fixup table for STAC9205Takashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14ALSA: hda - Use standard fixup table for STAC9872Takashi Iwai
Now for STAC9872. It has a small fixup table, fortunately. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14ALSA: hda - Use standard fixup table for STAC925xTakashi Iwai
Similar like the previous commit, convert patch_stac925x() to use the standard fixup table. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14ALSA: hda - Use standard fixup table for STAC9200Takashi Iwai
Convert patch_stac9200() to use the standard fixup table instead of manual switch-case with board_config. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Add snd_hda_get_int_hint() helper functionTakashi Iwai
It'll be used in hda_generic.c, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Protect user-defined arrays via mutexTakashi Iwai
The pincfgs, init_verbs and hints set by sysfs or patch might be changed dynamically on the fly, thus we need to protect it. Add a simple protection via a mutex. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-13ALSA: hda - Fix pin configuration of HP Pavilion dv7Takashi Iwai
Fix the quirk entry for HP Pavilion dv7 in order to make the bass speaker working. Reported-and-tested-by: Tomas Pospisek <tpo2@sourcepole.ch> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-28ALSA: hda - Call snd_array_init() early and only onceTakashi Iwai
This is a preliminary patch for introducing a protection to access races of snd_array instances. Call snd_array_init() appropriately at the initialization time and don't call it twice. Also the allocations of codec-spec structs are cleaned up by helper functions in patch_sigmatel.c and patch_analog.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-21ALSA: hda - Remove shutup calls in free callbacksTakashi Iwai
The free callback is called at the state where no extra verbs are executed, thus calling *_shutup() is useless, as it's checking the shutdown flag. Remove such superfluous calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-08ALSA: hda - Apply a proper chmap for built-in 2.1 speakersTakashi Iwai
When 2.1 speakers are detected, use the corresponding channel map instead of the standard map with front+rear surrounds. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-08ALSA: hda - Give standard "Bass Speaker" mixer for 2.1 speakersTakashi Iwai
When two built-in speakers are found on the machine, we can suppose it's rather a 2.1 speaker system with a bass output instead of front/surround channels. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-30Merge branch 'for-linus' into for-nextTakashi Iwai
... for migrating the core changes for USB-audio disconnection fixes
2012-10-26ALSA: hda - Fix mute-LED setup for HP dv5 laptopGustavo Maciel Dias Vieira
The BIOS on HP dv5 doesn't have the DMI string to guide the setup of mute led GPIO and polarity. Associate this laptop with the hp-inv-led model. Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org> Tested-by: Vinícius Angiolucci <angiolucci@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-17ALSA: hda - Add workaround for conflicting IEC958 controlsTakashi Iwai
When both an SPDIF and an HDMI device are created on the same card instance, multiple IEC958 controls are created with indices=0, 1, ... But the alsa-lib configuration can't know which index corresponds actually to which PCM device, and both the SPDIF and the HDMI configurations point to the first IEC958 control wrongly. This patch introduces a (hackish and ugly) workaround: the IEC958 controls for the SPDIF device are re-labeled with device=1 when HDMI coexists. The device=1 corresponds to the actual PCM device for SPDIF, so it's anyway a better representation. In future, HDMI controls should be moved with the corresponding PCM device number, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-09ALSA: hda - remove "Mic Jack Mode" for headset jacks (Latitude Exx30)David Henningsson
Dell Latitude 5x30 and 6x30 series of machines all have a single 4-pin headset jack. Enabling line in mode for such jack is very confusing (you would only get mono input, and would have to use non-standard adapters), so remove the option by default. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-06ALSA: hda - make Realtek/Sigmatel/Conexant use the generic unsol eventDavid Henningsson
For less duplication of code between codecs, and to make it easier in the future to improve code for all codecs simultaneously. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-14ALSA: hda - Add mic-mute LED control for HP laptopTakashi Iwai
Some of new HP laptops have a LED for microphone (or recording) mute, and it's controlled by GPIO pin 3. Bind this with the capture switch to turn it on/off properly by the mixer change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11Merge branch 'for-linus' into for-nextTakashi Iwai
To merge HD-audio fixes back to 3.7 development line
2012-09-06ALSA: hda - fix control names for multiple speaker out on IDT/STACDavid Henningsson
For multiple speaker outs, the names were previously "Speaker,0", "Speaker,1", "Center"/"LFE", "Speaker,3". This is inconsistent, confusing, and is not picked up correctly by PulseAudio. Instead use "Front", "Surround", "Center"/"LFE", "Side" which is more standard. BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046734 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-06ALSA: hda - Fix missing Master volume for STAC9200/925xTakashi Iwai
With the commit [2faa3bf: ALSA: hda - Rewrite the mute-LED hook with vmaster hook in patch_sigmatel.c], the former Master volume control was converted to PCM. This was supposed to be covered by the vmaster control. But due to the lack of "PCM" slave definition, this didn't happen properly. The patch fixes the missing entry. Reported-by: Andrew Shadura <bugzilla@tut.by> Cc: <stable@vger.kernel.org> [v3.4+] Signed-off-by: Takashi Iwai <tiwai@suse.de>