summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_conexant.c
AgeCommit message (Collapse)Author
2014-08-14ALSA: hda - Set TLV_DB_SCALE_MUTE bit for cx5051 vmasterTakashi Iwai
Conexnat HD-audio driver has a workaround for cx5051 (aka CX20561) chip to add fake mute controls to each amp (commit 3868137e). This implies the minimum-as-mute TLV bit in TLV for each corresponding control. Meanwhile we build the virtual master from these, but the TLV bit is missing, even though the slaves have it. This patch simply adds the missing TLV_DB_SCALE_MUTE bit for vmaster, as already done in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-25ALSA: hda - Remove the obsoleted static quirk codes from patch_conexant.cTakashi Iwai
The static quirk code has been disabled for a while and it seems working fine, so it's time to actually get rid of it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-28ALSA: hda - Fix registration of beep input deviceTakashi Iwai
The beep input device is registered via input_register_device(), but this is called in snd_hda_attach_beep_device() where the sound devices aren't registered yet. This leads to the binding to non-existing object, thus results in failure. And, even if the binding worked (against the PCI object), it's still racy; the input device appears before the sound objects. For fixing this, register the input device properly at dev_register ops of the codec object it's bound with. Also, call snd_hda_detach_beep_device() at dev_disconnection so that it's detached at the right timing. As a bonus, since it's called in the codec's ops, we can get rid of the further call from the other codec drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-25ALSA: hda - Replace with standard printkTakashi Iwai
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>
2014-02-15ALSA: hda - Remove superfluous inclusion of linux/pci.hTakashi Iwai
Some codec drivers still have it since using PCI_VENDOR_ID_*. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-12Merge branch 'for-linus' into for-nextTakashi Iwai
2014-02-10ALSA: hda - Move HDA_FIXUP_ACT_FREE call in snd_hda_gen_free()Takashi Iwai
Now Realtek and Conexant codec parsers just call snd_hda_gen_free(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-07ALSA: hda - Fix inconsistent Mic mute LEDTakashi Iwai
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>
2014-01-30ALSA: hda/conexant - Disable static quirksTakashi Iwai
Now all weird setups have been converted to fixups for the generic parser, and we can disable the static quirks. This commit just turns the build off. The bulky static quirk code still remains for a while, in case we get an overlooked regression. It'll be removed at the next kernel version. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30ALSA: hda/conexant - Enable stereo mix input for CX20549 and CX20551Takashi Iwai
Both CX20549 and CX20551 codecs have a mixer widget and it can be connected as the ADC source. Like AD and VIA codecs, enable the add_stereo_mix_input flag for these codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30ALSA: hda/conexant - Add analog loopback mixing to CX20549Takashi Iwai
CX20549 has an aamixer widget at NID 0x17. Let's enable it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30ALSA: hda/conexant - Apply cap of mix amp volume on CX20551 codecTakashi Iwai
For the generic parser, use the standard fixup matching. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30ALSA: hda/conexant - Use generic parser for HP 530Takashi Iwai
This laptop with CX20549 codec misses the internal mic at NID 0x12. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30ALSA: hda/conexant - Use generic parser for Toshiba P105Takashi Iwai
We need to fix bogus pincfgs on this machine, but it works well else. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30ALSA: hda/conexant - Apply the amp cap override for CX20549 mixerTakashi Iwai
Apply the amp cap override for CX20549 mixer widget in case where the generic parser is used, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30ALSA: hda/conexant - Re-implement OLPC XO workarounds via fixupTakashi Iwai
OLPC XO needs a few special handling. Now these are implemented as a fixup to the generic parser. Obviously, the DC BIAS mode had to be added manually. This is mainly implemented in the mic_autoswitch hook, where the mic pins are overwritten depending on the DC bias mode. This also required the override of the mic boost control, since the mic boost is applied only when the DC mode is disabled. In addition, the mic pins must be set dynamically at recording time because these also control the LED. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30ALSA: hda - Add fixup name lookup for CX5051 and 5066 codecsTakashi Iwai
Like other codecs, apply a specific fixup given by a model string. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Split Thinkpad ACPI-related codeTakashi Iwai
Both patch_realtek.c and patch_conexant.c contain the fairy same code snippet for supporting Thinkpad ACPI LED controls. Split them into thinkpad_helper.c and include it from both places. Although this isn't the best approach from the code size POV, the probability for coexistence of both Realtek and Conexant codecs on a single machine is pretty low, thus it'll end up with less memory footprint than splitting to yet another module. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-20ALSA: hda - Fix wrong <acpi/acpi.h> inclusion in Thinkpad ACPI users.Lv Zheng
CONFIG_ACPI dependent code should include <linux/acpi.h> instead of directly including <acpi/acpi.h>. This patch cleans up such wrong inclusions for Thinkpad ACPI users. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-06ALSA: hda - Remove quirk for Dell Vostro 131David Henningsson
I've tested the old Dell Vostro 131 with the latest generic parser and it works just fine, and as a bonus we get better jack detection features in userspace. Therefore this quirk can be removed. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-27ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Conexant codecHui Wang
Most Thinkpad Edge series laptops use conexant codec, so far although the codecs have different minor Vendor Id and minor Subsystem Id, they all belong to the cxt5066 family, this change can make the mute/mic-mute LEDs support more generic among cxt_5066 family. This design refers to the similar solution for the realtek codec ALC269 family in the patch_realtek.c. Cc: Alex Hung <alex.hung@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Acked-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07ALSA: hda - Add support for CX20952Takashi Iwai
It's a superset of the existing CX2075x codecs, so we can reuse the existing parser code. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-17ALSA: hda - add connection to thinkpad_acpi to control mute/micmute LEDsDavid Henningsson
Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-30ALSA: hda - Fix GPIO for Acer Aspire 3830TGTakashi Iwai
Acer Aspire 3830TG seems requiring GPIO bit 0 as the primary mute control. When a machine is booted after Windows 8, the GPIO pin is turned off and it results in the silent output. This patch adds the manual fixup of GPIO bit 0 for this model. Reported-by: Christopher <DIDI2002@web.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-16ALSA: hda - Headphone mic support for an Asus/Conexant deviceDavid Henningsson
This Conexant codec has a single jack that can be used as either headphone or mic (but not headset). The existing hp_mic functionality does not apply here, because the mic and the HP are on separate pins. Hence make a lighter version of what has been earlier done for Realtek codecs. BugLink: https://bugs.launchpad.net/bugs/1198030 Tested-by: Franz Hsieh <franz.hsieh@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-20ALSA: hda - Make Thinkpad X220-tablet use generic parserDavid Henningsson
Like the X220, this quirk was added to support docking station, so enable the fixup instead. According to Jan, the generic parser works equal or better than the current parser. This was tested under a 3.9 kernel. Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-04ALSA: hda - Fix 3.9 regression of EAPD init on Conexant codecsTakashi Iwai
The older Conexant codecs have up to two EAPDs and these are supposed to be rather statically turned on. The new generic parser code assumes the dynamic on/off per path usage, thus it resulted in the silent output on some machines. This patch fixes the problem by simply assuming the static EAPD on for such old Conexant codecs as we did until 3.8 kernel. Reported-and-tested-by: Christopher K. <c.krooss@gmail.com> Cc: <stable@vger.kernel.org> [v3.9] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-29ALSA: hda - Move Thinkpad X220 to use auto parserDavid Henningsson
This enables better volume controls than the current model parser. Also, because the original quirk for X220 was added to fix docking station support, add the TP410 fixup instead. Reported-by: Willian Jon McCann <william.jon.mccann@gmail.com> 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-18ALSA: hda/cirrus - Fix the digital beep registrationTakashi Iwai
The argument passed to snd_hda_attach_beep_device() is a widget NID while spec->beep_amp holds the composed value for amp controls. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18ALSA: hda - Fix missing beep detach in patch_conexant.cTakashi Iwai
This leaks the beep input device after module unload, which leads to Oops. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=55321 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-14ALSA: hda - Remove speaker clicks on CX20549David Henningsson
This chip needs the speaker pin to go to D3 to avoid clicks, so default_power_filter does not work here. This was found on Thinkpad R61i/T61i but I guess it applies to the entire chip. If not, quirks should be set for at least PCI SSID 17aa:20ac. Thanks to c4pp4 for testing. BugLink: https://bugs.launchpad.net/bugs/886975 Signed-off-by: David Henningsson <david.henningsson@canonical.com> 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-23Merge branch 'topic/hda-gen-parser' into for-nextTakashi Iwai
This is a merge of really big changes: the generic parser is heavily enhanced for handling all cases, based on the former Realtek codec driver code. And all codec drivers except for a few ones (CA0132, HDMI and modem) have been converted to use the new generic driver. Conflicts: sound/pci/hda/patch_realtek.c
2013-01-21ALSA: hda - Add Conexant CX20755/20756/20757 codec IDsTakashi Iwai
These are just compatible with other CX2075x codecs. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18ALSA: hda/conexant - Set mixer NID 0x19 for CX20551 codecTakashi Iwai
Conexant CX20551 codec has a mixer in NID 0x19 and a few outputs have to take the input through this widget. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Rearrange for dropping static quirk codes in Coexant driverTakashi Iwai
Just shuffle the codes and add ifdefs for testing to drop the static quirk codes from patch_conexant.c. By commenting out ENABLE_CXT_STATIC_QUIRKS define at the beginning of the file, you can disable the whole static codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Use generic parser in Conexant codec driverTakashi Iwai
... and drop most of own parser code. It doesn't replace any present static quirks, though. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Move fixup code into struct hda_codecTakashi Iwai
Since the fixup code is used commonly, it's worth to move it to the common place, struct hda_codec, instead of keeping in hda_gen_spec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-09Revert "ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs"David Henningsson
This reverts commit 697c373e34613609cb5450f98b91fefb6e910588. The original patch was meant to remove clicking, but in fact caused even more clicking instead. Thanks to c4pp4 for doing most of the work with this bug. BugLink: https://bugs.launchpad.net/bugs/886975 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-12ALSA: hda - Add stereo-dmic fixup for Acer Aspire One 522Takashi Iwai
Acer Aspire One 522 has the infamous digital mic unit that needs the phase inversion fixup for stereo. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=715737 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-30ALSA: hda - Add a helper function for simple enum kcontrolsTakashi Iwai
The same type of code is being used in multiple places in various codec drivers, so put it as a core library. 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-15ALSA: HDA: Make hda sound card usable for LoongsonHuacai Chen
Lemote A1004(Laptop) and A1205(All-In-One) use Conexant's hda codec, this patch modify patch_conexant.c to add Lemote specific code. Both A1004 and A1205 use the same pin configurations, but A1004 need to increase the default boost of internal mic. Signed-off-by: Jie Chen <chenj@lemote.com> Signed-off-by: Huacai Chen <chenhc@lemote.com> Signed-off-by: Hongliang Tao <taohl@lemote.com> Signed-off-by: Hua Yan <yanh@lemote.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-06ALSA: hda - fix indices on boost volume on ConexantDavid Henningsson
After the recent patch "ALSA: hda - use both input paths on Conexant auto parser" suddenly we can have more than one "Mic Boost", this happened on Acer Aspire One 722. Therefore we must add the possibility to put an index on this "Mic Boost" just as we do for the other "Mic Boost" earlier in the same function. BugLink: https://bugs.launchpad.net/bugs/1059523 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-06ALSA: hda - Add inverted internal mic quirk for Lenovo IdeaPad U310Felix Kaechele
The Lenovo IdeaPad U310 has an internal mic where the right channel is phase inverted. Signed-off-by: Felix Kaechele <felix@fetzig.org> Cc: <stable@vger.kernel.org> 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>