aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_ca0110.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-12-13ALSA: hda: Unify get_response handlingTakashi Iwai1-1/+1
Now most of the get_response handling became quite similar between HDA-core and legacy drivers, and the only differences are: - the handling of extra-long polling delay for some codecs - the debug message for the stalled communication and both are worth to share in the common code. This patch unifies the code into snd_hdac_bus_get_response(), and use this from the legacy get_response callback. It results in a good amount of code reduction in the end. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20191212191101.19517-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-05-24treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 32Thomas Gleixner1-14/+1
Based on 1 normalized pattern(s): this driver 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 driver 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 18 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520170857.186505395@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-30ALSA: hda: move hda_codec.h to include/soundPierre-Louis Bossart1-1/+1
As suggested by Takashi, move this header file to make it easier to include from e.g. the Intel Skylake driver in follow-up patches Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-20ALSA: hda - convert to hda_device_idTakashi Iwai1-9/+6
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-05-29ALSA: hda - Set patch_ops before calling auto-parserTakashi Iwai1-2/+1
... 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-02-23ALSA: hda - Bind codecs via standard busTakashi Iwai1-14/+2
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-02-15ALSA: hda - Remove superfluous inclusion of linux/pci.hTakashi Iwai1-1/+0
Some codec drivers still have it since using PCI_VENDOR_ID_*. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21ALSA: hda - Remove superfluous header inclusionsTakashi Iwai1-1/+0
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18ALSA: hda - Fix missing unsol event handler in some codec driversTakashi Iwai1-0/+1
This resulted in non-working auto-mute behavior, of course... Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Use generic parser for CA0110 codecTakashi Iwai1-473/+15
CA0110 codec is a fairly straightforward hardware implementation, and we can use the generic parser almost as is. Just set spec->multi_cap_vol flag to follow the current behavior. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08ALSA: hda - Move BIOS pin-parser code to hda_auto_parser.cTakashi Iwai1-0/+1
Just code shuffles. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20ALSA: hda - Add snd_hda_get_default_vref() helper functionTakashi Iwai1-1/+2
Add a new helper function to guess the default VREF pin control bits for mic in. This can be used to set the pin control value safely matching with the actual pin capabilities. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20ALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functionsTakashi Iwai1-4/+2
For setting the pin-control values more safely to match with the actual pin capability bits, a copule of new helper functions, snd_hda_set_pin_ctl() and snd_hda_set_pin_ctl_cache(), are introduced. These are simple replacement of the codec verb write with AC_VERB_SET_PIN_WIDGET but do more sanity checks and filter out superfluous pin-control bits if they don't fit with the corresponding pin capabilities. Some codecs are screwed up or ignore the command when such a wrong bit is set. These helpers will avoid such secret errors. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Give more unique names by snd_hda_get_pin_label()Takashi Iwai1-2/+4
The function now gives more unique names for the output pins by adding some prefix and suffix for the location and the channels. Otherwise, it can pass the index number. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Introduce snd_hda_get_pin_label()Takashi Iwai1-1/+1
Create a new helper function snd_hda_get_pin_label() for getting a label string for both input and output pins. hda_get_input_pin_label() is obsoleted by this function, and the callers are replaced appropriately now by this patch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker1-0/+1
Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-06ALSA: hda: Virtualize SPDIF out controlsStephen Warren1-1/+2
The SPDIF output controls apply to converter widgets. A future change will create a PCM device per pin widget, and hence a set of SPDIF output controls per pin widget, for certain HDMI codecs. To support this, we need the ability to virtualize the SPDIF output controls. Specifically: * Controls can be "unassigned" from real hardware when a converter is not used for the PCM the control was created for. * Control puts only write to hardware when they are assigned. * Controls can be "assigned" to real hardware when a converter is picked to support output for a particular PCM. * When a converter is assigned, the hardware is updated to the cached configuration. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02ALSA: hda - Constify fixup and other array data in patch_ca0110.cTakashi Iwai1-8/+8
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-21ALSA: hda - Fix wrong SPDIF NID assignment for CA0110Takashi Iwai1-1/+1
The dig_out_nid field must take a digital-converter widget, but the current ca0110 parser passed the pin wrongly instead. Reported-by: Wai Yew CHAY <wychay@ctl.creative.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09ALSA: hda - Improve the input source name labelsTakashi Iwai1-2/+1
This patch improves the input-source label strings to be generated from the pin information instead of fixed strings per AUTO_PIN_* type. This gives more suitable labels, especially for mic and line-in pins. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30ALSA: hda - Use new inputs[] field to parse input-pins for CA-IBG codecsTakashi Iwai1-4/+5
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignmentJaroslav Kysela1-2/+2
This is an initial patch to show universal control<->NID assigment in proc codec file. The change helps to debug codec related problems. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-27ALSA: hda - Introduce get_wcaps_type() macroTakashi Iwai1-2/+1
Add a helper macro to retrieve the widget type from wiget cap bits. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-01ALSA: hda - Add missing static to patch_ca0110()Takashi Iwai1-1/+1
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-20ALSA: hda - Use snd_hda_codec_get_pincfg() in patch_ca0110.cTakashi Iwai1-4/+2
Use the new function to reduce the access and allow the user setup via sysfs, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-20ALSA: hda - Fix channels_max setting for CA0110Takashi Iwai1-1/+2
Added the missing definition of max channels for CA0110, which resulted in an error at opening PCM devices. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16ALSA: hda - Add Creative CA0110-IBG supportTakashi Iwai1-0/+574
Added the support for Creative SB X-Fi boards with UAA (HD-audio) mode. In the HD-audio mode, no multiple streams are supported by just it behaves like a normal HD-audio device. Signed-off-by: Takashi Iwai <tiwai@suse.de>