summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: opl3: remove redundant pointer opl3Colin Ian King2018-07-162-18/+0
| | | | | | | | | | | Variable opl3 is being assigned but is never used hence it is redundant and can be removed. Cleans up several clang warnings: warning: variable 'opl3' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: Fix snd_interval_refine first/last with open min/maxTimo Wischer2018-07-111-4/+10
| | | | | | | | | | | | | | | | Without this commit the following intervals [x y), (x y) were be replaced to (y-1 y) by snd_interval_refine_last(). This was also done if y-1 is part of the previous interval. With this changes it will be replaced with [y-1 y) in case of y-1 is part of the previous interval. A similar behavior will be used for snd_interval_refine_first(). This commit adapts the changes for alsa-lib of commit 9bb985c ("pcm: snd_interval_refine_first/last: exclude value only if also excluded before") Signed-off-by: Timo Wischer <twischer@de.adit-jv.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: Allow drivers to set R/W wait time.Liam Girdwood2018-07-061-5/+12
| | | | | | | | | | | | Currently ALSA core blocks userspace for about 10 seconds for PCM R/W IO. This needs to be configurable for modern hardware like DSPs where no pointer update in milliseconds can indicate terminal DSP errors. Add a substream variable to set the wait time in ms. This allows userspace and drivers to recover more quickly from terminal DSP errors. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: Use snd_pcm_stop_xrun() for xrun injectionTakashi Iwai2018-07-042-7/+2
| | | | | | | | | | | Basically the xrun injection routine can simply call the standard helper snd_pcm_stop_xrun(), but with one exception: it may be called even when the stream is closed. Make snd_pcm_stop_xrun() more robust and check the NULL runtime state, and simplify xrun injection code by calling it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: trace XRUN event at injection, tooTakashi Iwai2018-07-044-8/+11
| | | | | | | | | | | | The PCM xrun injection triggers directly snd_pcm_stop() without the standard xrun handler, hence it's not recorded on the event buffer. Ditto for snd_pcm_stop_xrun() call and SNDRV_PCM_IOCTL_XRUN ioctl. They are inconvenient from the debugging POV. Let's make them to trigger XRUN via the standard helper more consistently. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/hda-core-intel' into for-nextTakashi Iwai2018-07-0313-580/+547
|\ | | | | | | | | | | Merge the development branch for HD-audio ext bus refactoring. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hdac: add extended ops in the hdac_busRakesh Ughreja2018-06-282-2/+4
| | | | | | | | | | | | | | | | | | | | | | Add extended ops in the hdac_bus to allow calling the ASoC HDAC library ops to reuse the legacy HDA codec drivers with ASoC framework. Extended ops are used by the legacy codec drivers to call into hdac_hda library, in the subsequent patches.. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hdac: remove memory allocation from snd_hdac_ext_bus_device_initRakesh Ughreja2018-06-282-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | Remove memory allocation within snd_hdac_ext_bus_device_init, to make its behaviour identical to snd_hdac_bus_device_init. So that caller can allocate the parent data structure containing hdac_device. This API change helps in reusing the legacy HDA codec drivers with ASoC platform drivers. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda: split snd_hda_codec_new functionRakesh Ughreja2018-06-282-17/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split snd_hda_codec_new into two separate functions. snd_hda_codec_device_init allocates memory and registers with bus. snd_hda_codec_device_new initialializes the fields and performs snd_device_new. This enables reuse of legacy HDA codec drivers as ASoC codec drivers. In addition mark some functions with EXPORT_SYMBOL_GPL so that it can be called by ASoC wrapper around the legacy HDA driver (hdac_hda). Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hdac: ext: add wait for codec to respond after link resetRakesh Ughreja2018-06-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | As per HDA spec section 4.3 - Codec Discovery, the software shall wait for atleast 521usec for codec to respond after link reset. With the multi-link capability each link is turned ON/OFF individually. Link controller drives reset signal when it is turned ON. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hdac: Remove usage of struct hdac_ext_driver, use hdac_driver insteadRakesh Ughreja2018-06-282-23/+19
| | | | | | | | | | | | | | | | | | This patch removes the hdac_ext_driver structure. The legacy and enhanced HDaudio capabilities can be handled in a backward-compatible way without separate definitions. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hdac: Remove usage of struct hdac_ext_bus and use hdac_bus insteadRakesh Ughreja2018-06-2811-326/+269
| | | | | | | | | | | | | | | | | | | | | | | | This patch removes the hdac_ext_bus structure. The legacy and enhanced HDaudio capabilities can be handled in a backward-compatible way without separate definitions. Follow-up patches in this series handle the driver definition. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hdac: Remove usage of struct hdac_ext_device and use hdac_device insteadRakesh Ughreja2018-06-282-221/+200
| | | | | | | | | | | | | | | | | | | | | | | | This patch removes the hdac_ext_device structure. The legacy and enhanced HDaudio capabilities can be handled in a backward-compatible way without separate definitions. Follow-up patches in this series handle the bus and driver definitions. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-midi: use irqsave() in USB's complete callbackJohn Ogness2018-07-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The USB completion callback does not disable interrupts while acquiring the lock. We want to remove the local_irq_disable() invocation from __usb_hcd_giveback_urb() and therefore it is required for the callback handler to disable the interrupts while acquiring the lock. The callback may be invoked either in IRQ or BH context depending on the USB host controller. Use the _irqsave() variant of the locking primitives. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb: caiaq: audio: use irqsave() in USB's complete callbackJohn Ogness2018-07-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The USB completion callback does not disable interrupts while acquiring the lock. We want to remove the local_irq_disable() invocation from __usb_hcd_giveback_urb() and therefore it is required for the callback handler to disable the interrupts while acquiring the lock. The callback may be invoked either in IRQ or BH context depending on the USB host controller. Use the _irqsave() variant of the locking primitives. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: snd-aoa: add of_node_put() in error pathNicholas Mc Guire2018-06-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Both calls to of_find_node_by_name() and of_get_next_child() return a node pointer with refcount incremented thus it must be explicidly decremented here after the last usage. As we are assured to have a refcounted np either from the initial of_find_node_by_name(NULL, name); or from the of_get_next_child(gpio, np) in the while loop if we reached the error code path below, an x of_node_put(np) is needed. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Fixes: commit f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa") Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/hdmi - Don't fall back to generic when i915 binding failsTakashi Iwai2018-06-282-0/+3
| | | | | | | | | | | | | | | | | | | | | | When i915 component binding fails, it means that HDMI isn't applicable anyway. Although the probe with the generic HDMI parser would still work, it's essentially useless, hence better to be left unbound. This patch mimics the probe_id field at failing the i915 component binding so that the generic HDMI won't be bound after that. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda: Add AZX_DCAPS_PM_RUNTIME for AMD Raven RidgeKai-Heng Feng2018-06-281-1/+2
| | | | | | | | | | | | | | | | | | This patch can make audio controller in AMD Raven Ridge gets runtime suspended to D3, to save ~1W power when it's not in use. Cc: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Move in_pm accessors to HDA coreTakashi Iwai2018-06-282-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The in_pm atomic in hdac_device is an important field used as a flag as well as a refcount for PM. The existing snd_hdac_power_up/down helpers already refer to it in the HD-audio core code, while the code to actually setting the value (atomic_inc() / _dec()) is open-coded in HDA legacy side, which is hard to find. This patch adds the helper functions to set/reset the in_pm counter to HDA core and use them in HDA legacy side, for making it clearer who / where the PM is managed. There is no functional changes, just code refactoring. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: intel_hdmi: Use strlcpy() instead of strncpy()Takashi Iwai2018-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | hdmi_lpe_audio_probe() copies the pcm name string via strncpy(), but as a gcc8 warning suggests, it misses a NUL terminator, and unlikely the expected result. Use the proper one, strlcpy() instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Kill snd_hda_codec_update_cache()Takashi Iwai2018-06-275-12/+9
| | | | | | | | | | | | | | | | | | | | snd_hda_codec_update_cache() used to serve for a slightly different purpose from snd_hdac_write_cache(), but now both of them became identical. Let's unify and replace with the latter one consistently. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Comprehensive model list for ALC882 & coTakashi Iwai2018-06-261-0/+25
| | | | | | | | | | | | | | | | More comprehensive list of model strings for ALC882 & co. Also corrected the subsection in models.rst, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Comprehensive model list for ALC262Takashi Iwai2018-06-261-0/+8
| | | | | | | | | | | | | | Added a few missing entries for ALC262 model strings. All about specific hardwares. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Comprehensive model list for ALC268Takashi Iwai2018-06-261-0/+1
| | | | | | | | | | | | | | Add the missing entry for ALC268 model strings. Only "spdif" was missing, and that's it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Comprehensive model list for ALC259 & coTakashi Iwai2018-06-261-0/+82
| | | | | | | | | | | | | | Like the previous commit for ALC662, let's give more comprehensive list of model entries for ALC269 & co as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Comprehensive model list for ALC662 & coTakashi Iwai2018-06-261-0/+18
| | | | | | | | | | | | | | | | ALC662 and others have far more fixup entries than the model table. Let's add more model string entries so that user can test / debug without compiling kernels at each time. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: Fix references to Documentation/.*/MultiSoundMauro Carvalho Chehab2018-06-261-1/+1
| | | | | | | | | | | | | | | | Now that the documentation/script file got restored, fix the references within the Kernel tree. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Apply PRE_PROBE fixup after ALC269 codec variant setupsTakashi Iwai2018-06-251-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently patch_alc269() calls the fixup with HDA_FIXUP_ACT_PRE_PROBE before setting up the codec model-specific setups (e.g. setting codec_variant or mixer_nid setup). This is rather confusing as others do call the *_PRE_PROBE fixup after such a setup. Due to this disorder, we have to override spec->shutup not at the usual HDA_FIXUP_ACT_PRE_PROBE but the unusual HDA_FIXUP_ACT_PROBE time. This patch corrects the fixup call orders in patch_alc269(), and also corrects the action to set up spec->shutup accordingly. No functional changes but just refactoring. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/via - Use standard verb containersTakashi Iwai2018-06-251-29/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, the remaining static init verbs in VIA codec driver are converted to the standard snd_hda_add_verbs() calls. The conversion is straightforward, but one change to be noted is the place of calls: since these verbs are supposed to be executed at the beginning of the init / resume procedure, we need to add snd_hda_add_verbs() calls before calling the other parsers. This is merely a cleanup, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/via - Simplify control managementTakashi Iwai2018-06-251-86/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces the control element creations in VIA codec driver with the standard snd_hda_gen_add_kctl() calls as a cleanup. There are two major fields targeted by this patch: the beep controls and static init controls. The former is converted just like other codec drivers do. The spec->beep_amp field can be eliminated by this change as well. The latter, static init controls, are replaced simply with explicit snd_hda_gen_add_kctl() calls. After these conversions, via_build_controls() becomes superfluous and replaced with snd_hda_gen_build_controls(), too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/via - Rewrite with error gotoTakashi Iwai2018-06-251-40/+60
| | | | | | | | | | | | | | | | | | | | | | Currently VIA codec driver invokes via_free() at each place of the error path. Move the error handling to the end of each function commonly and do goto-error as a standard idiom. This is a preliminary patch for the further cleanups, and no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cirrus - Simplify creation of new controlsTakashi Iwai2018-06-251-20/+9
| | | | | | | | | | | | | | | | | | | | | | This patch moves the mixer creation code in Cirrus codec driver from its own build_controls callback to snd_hda_gen_add_kctl() for simplification. As a bonus, this allows us to remove the cs421x_build_controls as it becomes identical with snd_hda_gen_build_controls(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/conexant - Clean up beep codeTakashi Iwai2018-06-251-58/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the previous commit for Realtek codec, the similar cleanup work can be applied to Conexant codec, too. A slight difference is that the call of cx_auto_parse_beep() is moved after snd_hda_gen_parse_auto_config(). It's not strictly needed, but it'd be good to make the creation of such beep mixers at the end, which matches with the former situation. Along with this conversion, cx_auto_build_controls() becomes just calling snd_hda_gen_build_controls(), so it's simply replaced with snd_hda_gen_build_controls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Use common helper for creating beep controlsTakashi Iwai2018-06-251-49/+65
| | | | | | | | | | | | | | | | | | | | | | | | In the Realtek codec driver, we used to build kctl elements for beep mixer in the own build_controls callback. This is an open-code and can be covered by the standard feature of the generic parser with snd_hda_gen_add_kctl() instead. Also, after the conversion, spec->beep_amp becomes superfluous; hence it's removed along with the conversion. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Use common helper for creating ALC268 beep controlsTakashi Iwai2018-06-251-24/+9
| | | | | | | | | | | | | | | | | | | | | | The beep mixer controls are the only remaining stuff that uses spec->mixers[] array, and they can be well converted to the standard helper in the generic parser, snd_hda_gen_add_kctl(). This simplifies the code, especially the superfluous mixers and num_mixers fields can be now removed from alc_spec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Use common GPIO mask for ALC660VD ASUS fixupTakashi Iwai2018-06-251-8/+13
| | | | | | | | | | | | | | | | The ALC660VD_FIX_ASUS_GPIO1 quirk requires to set up GPIO bit0 ON while bit 1 OFF. Implement the fixup function and convert from the static init verbs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Simplify Dell XPS13 GPIO handlingTakashi Iwai2018-06-251-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Dell XPS13 has multi-step fixups, and one of them (ALC288_FIXUP_DELL_XPS_13_GPIO6) corresponds to the management of GPIO bit6 (0x40). It used to be a static init verbs (to turn *off* the bit6). In this patch, we convert it as the gpio_mask and gpio_dir initializations folded in the existing fixup function. With this change, ALC288_FIXUP_DELL_XPS_13_GPIO6 becomes superfluous, thus it's removed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Convert some manual GPIO setupsTakashi Iwai2018-06-251-23/+26
| | | | | | | | | | | | | | | | | | This patch converts the remaining static init verbs for GPIO bits with the common gpio_* fields management. Only the verbs setting the GPIO data bits are targeted in this patch. The rest will be changed in later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Simplify mute LED GPIO handlingTakashi Iwai2018-06-251-103/+46
| | | | | | | | | | | | | | | | | | Now we can simplify the mute LED GPIO handling as well. Each fixup dealing with GPIO for the mute LED controls defined the static init verbs, and they are converted to the common GPIO bit fields with the new helper, alc_fixup_hp_gpio_led(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Simplify alc885_fixup_macpro_gpio()Takashi Iwai2018-06-251-37/+7
| | | | | | | | | | | | | | | | | | | | | | The fixup for Macbook Pro is nothing but setting the GPIO bits as usual but with one exception: it adds some delay at writing the GPIO bits. Add a flag to put the conditional delay in the common helper, and clean up alc885_fixup_macpro_gpio() with the new flag. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Consolidate gpio_data and gpio_ledTakashi Iwai2018-06-251-24/+4
| | | | | | | | | | | | | | | | | | | | | | Until now, two fields, gpio_data and gpio_led, coexist in alc_spec although basically both of them serve for the same purpose -- the GPIO data bits. This patch consolidates both usages and eliminates the superfluous gpio_led field. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Add GPIO data update helperTakashi Iwai2018-06-251-2/+16
| | | | | | | | | | | | | | | | For updating GPIO bits dynamically, provide a new helper, and use it from the alc260 automute hook. This helper will be used by other places in future, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Manage GPIO bits commonlyTakashi Iwai2018-06-251-48/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently the GPIO bits are managed by individual verbs in some cases while toggled dynamically in other cases. For simplifying the GPIO management, define the GPIO mask, dir and data bits in alc_spec fields, and refer to / set them consistently from all places. As a first step, along with the definition of the new gpio_* fields, this patch replaces the static verbs that are used at initialization and fixups with the common helper functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Allow skipping spec->init_amp detectionTakashi Iwai2018-06-251-23/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices have the overrides of spec->init_amp at HDA_FIXUP_ACT_PROBE just because alc_ssid_check() gives the false-positive values from the SSID. For more consistent behavior, define the logic in the following way: - Define ALC_INIT_UNDEFINED as the default value before calling alc_ssid_check() - Each fixup may set up spec->init_amp with another value at HDA_FIXUP_ACT_PRE_PROBE - At detection, check whether spec->init_amp is ALC_INIT_UNDEFINED or not; if it's different, we skip the detection Also, it turned out that ASUS TX300 requires the spec->init_amp override, too; currently it ignores the GPIO bits implicitly by its static init verb, but this will be changed in the later patchset. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/ac97-bus' into for-nextTakashi Iwai2018-06-251-0/+26
|\ \
| * | ALSA: ac97: add codecs devicetree bindingRobert Jarzmik2018-06-251-0/+26
| |/ | | | | | | | | | | | | | | | | Add a devicetree binding for codecs. This is especially useful if the AC97 bitclk clock is provided by the codec, as it has to be described in the devicetree description for the ac97 bus code to aquire it. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Simplify alc269_fixup_hp_line1_mic1_led()Takashi Iwai2018-06-211-5/+1
| | | | | | | | | | | | | | alc269_fixup_hp_line1_mic1_led() can be simplified more with the existing helper code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Sanity check of unexpected cap_sync_hook overrideTakashi Iwai2018-06-212-0/+2
| | | | | | | | | | | | | | | | | | There are a couple of places setting cap_sync_hook in the codec drivers, and they just overwrite the value. Add a sanity check via WARN_ON() in case if an old non-NULL value is overridden and forgotten. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/sigmatel - Use common helper for mic mute LEDTakashi Iwai2018-06-211-25/+6
| | | | | | | | | | | | | | | | To simplify the code and to get the mic-mute LED behavior control, use the new helper function for controlling the mic mute LED instead of open-codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Allow multiple ADCs for mic mute LED controlsTakashi Iwai2018-06-211-18/+14
| | | | | | | | | | | | | | | | | | Instead of refusing, allow the configuration with the multiple ADCs (thus multiple capture switches) for enabling the mic mute LED. This has been done for Sigmatel/IDT codecs, and we treat the OR-ed values from all capture switches as the boolean condition. Signed-off-by: Takashi Iwai <tiwai@suse.de>