summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.h
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156Thomas Gleixner2019-05-301-14/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1334 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ALSA: hda - Fix runtime PMLukas Wunner2018-05-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commit 3b5b899ca67d ("ALSA: hda: Make use of core codec functions to sync power state"), hda_set_power_state() returned the response to the Get Power State verb, a 32-bit unsigned integer whose expected value is 0x233 after transitioning a codec to D3, and 0x0 after transitioning it to D0. The response value is significant because hda_codec_runtime_suspend() does not clear the codec's bit in the codec_powered bitmask unless the AC_PWRST_CLK_STOP_OK bit (0x200) is set in the response value. That in turn prevents the HDA controller from runtime suspending because azx_runtime_idle() checks that the codec_powered bitmask is zero. Since commit 3b5b899ca67d, hda_set_power_state() only returns 0x0 or 0x1, thereby breaking runtime PM for any HDA controller. That's because an inline function introduced by the commit returns a bool instead of a 32-bit unsigned int. The change was likely erroneous and resulted from copying and pasting snd_hda_check_power_state(), which is immediately preceding the newly introduced inline function. Fix it. Link: https://bugs.freedesktop.org/show_bug.cgi?id=106597 Fixes: 3b5b899ca67d ("ALSA: hda: Make use of core codec functions to sync power state") Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Abhijeet Kumar <abhijeet.kumar@intel.com> Reported-and-tested-by: Gunnar Krüger <taijian@posteo.de> Signed-off-by: Lukas Wunner <lukas@wunner.de> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda: Make use of core codec functions to sync power stateAbhijeet Kumar2018-02-121-1/+5
| | | | | | | | | Since sync_power_state is moved to core it's better to use the helper function to ensure the actual power state reaches target instead of using the local helper functions already exsisting in hda code. Signed-off-by: Abhijeet Kumar <abhijeet.kumar@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Remove the generic bind ctl helpersTakashi Iwai2017-05-171-44/+0Star
| | | | | | | | Now all the users of this workaround code is gone, and we can finally remove the legacy codes from the core HD-audio module. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move bind-mixer switch codes to generic parserTakashi Iwai2017-05-171-17/+0Star
| | | | | | | | The generic parser is the only user of the bind-mixer controls, so we can move the code there and clean up the core helper. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda: make use of core codec fnsVinod Koul2015-10-081-6/+1Star
| | | | | | | | Now that we have introduced the core fns we should make hda use these helpers Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into for-nextTakashi Iwai2015-06-121-2/+2
|\ | | | | | | | | | | | | | | | | Yet another non-trivial conflicts resolution for the recent HD-audio fix. Conflicts: sound/pci/hda/hda_intel.c Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Re-add the lost fake mute supportTakashi Iwai2015-06-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Yet another regression by the transition to regmap cache; for better usability, we had the fake mute control using the zero amp value for Conexant codecs, and this was forgotten in the new hda core code. Since the bits 4-7 are unused for the amp registers (as we follow the syntax of AMP_GET verb), the bit 4 is now used to indicate the fake mute. For setting this flag, snd_hda_codec_amp_update() becomes a function from a simple macro. The bonus is that it gained a proper function description. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FSJie Yang2015-05-271-2/+2
|/ | | | | | | | | | | | | We may disable proc fs only for sound part, to reduce ALSA memory footprint. So add CONFIG_SND_PROC_FS and replace the old CONFIG_PROC_FSs in alsa code. With sound proc fs disabled, we can save about 9KB memory size on X86_64 platform. Signed-off-by: Jie Yang <yang.jie@intel.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Use regmap for parameter caches, tooTakashi Iwai2015-03-231-3/+35
| | | | | | | | | | | | | | | | | The amp hash table was used for recording the cached reads of some capability values like pin caps or amp caps. Now all these are moved to regmap as well. One addition to the regmap helper is codec->caps_overwriting flag. This is set in snd_hdac_override_parm(), and the regmap helper accepts any register while this flag is set, so that it can overwrite even the read-only verb like AC_VERB_PARAMETERS. The flag is cleared immediately in snd_hdac_override_parm(), as it's a once-off flag. Along with these changes, the no longer needed amp hash and relevant fields are removed from hda_codec struct now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Use regmap for amp accessesTakashi Iwai2015-03-231-6/+4Star
| | | | | | | | | | | | | | This patch converts the amp access functions to the regmap helpers. The amp values were formerly cached in the own hash table. Now it's dropped by the regmap's cache. The only tricky conversion is snd_hda_codec_amp_init(). This function shouldn't do anything if the amp was already initialized. For achieving this behavior, a value is read once at first temporarily in the cache-only mode. Only if it returns an error, i.e. the item still doesn't exist in the cache, it proceeds to the update. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix possible runtime PM refcount unbalanceTakashi Iwai2015-03-231-0/+1
| | | | | | | | | | | When the driver is unloaded before the codec is bound, it still keeps the runtime PM refcount up, and results in the unbalance. This patch covers these cases by introducing a flag indicating the runtime PM initialization and handling the codec registration procedure more properly. It also fixes the missing input beep device as a gratis, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move a part of hda_codec stuff into hdac_deviceTakashi Iwai2015-03-231-6/+9
| | | | | | | | | | 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>
* ALSA: hda - Implement unbind more safelyTakashi Iwai2015-03-031-0/+1
| | | | | | | | | | | | Now we have all pieces ready, and put them into places: - add the hda_pcm refcount to azx_pcm_open() and azx_pcm_close(), - call the most of cleanup code in hda_codec_reset() from the codec driver remove, - call the same code also from the hda_codec object free. Then the codec driver can be unbound more safely now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Remove channel mode helper functionsTakashi Iwai2015-02-261-23/+0Star
| | | | | | They are no longer used, let's kill them. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Bind codecs via standard busTakashi Iwai2015-02-231-10/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ALSA: hda - Embed struct hda_bus_unsolicited into struct hda_busTakashi Iwai2015-02-171-17/+0Star
| | | | | | | | There is no big merit to handle hda_bus_unsolicited object individually, as it's tightly coupled with the hda_bus object itself. Embedding it makes the code simpler in the end. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add missing terminating entry to SND_HDA_PIN_QUIRK macroDavid Henningsson2014-10-241-2/+2
| | | | | | | | | | | | Without this terminating entry, the pin matching would continue across random memory until a zero or a non-matching entry was found. The result being that in some cases, the pin quirk would not be applied correctly. Cc: stable@vger.kernel.org Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move the function "check_amp_caps" to hda_codec.cDavid Henningsson2014-09-231-0/+8
| | | | | | | The next patch will use it, so make it visible across modules. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Remove obsoleted snd_hda_check_board_config() & coTakashi Iwai2014-08-191-6/+0Star
| | | | | | | | | The helper functions snd_hda_check_board_config() and snd_hda_check_board_codec_sid_config() are no longer used since the transition to the generic parser and all quirks have been replaced with fixups. Let's kill these dead codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Refactor quirk picking and change quirk priorityDavid Henningsson2014-07-221-0/+2
| | | | | | | | | | | | Previously, calling one quirk function first and another later would make the latter one take priority, this is now changed to make the former take priority. By adding two special values for fixup_id we can also get rid of the fixup_forced flag. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into for-nextTakashi Iwai2014-06-261-0/+21
|\
| * ALSA: hda - Make a SND_HDA_PIN_QUIRK macroDavid Henningsson2014-06-241-0/+21
| | | | | | | | | | | | | | This is cosmetical - it makes the new pin quirk table look better. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Kill the rest of snd_print*() usagesTakashi Iwai2014-06-251-1/+2
| | | | | | | | | | | | | | Pass the codec object so that we can replace all the rest of snd_print*() usages with the proper device-specific print helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Kill snd_printd*() in HDMI debug / info printsTakashi Iwai2014-06-251-2/+2
|/ | | | | | | Pass codec instance to each function that still prints info and debug outputs via snd_printd*(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add a new quirk match based on default pin configurationDavid Henningsson2014-05-261-0/+14
| | | | | | | | | | | | | | | | Normally, we match on pci ssid only. This works but needs new code for every machine. To catch more machines in the same quirk, let's add a new type of quirk, where we match on 1) PCI Subvendor ID (i e, not device, just vendor) 2) Codec ID 3) Pin configuration default If all these three match, we could be reasonably certain that the quirk should apply to the machine even though it might not be the exact same device. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Replace with standard printkTakashi Iwai2014-02-251-0/+7
| | | | | | | | | | | | 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 sysfs to codec object, tooTakashi Iwai2014-02-251-0/+5
| | | | | | | | | | | | We have currently sysfs attributes for each hwdep, but basically these should belong to the codec itself, per se. Let's add them to the codec object while keeping them for hwdep as is for compatibility. While we are at it, split the sysfs-related stuff into a separate source file, hda_sysfs.c, and keep only the stuff necessary for hwdep in hda_hwdep.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Create sysfs attribute files via groupsTakashi Iwai2014-02-251-18/+0Star
| | | | | | | | | | | | Instead of calling each time device_create_file(), create the groups of sysfs attribute files at once in a normal way. Add a new helper function, snd_get_device(), to return the associated device object, so that we can handle the sysfs addition locally. Since the sysfs file addition is done differently now, snd_add_device_sysfs_file() helper function is removed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Bind with HDMI codec parser automaticallyTakashi Iwai2013-11-261-0/+1
| | | | | | | | | If a codec contains only the digital outputs, it's very likely a HDMI/DP codec, which isn't supported by the generic parser but via HDMI codec parser code. Detect such a case and bind with the proper parser object if available. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Split the generic parser as an individual moduleTakashi Iwai2013-11-261-7/+0Star
| | | | | | | | Drop the hard dependency on the generic parser code and load / unload the generic parser code dynamically if built as a module. This allows us to avoid the generic parser if only HDMI/DP codecs are found. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - hdmi: Add ELD emulation for ATI/AMD codecsAnssi Hannula2013-10-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | ATI/AMD HDMI/DP codecs do not include standard HDA ELD (EDID-like data) support. In place of providing access to an ELD buffer, various vendor-specific verbs are provided to provide the relevant information. Revision ID 3 and later (0x100300 as reported by procfs codec#X) have support for providing more information than the previous revisions (but only if supported by the display driver). Generate ELD from the information provided by the vendor-specific verbs on ATI/AMD codecs. The specification is available at: http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf v2: moved code to hda_eld.c and cleaned it up v3: adapted to hdmi_ops infrastructure Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Tested-by: Peter Frühberger <fritsch@xbmc.org> # v2 Tested-by: Olivier Langlois <olivier@trillion01.com> # v2 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move mutex from hda_eld to per_pin in HDMI codec driverTakashi Iwai2013-10-171-18/+4Star
| | | | | | | | | | | | | | Since the lock is used primarily in patch_hdmi.c, it's better to move it in the local struct instead of exporting in hda_eld. The only functions requiring the lock in hda_eld.c are proc accessors. So in this patch, the proc entry and its creation/deletion/accessors are moved into patch_hdmi.c, together with the mutex lock to pin_spec struct. The former proc info functions are exported so that they can be called from patch_hdmi.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - add HDA_FIXUP_ACT_FREE actionDavid Henningsson2013-10-171-0/+1
| | | | | | | | A fixup which should be called before codec being freed will come to use in the next patch. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix missing Mic Boost controls for VIA codecsTakashi Iwai2013-06-191-0/+8
| | | | | | | | | | | | | | | | | Some VIA codecs like VT1708S have Mic boost amps in the mic pins but they aren't exposed in the capability bits. In the past driver code, we override the pin caps and create mic boost controls forcibly. While transition to the generic parser, we lost the mic boost controls although the pin caps are still overridden, because the generic parser code checks the widget caps, too. So this patch adds a new helper function to allow the override of the given widget capability bits, and makes VIA codecs driver to add the missing input-amp capability bit. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59861 Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix return value of snd_hda_check_power_state()Takashi Iwai2013-06-181-1/+1
| | | | | | | | | | | | | | The refactoring by commit 9040d102 introduced the new function snd_hda_check_power_state(). This function is supposed to return true if the state already reached to the target state, but it actually returns false for that. An utterly stupid typo while copy & paste. Fortunately this didn't influence on much behavior because powering up AFG usually powers up the child widgets, too. But the finer power control must have been broken by this bug. Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Don't apply EAPD power filter as defaultTakashi Iwai2013-03-131-0/+4
| | | | | | | | | | | | | | | | | | | | | 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 - hdmi: Protect ELD bufferDavid Henningsson2013-02-191-0/+1
| | | | | | | | | | | | Because the eld buffer can be simultaneously accessed from both workqueue context (updating) and process context (kcontrol read), we need to protect it with a mutex to guarantee consistency. To avoid holding the mutex while reading the ELD info from the codec, we introduce a temporary eld buffer. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - hdmi: Refactor hdmi_eld into parsed_hdmi_eldDavid Henningsson2013-02-191-10/+17
| | | | | | | | For better readability, the information that is parsed out of the ELD data is now put into a separate parsed_hdmi_eld struct. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add snd_hda_check_power_state() helper functionTakashi Iwai2013-01-241-0/+13
| | | | | | ... for small refactoring. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add chained_before flag to the fixup entryTakashi Iwai2013-01-231-1/+2
| | | | | | | | | | Sometimes we want to call a fixup after applying other existing fixups, but currently the fixup chain mechanism allows only the call the others after the target fixup. This patch adds a new flag, chained_before, to struct hda_fixup, for allowing the chained call before the current execution. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Combine snd_hda_codec_flush_*_cache() to a single functionTakashi Iwai2013-01-221-4/+0Star
| | | | | | | | | Since both snd_hda_codec_flush_amp_cache() and snd_hda_codec_flush_cmd_cache() are called usually at the same time, we can simply combine them to a single function, snd_hda_codec_flush_cache(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add snd_hda_get_int_hint() helper functionTakashi Iwai2013-01-121-0/+7
| | | | | | It'll be used in hda_generic.c, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add a new fixup type to override pinctl valuesTakashi Iwai2013-01-121-0/+1
| | | | | | | | | | | | | Add a new fixup type, HDA_FIXUP_PINCTLS, for overriding the pinctl values of the given pins. It takes the same array of struct pintbl like HDA_FIXUP_PINS, but each entry contains the pinctl value instead of the pin default config value. This patch also replaces the corresponding codes in patch_realtek.c. Without this change, the direct call of verbs may be overridden again by the later call of pinctl restoration by the driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - More strict correction of invalid pinctl bitsTakashi Iwai2013-01-121-0/+2
| | | | | | | | | | | | Check more strictly about the validity of pinctl values in snd_hda_set_pin_ctl() and correct the wrong bits automatically. Also provide the helper function to correct pinctl bits to codec drivers. This automatically fixes the invalid pinctl writes that are found in a few Realtek fixups for NID 0x0f amp like ASUS A6Rp. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add helper functions to cache the current pinctl targetTakashi Iwai2013-01-121-0/+4
| | | | | | | We already have the list of whole pin widgets and there is an unused space in the list; let's use it for caching the current pinctl value. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add snd_hda_codec_flush_*_cache() aliasesTakashi Iwai2013-01-121-0/+4
| | | | | | | It makes easier to understand although these are identical with snd_hda_codec_resume_*() functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move fixup code into struct hda_codecTakashi Iwai2013-01-121-0/+53
| | | | | | | 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>
* ALSA: hda/realtek - Add path active flagTakashi Iwai2013-01-121-1/+2
| | | | | | | | | | | | | | | ... and rewrite the initialization of output paths as a generic function that is applicable for both i/o directions. The new flag, active, is introduced to each nid_path entry. This indicates whether the given path is active, and it's used for checking whether a certain widget can be turned off or changed when a path is no longer used or newly enabled. It's still used only in the output paths. More wider adaption for input and loopback paths will be achieved in the later patch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Introduce snd_hda_codec_amp_init*()Takashi Iwai2013-01-121-0/+4
| | | | | | | | | | | The new function snd_hda_codec_amp_init() (and the stereo variant) initializes the amp value only once at the first access. If the amp was already initialized or updated, this won't do anything more. It's useful for initializing the input amps that are in the part of the path but never used. Signed-off-by: Takashi Iwai <tiwai@suse.de>