summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_conexant.c
AgeCommit message (Collapse)Author
2015-10-13ALSA: hda - Fix inverted internal mic on Lenovo G50-80David Henningsson
Add the appropriate quirk to indicate the Lenovo G50-80 has a stereo mic input where one channel has reverse polarity. Alsa-info available at: https://launchpadlibrarian.net/220846272/AlsaInfo.txt Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1504778 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-21ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noisesDavid Henningsson
On shutdown/reboot of CX20722, first shut down all EAPDs, then shut down the afg node to D3. Failure to do so can lead to spurious noises from the internal speaker directly after reboot (and before the codec is reinitialized again, i e in BIOS setup or GRUB menus). BugLink: https://bugs.launchpad.net/bugs/1487345 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-29ALSA: hda - Set patch_ops before calling auto-parserTakashi Iwai
... so that the parser code can overwrite some optional ops. For Realtek and others, it can be set solely in the spec allocator, so it results in a good code cleanup, too. With this change, we can finally remove the local stream_pm setup and rely on the generic parser's automatic setting. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-18ALSA: hda - Add Conexant codecs CX20721, CX20722, CX20723 and CX20724David Henningsson
This patch adds support for Conexant HD Audio codecs CX20721, CX20722, CX20723 and CX20724. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1454656 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-23ALSA: hda - Use regmap for command verb caches, tooTakashi Iwai
Like the previous patches, this patch converts also to the regmap, at this time, the cached verb writes are the target. But this conversion needs a bit more caution than before. - In the old code, we just record any verbs as is, and restore them at resume. For the regmap scheme, this doesn't work, since a few verbs like AMP or DIGI_CONVERT are asymmetrical. Such verbs are converted either to the dedicated function (snd_hda_regmap_xxx_amp()) or changed to the unified verb. - Some verbs have to be declared as vendor-specific ones before accessing via regmap. Also, the minor optimization with codec->cached_write flag is dropped in a few places, as this would confuse the operation. Further optimizations will be brought in the later patches, if any. This conversion ends up with a drop of significant amount of codes, mostly the helper codes that are no longer used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-23ALSA: hda - Move a part of hda_codec stuff into hdac_deviceTakashi Iwai
Now some codes and functionalities of hda_codec struct are moved to hdac_device struct. A few basic attributes like the codec address, vendor ID number, FG numbers, etc are moved to hdac_device, and they are accessed like codec->core.addr. The basic verb exec functions are moved, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-23ALSA: hda - Move some codes up to hdac_bus structTakashi Iwai
A few basic codes for communicating over HD-audio bus are moved to struct hdac_bus now. It has only command and get_response ops in addition to the unsolicited event handling. Note that the codec-side tracing support is disabled temporarily during this transition due to the code shuffling. It will be re-enabled later once when all pieces are settled down. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-16Merge branch 'topic/hda-bus' into for-nextTakashi Iwai
2015-03-11ALSA: hda - Fix built-in mic on Compaq Presario CQ60Takashi Iwai
Compaq Presario CQ60 laptop with CX20561 gives a wrong pin for the built-in mic NID 0x17 instead of NID 0x1d, and it results in the non-working mic. This patch just remaps the pin correctly via fixup. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=920604 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-23ALSA: hda - Bind codecs via standard busTakashi Iwai
Now we create the standard HD-audio bus (/sys/bus/hdaudio), and bind the codec driver with the codec device over there. This is the first step of the whole transition so that the changes to each codec driver are kept as minimal as possible. Each codec driver needs to register hda_codec_driver struct containing the currently existing preset via the new helper macro module_hda_codec_driver(). The old hda_codec_preset_list is replaced with this infrastructure. The generic parsers (for HDMI and other) are also included in the preset with the special IDs to bind uniquely. In HD-audio core side, the device binding code is split to hda_bind.c. It provides the snd_hda_bus_type implementation to match the codec driver with the given codec vendor ID. It also manages the module auto-loading by itself like before: when the matching isn't found, it tries to probe the corresponding codec modules, and finally falls back to the generic drivers. (The special ID mentioned above is set at this stage.) The only visible change to outside is that the hdaudio sysfs entry now appears in /sys/bus/devices, not as a sound class device. More works to move the suspend/resume and remove ops will be (hopefully) done in later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-15ALSA: hda - Make add_stereo_mix_input flag tristateTakashi Iwai
... for distinguishing whether it's explicitly enabled via a user hint or enabled by a driver as a fallback. Now the former case corresponds to HDA_HINT_STEREO_MIX_ENABLE while the latter to HDA_HINT_STEREO_MIX_AUTO. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-13ALSA: hda - Add mute LED control for Lenovo Ideapad Z560Takashi Iwai
Lenovo Ideapad Z560 has a mute LED that is controlled via EAPD pin 0x1b on CX20585 codec. (EAPD bit on corresponds to mute LED on.) The machine doesn't need other EAPD, so the fixup concentrates on controlling EAPD 0x1b following the vmaster state (but inversely). Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=665315 Reported-by: Szymon Kowalczyk <fazerxlo@o2.pl> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-07ALSA: hda - Add inverted internal mic for Asus Aspire 4830TDavid Henningsson
Alsa-info at https://launchpadlibrarian.net/186697318/alsa-info.txt.37fYWkaJRc Reported-by: Tomas Nilsson <tomas.k.nilsson@gmail.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-06Merge tag 'asoc-v3.18' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.18 - More componentisation work from Lars-Peter, this time mainly cleaning up the suspend and bias level transition callbacks. - Real system support for the Intel drivers and a bunch of fixes and enhancements for the associated CODEC drivers, this is going to need a lot quirks over time due to the lack of any firmware description of the boards. - Jack detect support for simple card from Dylan Reid. - A bunch of small fixes and enhancements for the Freescale drivers. - New drivers for Analog Devices SSM4567, Cirrus Logic CS35L32, Everest Semiconductor ES8328 and Freescale cards using the ASRC in newer i.MX processors.
2014-09-19ALSA: hda - Add fixup model name lookup for Lemote A1205Huacai Chen
Lemote A1004 is already added in commit a2dd933d01f (ALSA: hda - Add fixup name lookup for CX5051 and 5066 codecs), but Lemote A1205 has missing. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: <stable@vger.kernel.org> # 3.15+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-16ALSA: hda - Allow multiple callbacks for jackTakashi Iwai
So far, hda_jack infrastructure allows only one callback per jack, and this makes things slightly complicated when a driver wants to assign multiple tasks to a jack, e.g. the standard auto-mute with a power up/down sequence. This can be simplified if the hda_jack accepts multiple callbacks. This patch is such an extension: the callback-specific part (the function and private_data) is split to another struct from hda_jack_tbl, and multiple such objects can be assigned to a single hda_jack_tbl entry. The new struct hda_jack_callback is passed to each callback function now, thus the patch became bigger than expected. But these changes are mostly trivial. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-11Merge branch 'for-linus' into for-nextTakashi Iwai
Merging for-linus branch for syncing the latest STAC/IDT codec changes to be affected by the upcoming hda-jack rewrites.
2014-09-03ALSA: hda - Add TLV_DB_SCALE_MUTE bit for relevant controlsTakashi Iwai
The DACs on Sigmatel/IDT codecs do mute at the lowest volume level, and in the earlier drivers, we passed TLV_DB_SCALE_MUTE bit for each volume control element like Speaker and Headphone as well as Master. Along with the translation to the generic parser, however, the TLV bit was lost for the slave controls (e.g. Speaker) but set only to Master. In theory this should have sufficed, but apps, particularly PA, do care the slave volume bits, so we seem to see a regression in the volume controls. This patch adds a flag to hda_gen_spec to specify the DAC mute feature, and adds the TLV bit properly for all relevant volume controls. Also, the TLV bit for vmaster is set in hda_generic.c, so that we can get rid of all tricks from the codec driver side. As the similar hack is applied to Conexant 5051 stuff, we can get rid of it as well. BugLink: https://bugs.launchpad.net/bugs/1357928 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-01ALSA: hda - Fix digital mic on Acer Aspire 3830TGTakashi Iwai
Acer Aspire 3830TG with CX20588 codec has a digital built-in mic that has the same problem like many others, the inverted signal in stereo. Apply the same fixup to this machine, too. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>