summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_conexant.c
AgeCommit message (Collapse)Author
2019-02-20ALSA: hda - Add quirk for HP EliteBook 840 G5Jurica Vukadin
commit 4cd3016ce996494f78fdfd87ea35c8ca5d0b413e upstream. This enables mute LED support and fixes switching jacks when the laptop is docked. Signed-off-by: Jurica Vukadin <jurica.vukadin@rt-rk.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-31ALSA: hda - Add mute LED support for HP ProBook 470 G5Anthony Wong
commit 699390381a7bae2fab01a22f742a17235c44ed8a upstream. Support speaker and mic mute LEDs on HP ProBook 470 G5. BugLink: https://bugs.launchpad.net/bugs/1811254 Signed-off-by: Anthony Wong <anthony.wong@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-09ALSA: hda: add mute LED support for HP EliteBook 840 G4Mantas Mikulėnas
commit 40906ebe3af6a48457151b3c6726b480f6a6cb13 upstream. Tested with 4.19.9. v2: Changed from CXT_FIXUP_MUTE_LED_GPIO to CXT_FIXUP_HP_DOCK because that's what the existing fixups for EliteBooks use. Signed-off-by: Mantas Mikulėnas <grawity@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-13ALSA: hda - Add mic quirk for the Lenovo G50-30 (17aa:3905)Jeremy Cline
commit e7bb6ad5685f05685dd8a6a5eda7bfcd14d5f95b upstream. The Lenovo G50-30, like other G50 models, has a Conexant codec that requires a quirk for its inverted stereo dmic. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1249364 Reported-by: Alexander Ploumistos <alex.ploumistos@gmail.com> Tested-by: Alexander Ploumistos <alex.ploumistos@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Jeremy Cline <jcline@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-22ALSA: hda - Turn CX8200 into D3 as well upon rebootPark Ju Hyung
commit d77a4b4a5b0b2ebcbc9840995d91311ef28302ab upstream. As an equivalent codec with CX20724, CX8200 is also subject to the reboot bug. Late 2017 and 2018 LG Gram and some HP Spectre laptops are known victims to this issue, causing extremely loud noises upon reboot. Now that we know that this bug is subject to multiple codecs, fix the comment as well. Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-22ALSA: hda - Sleep for 10ms after entering D3 on Conexant codecsPark Ju Hyung
commit f59cf9a0551dd954ad8b752461cf19d9789f4b1d upstream. On rare occasions, we are still noticing that the internal speaker spitting out spurious noises even after adding the problematic codec to the list. Adding a 10ms artificial delay before rebooting fixes the issue entirely. Patch for Realtek codecs also adds the same amount of delay after entering D3. Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25ALSA: hda: add mute led support for HP ProBook 455 G5Po-Hsu Lin
commit 9a6249d2a145226ec1b294116fcb08744cf7ab56 upstream. Audio mute led does not work on HP ProBook 455 G5, this can be fixed by using CXT_FIXUP_MUTE_LED_GPIO to support it. BugLink: https://bugs.launchpad.net/bugs/1781763 Reported-by: James Buren Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-26ALSA: hda: add dock and led support for HP ProBook 640 G4Dennis Wassenberg
commit 7eef32c1ef895a3a96463f9cbd04203007cd5555 upstream. This patch adds missing initialisation for HP 2013 UltraSlim Dock Line-In/Out PINs and activates keyboard mute/micmute leds for HP ProBook 640 G4 Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-26ALSA: hda: add dock and led support for HP EliteBook 830 G5Dennis Wassenberg
commit 2861751f67b91e1d24e68010ced96614fb3140f4 upstream. This patch adds missing initialisation for HP 2013 UltraSlim Dock Line-In/Out PINs and activates keyboard mute/micmute leds for HP EliteBook 830 G5 Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-26ALSA: hda/conexant - Add fixup for HP Z2 G4 workstationTakashi Iwai
commit f16041df4c360eccacfe90f96673b37829e4c959 upstream. HP Z2 G4 requires the same workaround as other HP machines that have no mic-pin detection. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-15ALSA: hda: add dock and led support for HP ProBook 640 G2Dennis Wassenberg
commit 099fd6ca0ad25bc19c5ade2ea4b25b8fadaa11b3 upstream. This patch adds missing initialisation for HP 2013 UltraSlim Dock Line-In/Out PINs and activates keyboard mute/micmute leds for HP ProBook 640 G2 Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-15ALSA: hda: add dock and led support for HP EliteBook 820 G3Dennis Wassenberg
commit aea808172018ca01abf53db808323aed23281835 upstream. This patch adds missing initialisation for HP 2013 UltraSlim Dock Line-In/Out PINs and activates keyboard mute/micmute leds for HP EliteBook 820 G3 Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-02ALSA: hda - Add MIC_NO_PRESENCE fixup for 2 HP machinesHui Wang
commit 322f74ede933b3e2cb78768b6a6fdbfbf478a0c1 upstream. There is a headset jack on the front panel, when we plug a headset into it, the headset mic can't trigger unsol events, and read_pin_sense() can't detect its presence too. So add this fixup to fix this issue. 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>
2017-08-23ALSA: hda - Add stereo mic quirk for Lenovo G50-70 (17aa:3978)Takashi Iwai
Lenovo G50-70 (17aa:3978) with Conexant codec chip requires the similar workaround for the inverted stereo dmic like other Lenovo models. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1020657 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-25ALSA: hda - Add mute led support for HP ProBook 440 G4Kai-Heng Feng
Mic mute led does not work on HP ProBook 440 G4. We can use CXT_FIXUP_MUTE_LED_GPIO fixup to support it. BugLink: https://bugs.launchpad.net/bugs/1705586 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> # v4.12+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-08ALSA: hda - Add mute led support for HP EliteBook 840 G3Florin Tudorache
Signed-off-by: Florin Tudorache <florin_tudorache@live.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-19ALSA: hda - Add HP ZBook 15u G3 Conexant CX20724 GPIO mute ledsJerónimo Borque
The HP ZBook 15u G3 has a Conexant CX20724 with mute led on GPIO1 and mic mute led on GPIO2. Adding CXT_FIXUP_MUTE_LED_GPIO inspired on patch_realtek's one. Signed-off-by: Jerónimo Borque <jeronimo@borque.com.ar> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-03-20ALSA: hda - add support for docking station for HP 840 G3Jaroslav Kysela
This tested patch adds missing initialization for Line-In/Out PINs for the docking station for HP 840 G3. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-12-06ALSA: hda - Gate the mic jack on HP Z1 Gen3 AiOTakashi Iwai
HP Z1 Gen3 AiO with Conexant codec doesn't give an unsolicited event to the headset mic pin upon the jack plugging, it reports only to the headphone pin. It results in the missing mic switching. Let's fix up by simply gating the jack event. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-27ALSA: hda - Add the top speaker pin config for HP Spectre x360Takashi Iwai
HP Spectre x360 with CX20724 codec has two speaker outputs while the BIOS sets up only the bottom one (NID 0x17) and disables the top one (NID 0x1d). This patch adds a fixup simply defining the proper pincfg for NID 0x1d so that the top speaker works as is. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=169071 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-10ALSA: hda - Apply reboot D3 fix for CX20724 codec, tooTakashi Iwai
Just like CX20722, CX7024 codec also requires the power down at reboot in order to reduce the noise at reboot/shutdown. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=113511 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-12-03Merge branch 'for-linus' into for-nextTakashi Iwai
2015-12-03ALSA: hda - Enable power_save_node for CX20722David Henningsson
I've tested it on one device and it works fine, no clicks. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-12-01ALSA: hda - Add Conexant CX8200 (14f1:2008) codec entryTakashi Iwai
It's supposed to be equivalent with CX20724. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-12-01ALSA: hda - Correct codec names for 14f1:50f1 and 14f1:50f3Takashi Iwai
The numbers aren't always linear, just like in the real world. Correct to the right numbers stated in the datasheet (although we can't trust the datasheet as well). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-20ALSA: hda - convert to hda_device_idTakashi Iwai
Finally we have a proper infrastructure to generate the modaliases automatically, let's move to hda_device_id from the legacy hda_codec_preset that contains basically the same information. The patch function hook is stored in driver_data field, which is long, and we need an explicit cast. Other than that, the conversion is mostly straightforward. Each entry is even simplified using a macro, and the lengthy (and error-prone) manual modaliases got removed. As a result, we achieved a quite good diet: 14 files changed, 407 insertions(+), 595 deletions(-) Reviewed-by: Vinod Koul <vinod.koul@intel.com> Tested-by: Subhransu S Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>