summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | ALSA: hda - fix an external mic jack problem on a HP machineHui Wang2014-07-301-0/+12
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | ON the machine, two pin complex (0xb and 0xe) are both routed to the same external right-side mic jack, this makes the jack can't work. To fix this problem, set the 0xe to "not connected". BugLink: https://bugs.launchpad.net/bugs/1350148 Tested-by: Franz Hsieh <franz.hsieh@canonical.com> Cc: stable@vger.kernel.org Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Adjust speaker HPF and add LED support for HP Spectre 13Takashi Iwai2014-06-251-1/+57
|/ | | | | | | | | | | | | | | | | HP Spectre 13 has the IDT 92HD95 codec, and BIOS seems to set the default high-pass filter in some "safer" range, which results in the very soft tone from the built-in speakers in contrast to Windows. Also, the mute LED control is missing, since 92HD95 codec still has no HP-specific fixups for GPIO setups. This patch adds these missing features: the HPF is adjusted by the vendor-specific verb, and the LED is set up from a DMI string (but with the default polarity = 0 assumption due to the incomplete BIOS on the given machine). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=74841 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - fix format type mismatch in sound/pci/hda/patch_sigmatel.cToralf Förster2014-05-211-2/+2
| | | | | Signed-off-by: Toralf Förster <toralf.foerster@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/sigmatel - Allow auto-switching for dock line-in of HP laptopsTakashi Iwai2014-02-271-0/+3
| | | | | | | | | | | | | | | | Many HP laptops with STAC codecs have a docking station port and BIOS sets the pins for the input on the dock as a line in. Because the generic parser doesn't handle a line in pin as auto-switchable, this resulted in the manual capture source selection on these laptops. However, from the usability POV, the automatic switching is easier. This patch adds the line_in_auto_switch hint in the fixup function for these laptops. Even if no dock port is present, this should be harmless as the generic parser allows the auto-switching only in a limited situation (all three pins are located in different positions). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Replace with standard printkTakashi Iwai2014-02-251-6/+6
| | | | | | | | | | | | Use dev_err() and co for messages from HD-audio controller and codec drivers. The codec drivers are mostly bound with codec objects, so some helper macros, codec_err(), codec_info(), etc, are provided. They merely wrap the corresponding dev_xxx(). There are a few places still calling snd_printk() and its variants as they are called without the codec or device context. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add a fixup for HP Folio 13 mute LEDTakashi Iwai2014-02-251-0/+20
| | | | | | | | | | 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 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Enable front audio jacks on one HP desktop modelHui Wang2014-02-201-0/+13
| | | | | | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix inconsistent Mic mute LEDTakashi Iwai2014-02-071-10/+17
| | | | | | | | | | | | | | The current code for controlling mic mute LED in patch_sigmatel.c blindly assumes that there is a single capture switch. But, there can be multiple multiple ones, and each of them flips the state, ended up in an inconsistent state. For fixing this problem, this patch adds kcontrol to be passed to the hook function so that the callee can check which switch is being accessed. In stac_capture_led_hook(), the state is checked as a bitmask, and turns on the LED when all capture switches are off. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Apply codec power_filter to FG nodesTakashi Iwai2014-01-131-24/+12
| | | | | | | Apply the codec->power_filter to the FG nodes in general for reducing hackish set_power_state ops override in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Drop bus->avoid_link_reset flagTakashi Iwai2013-11-261-1/+2
| | | | | | | | Use bus->power_keep_link_on instead. The controller shouldn't go to D3 when the link isn't reset, so essentially avoiding the link reset means avoiding the runtime PM. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - load EQ params into IDT codec on HP bNB13 systemsVitaliy Kulikov2013-11-151-1/+531
| | | | | | | Adds linear EQ filtering for integrated speaker protection Signed-off-by: Vitaliy Kulikov <vitaliy.kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix mute LED on HP laptops in runtime suspendTakashi Iwai2013-10-241-1/+3
| | | | | | | | | | | When HP laptops with mute and mic-record LEDs go to runtime suspend, these LEDs are turned on forcibly no matter whether GPIO pis are on or off. This strange behavior seems triggered by resetting the HD-audio bus link at azx_rutime_suspend(). So, just add a new hda_bus flag to avoid the link reset at runtime suspend and set it for these HP machines. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge tag 'asoc-v3.12' of ↵Takashi Iwai2013-08-231-6/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.12 - DAPM is now mandatory for CODEC drivers in order to avoid the repeated regressions in the special cases for non-DAPM CODECs and make it easier to integrate with other components on boards. All existing drivers have had some level of DAPM support added. - A lot of cleanups in DAPM plus support for maintaining controls in a specific state while a DAPM widget all contributed by Lars-Peter Clausen. - Core helpers for bitbanged AC'97 reset from Markus Pargmann. - New drivers and support for Analog Devices ADAU1702 and ADAU1401(a), Asahi Kasei Microdevices AK4554, Atmel AT91ASM9x5 and WM8904 based machines, Freescale S/PDIF and SSI AC'97, Renesas R-Car SoCs, Samsung Exynos5420 SoCs, Texas Instruments PCM1681 and PCM1792A and Wolfson Microelectronics WM8997. - Support for building drivers that can support it cross-platform for compile test.
| * ALSA: hda - Fix missing fixup for Mac Mini with STAC9221Takashi Iwai2013-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n LaptopTakashi Iwai2013-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix EAPD GPIO control for Sigmatel codecsTakashi Iwai2013-07-191-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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> Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Remove analog mic pin override from STAC9228 dell-bios quirkTakashi Iwai2013-07-291-2/+12
|/ | | | | | | | | | | | | | | The current fixup for dell-bios model with STAC9228 codec contains the override of pin 0x0c for analog mic. But this is actually just adding a bogus pin and confuses the parser. Better to remove it for the auto-mic switching. Meanwhile, for a possible regression, keep the old configuration as model=dell-bios-amic, so that people can test it again quickly. Tested on Dell 1420n laptop. Reported-and-tested-by: Eric Shattow <lucent@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Remove superfluous stac_resume()Takashi Iwai2013-06-251-10/+0
| | | | | | | The stac_resume() is exactly what the default resume code does, so we don't have to define and use it doubly. Let's cut it off. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Enable mic-mute LED on more HP laptopsTakashi Iwai2013-05-281-0/+4
| | | | | | | The newer HP laptops have SSID 103c:20xx and 103c:21xx, and these usually have the mic-mute LED on Fn-F8. Let's enable it, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Enable "Headset Mic" name for some Dell Latitude devicesDavid Henningsson2013-03-211-1/+5
| | | | | | | | 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>
* ALSA: hda - Move beep attach/detach calls in hda_generic.cTakashi Iwai2013-03-181-23/+9
| | | | | | | | | 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>
* Merge branch 'for-linus' into for-nextTakashi Iwai2013-03-181-0/+29
|\ | | | | | | Back-merged for refactoring beep stuff.
| * ALSA: hda - Disable IDT eapd_switch if there are no internal speakersDavid Henningsson2013-03-141-0/+29
| | | | | | | | | | | | | | | | | | 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>
* | ALSA: hda - Don't apply EAPD power filter as defaultTakashi Iwai2013-03-131-0/+1
|/ | | | | | | | | | | | | | | | | | | | | 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>
* ALSA: hda - Apply mic-mute LED fixup for new HP laptopsTakashi Iwai2013-02-061-0/+2
| | | | | | | 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>
* ALSA: hda - add support for IDT 92HD95 HDA codecVitaliy Kulikov2013-02-011-0/+39
| | | | | Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix powermap for external mics on IDT codecsDavid Henningsson2013-01-281-0/+8
| | | | | | | | 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>
* ALSA: hda - Enable power down of unused widgets for IDT codecsTakashi Iwai2013-01-241-8/+3
| | | | | | IDT codecs can work well with this new feature, so let's enable it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add power state filteringTakashi Iwai2013-01-241-1/+1
| | | | | | | | | | | | 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>
* ALSA: hda - Revive SPDIF mux for IDT/STAC codecsTakashi Iwai2013-01-221-0/+101
| | | | | | | The stuff that was dropped while transition to the generic parser is now recovered. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add aamix NID to IDT 92HD codecsTakashi Iwai2013-01-211-0/+3
| | | | | | | | 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>
* ALSA: hda - Remove superfluous header inclusionsTakashi Iwai2013-01-211-1/+0
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/sigmatel - Add bass speaker support for HP ENVY Spectre XTTakashi Iwai2013-01-181-0/+11
| | | | | | | The pin configuration for the bass speaker needs to be corrected in a fixup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Consolidate cap_sync_hook and capture_switch_hookTakashi Iwai2013-01-181-3/+9
| | | | | | | | | | | | | | | 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>
* ALSA: hda - Use generic parser for STAC/IDT codec driverTakashi Iwai2013-01-171-3951/+768
| | | | | | | | | | | | | | | | 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>
* ALSA: hda - Minor cleanup/fixes for patch_sigmatel.c fixup transitionTakashi Iwai2013-01-171-27/+13
| | | | | | | | | | | - 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>
* ALSA: hda/sigmatel - Remove superfluous fields from sigmatel_specTakashi Iwai2013-01-151-1/+0
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/sigmatel - Move w/a for HP Mini 110 LED to fixup tableTakashi Iwai2013-01-151-7/+5
| | | | | | | 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>
* ALSA: hda/sigmatel - Remove PCI id check in find_mute_led_cfg()Takashi Iwai2013-01-151-43/+40
| | | | | | | | 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>
* ALSA: hda - Use standard fixup table for IDT92HD83xxxTakashi Iwai2013-01-151-150/+248
| | | | | | | | | 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>
* ALSA: hda - Use standard fixup table for IDT92HD73xxTakashi Iwai2013-01-151-113/+218
| | | | | | | 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>
* ALSA: hda - Use standard fixup table for IDT92HD71BxxTakashi Iwai2013-01-151-169/+312
| | | | | | | | | | 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>
* ALSA: hda - Use standard fixup table for STAC927xTakashi Iwai2013-01-151-120/+235
| | | | | | | | | | | | | | | | 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>
* ALSA: hda - Use standard fixup table for STAC922xTakashi Iwai2013-01-151-171/+312
| | | | | | | | | | | | 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>
* ALSA: hda - Use standard fixup table for STAC9205Takashi Iwai2013-01-141-83/+154
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Use standard fixup table for STAC9872Takashi Iwai2013-01-141-21/+28
| | | | | | Now for STAC9872. It has a small fixup table, fortunately. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Use standard fixup table for STAC925xTakashi Iwai2013-01-141-85/+141
| | | | | | | Similar like the previous commit, convert patch_stac925x() to use the standard fixup table. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Use standard fixup table for STAC9200Takashi Iwai2013-01-141-104/+265
| | | | | | | 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>
* ALSA: hda - Add snd_hda_get_int_hint() helper functionTakashi Iwai2013-01-121-18/+4
| | | | | | It'll be used in hda_generic.c, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Protect user-defined arrays via mutexTakashi Iwai2013-01-121-0/+5
| | | | | | | | 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>